Print Preview using custom Print Format throwing error

I have custom print format for Payment Request, when i select it and click Print button it will show an error:

I also tried alternative way by replicating “Standard” print format and straightaway click Print button using the new print format. It is also showing an error.

Anybody can help to solve my issue?

Is the default standard print working properly?
If not, it could be an installation issue of wkhtmltopdf.

If the error only occurs for that particular custom print, then it might be an issue with the jinja code written on that custom print format.

The standard print working properly.
But once I create New Print Format without do any further changes (Clicking “Try the new Print Format Builder” → Action = Create New), it also throwing error.

How to check the jinja code?

Here what my print format looks like

Do this

bench --site <YOUR_SITE_NAME> migrate
bench --site <YOUR_SITE_NAME> build

please share the version details

Click on the edit format and remove all the fields one by one to see if any field data is causing the issue.

But if the standard print format is causing the issue, then could you please create a new print format with the “is custom” check box checked, and in the html box type the following


Save it and go to the document for which you created this print format for and try printing it. If the same error shows up, then it’s probably a wkhtmltopdf installation issue.

Hi @Antony_Praveenkumar ,
Here my version details:

ERPNext: v14.40.0 (version-14)

Frappe Framework: v14.50.0 (version-14)

Frappe HR: v14.11.0 (version-14)

Hi @Void_Moon , seems if “is custom” is checked and I type {{}} in the html box everything is working well.
There is no error.

What your insight then with this case?

I tried to remove all the fields one by one until i left Header only like below:

The error still persist

Then it seems like a problem with the installation of frappe itself… Is this a frappe cloud server or your own local instance?

My own local instance.
do you know which part seems become the problem?