I’m encountering several issues related to printing invoices on Frappe/ERPNext Version 15. Specifically, I’m having trouble with the following:
Printing invoices and generating PDFs
Setting up Print Formats
The new Print Designer app
When using the default print format for Sales Orders (“Sales Order PD v2”), it’s throwing errors and failing to generate a proper output. However, when I remove this format, I’m able to view and print the PDF, but the resulting format is messy and unsuitable for my prospective clients.
The Print Designer app also has several bugs related to formatting. I’m unable to achieve the desired print output, and I can’t delete elements from the canvas. Additionally, PDF generation isn’t functioning as expected.
Here are the versions of the installed apps:
Frappe CRM: v2.0.0-dev
Ecommerce Integrations: v1.17.0
ERPNext: v15.36.0
Frappe Framework: v15.41.0
Frappe HR: v15.29.0
Frappe Insights: v3.0.0
Payments: v0.0.1
Print Designer: v1.2.0 AND v1.4.2
Has anyone else encountered similar issues or found a solution? Any advice or guidance would be greatly appreciated!
Is this Frappe cloud or self hosted? If self hosted, pdf problems are sometimes due to wkhtml2pdf. Check that wkhtmltopdf (version 0.12.5 with patched qt) is installed.
It is self-hosted with wkhtmltopdf 0.12.6.1 (with patched qt). I can view and print the ugly PDF format when removing the “Sales Order PD v2” from the print format input field. I installed the Print Designer App and it is full of bugs/issues. I am looking to create a custom sales order PDF template for my first client and my company too.
hi @edardev
i had a case like yours in an invoice in a custom app and as you mentioned the print_designer can’t be used it’s not ready yet, I had to create a custom print format using jinja and CSS unfortunately the bootstrap didn’t work in print format frappe v15-x-develop, also i had to set my doctype as a custom to set a default print format for it.
Yes, I agree we are on the same page. I deployed another instance with the following versions, without the Print Designer App, and it seems to be working without the issues mentioned earlier. However, I now need to find a way to customize the Print Format somehow using jinja and CSS unfortunately.
When trying to create a format using the Print Designer app, it’s not working either. Additionally, I cannot delete elements from the canvas while designing the format. I’ve reported the issue on GitHub, and I’d be happy to share more details about the problems I encountered.
Was it fixed today? I tried using the ‘develop’ branch yesterday, but it didn’t work. I also created a new custom Docker image today with the ‘main’ branch, but that didn’t work either. If it was fixed today, I’ll create another Docker image to test it. Thanks in advance!
Good News First:
Yes! The delete functionality in the Print Designer App is now working as expected .
Bad News Second:
However, creating a new print format with the Print Designer App is still causing issues. It’s throwing errors, and I’m unable to preview or print the file, just like what happened with the “Sales Order PD v2” on the latest versions of Frappe/ERPNext.
Why do the latest versions of ERPNext and the Print Designer app work seamlessly on Frappe Cloud for printing invoices, receipts, and custom print formats, while I encounter broken functionalities when using various versions of Frappe, ERPNext, and Print Designer including the latest and same version using different installation methods? What might I be missing?
I’m eager to contribute to the Frappe ecosystem and help improve user experience and integrations. In the meantime, I’ve found a temporary workaround to print custom invoices using the Print Designer app, while awaiting future bug fixes.
Temporary Solution:
Create a custom Print Format with the New Print Designer App.
Select the dynamic data for a specific invoice and save it.
A preview will be generated as a JPG image.
Navigate to the File List, download the image, and then convert the JPG to a PDF.
This workaround can be used until the issues are addressed in upcoming releases.
I’ve installed two older versions of ERPNext as well as the latest version, and the issue with using a custom Print Format template only occurs when the Print Designer app is also installed. Additionally, when the Print Designer is installed, the default print format is set to “Sales Order PD v2,” which immediately triggers an error, even if you attempt to switch to another custom template and change the default print template too.
Without the Print Designer app, the document displays fine. However, I need a custom template for my customer, and during a demo, he specifically requested this feature. Unfortunately, the feature was broken, and the demo didn’t go as planned.
I tested the latest “main” branch, and the issue with deleting items has been resolved, similar to the “develop” branch. However, we’re still encountering issues when printing new sales orders, sales invoices, and other documents using the “Print Designer” app.
Identified Issues:
Default Templates: It seems that default templates are not being generated, which prevents them from being located or used during the printing and preview process.
We switched back and forth between the “develop” and “main” branches but are still encountering printing issues, even after creating new print formats and setting them as the default. Occasionally, creating a new custom user permission for the preview JPG file resolves the issue temporarily, allowing us to print, but it suddenly stops working again without any clear reason.
I appreciate the creator’s ongoing efforts to address this issue, as I’ve noticed recent updates and GitHub commits. However, we are still experiencing challenges.
Could you kindly assist in further investigating these problems? Any guidance on ensuring that default templates are properly generated and resolving the recurring permission errors would be greatly appreciated.