Printing not working with costumized documents

Hello everybody,

I created some costum documents in ERPNext v15, for example a custom Delivery Note and a custom Invoice. They look good in the preview, but when I try to print them, i get the Server-Error 500 and the following error code:

Traceback (most recent call last):
  File "apps/frappe/frappe/website/serve.py", line 20, in get_response
    response = renderer_instance.render()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/website/page_renderers/template_page.py", line 84, in render
    html = self.get_html()
           ^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/website/utils.py", line 527, in cache_html_decorator
    html = func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/website/page_renderers/template_page.py", line 95, in get_html
    self.update_context()
  File "apps/frappe/frappe/website/page_renderers/template_page.py", line 163, in update_context
    data = self.run_pymodule_method("get_context")
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/website/page_renderers/template_page.py", line 223, in run_pymodule_method
    return method(self.context)
           ^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/www/printview.py", line 72, in get_context
    body = get_rendered_template(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "apps/frappe/frappe/www/printview.py", line 178, in get_rendered_template
    format_data_map[df.get("fieldname")] = df
                    ^^^^^^
AttributeError: 'str' object has no attribute 'get'

Can anyone help to find a solution for this? We have some invoices that need to printed very soon. Thanks in advance!

@Kienwall check this

Ok this looks like my problem. I´m trying to change the print.js now, but I can´t find it on my Synology DS920+. I know thats a kind of a stupid question, but I have no experience with Synology, can anyone please give me an advice, how to change the record correctly? Thanks!