New Feature: Faster & Better Printing Backend 🎉

I am happy to announce integration of Chromium as an alternative PDF generation engine, replacing the previously used wkhtmltopdf.

Improvements:

  1. Support for CSS3 including ( grid, flexbox etc.)
  2. 2-3x Faster
  3. Better Debugging

I would request people to test their custom formats and share their experience. If you find any bugs please report them here.

Instructions to Install and use new backend

Notes

  1. Frappe Cloud is not supported for now press issue.
  2. Currently only latest version of develop branch of frappe framework and print_designer is supported.
15 Likes

Wow, this is huge.

Is this Frappe-wide, or just for Print Designer?

1 Like

It works with any print format ( Frappe-wide). you do however need to install print_designer.

2 Likes

Hi, Is the new backend supports erpnext V15 (Self Hosted) running in production mode or is it just for dev branch ??

I’m facing a similar issue while generating PDFs using
Frappe’s built-in PDF generator (Headless Chrome)
The problem occurs when the item description contains too many lines. The content either overflows, overlaps, or spills into the next page, breaking the table layout.
Here’s what I’ve tried:

  • Used page-break-inside: avoid; on <tr> and container <div>s.
  • Wrapped long descriptions inside a ql-editor div like this:
  • Played with CSS (padding, margin-top, etc.) to control spacing and breaks.
  • Even tried breaking the content into smaller chunks, but Headless Chrome doesn’t properly respect page breaks within table rows

What I want to achieve:

  • Either the full table row should shift to the next page,
  • Or the content should break cleanly across pages without breaking table borders or causing layout issues.

Has anyone found a reliable solution to this with Frappe’s Headless Chrome PDF engine?
Would appreciate any tips, alternate layout suggestions, or CSS fixes that worked for you!

Thanks!

I don’t know if this works with the new printing backend, but for wkhtmltopdf we use this workaround:

Then, in the print_format:

{% for description_part in split_quill(item.description) %}
    <tr>
        <td>{{ description_part }}</td>
    </tr>
{% endfor %}

So we essentially print one table row per paragraph of the description. And page breaks after each table row work nicely.

3 Likes