Why is Frappe Still Using Wkhtmltopdf for PDF Generation?

Hi everyone,

I would like to raise a concern regarding the PDF generation engine currently used in Frappe/ERPNext — wkhtmltopdf.

As many of you probably know, wkhtmltopdf has been obsolete for years.
It has not received meaningful updates or improvements for a long time, and it struggles badly with modern web standards like:

Proper handling of position: fixed footers and headers.

Respecting margins and paddings across pages.

Complex CSS support (e.g., flexbox, grid, media queries).

Consistent rendering between browser preview and final PDFs.

Modern font rendering and Unicode support.

In addition, because wkhtmltopdf is based on an ancient, patched version of QtWebKit, it renders HTML and CSS very differently than any modern browser engine.
This leads to countless frustrations when trying to create clean, reliable, and consistent PDF print formats — especially when working with letterheads, footers, and multi-page documents.

Many other frameworks (like Django, Laravel, Node.js apps) have already moved to better solutions like:

WeasyPrint (Python-based, standards-compliant PDF generation)

Chromium Headless PDF rendering (modern, accurate browser rendering)

PDFKit alternatives

Considering the technological progress Frappe has made in so many areas,
why are we still relying on a deprecated, outdated, and limited library like wkhtmltopdf for such a critical functionality?

I respectfully propose that Frappe should prioritize the migration to a modern PDF generation engine that:

Supports full, current HTML5 and CSS3 standards.

Provides consistent rendering across different environments.

Is actively maintained and improved.

I am open to participating in any community effort to explore and test possible replacements.
I believe moving away from wkhtmltopdf would be a huge quality of life improvement for developers, designers, and end-users alike.

Thanks for reading,
Looking forward to hearing thoughts from the community and the Frappe team.

Hi @ezequiel:

Check this.

1 Like

The only problem is we use Frappe Cloud, it seems its is not supported.

Yes, and it is not clear if it is only for Print designer, or if they are going to change it in frappe.

In the configuration it seems that this is the intention, it lets you choose the rendering engine, but it is only wkhtmltopdf.

It works of Frappe Cloud if there is issue it should be fixed in some time.

You need to install Print Designer but it works for all formats.

1 Like