A PDF that looked wrong
Early on October 12, Nikolas tried Share PDF, new in Kremio’s first test build, and thought the PDF looked different from the desk’s print view. It wasn’t. Both used the site’s PDF engine, which on our own site was wkhtmltopdf, Frappe’s default. The “None” box at the top was ERPNext’s default letter head, which prints {{ doc.company }} and so shows “None” on DocTypes with no company field, such as File and Contact.
What we found instead
Comparing the two engines on a dev bench led us to Chrome, the other one Frappe 16 offers.
That mattered well beyond Kremio. ERPNext 16’s own report print formats, General Ledger, Trial Balance and others, are set to use Chrome, so they were broken on every site too. (Its newer builder formats use WeasyPrint, which worked.) We reproduced the failure on a dev bench and checked the approved image directly.
Three options
- Keep wkhtmltopdf, Frappe’s default. It’s an old WebKit, and the Chrome-pinned report formats stay broken.
- Bake Chrome into the image, pinned by SHA-256, and make it the engine everywhere.
- Render the print HTML on the phone. That only fixes the app, and it needs signed-in access to the site’s assets.
We chose the second and recorded it as a decision: Chrome is the required PDF engine on Infinary sites, and wkhtmltopdf isn’t supported. The desk, email attachments and Kremio now use one engine, and ERPNext’s Chrome report formats work. A baked binary also survives image swaps and never downloads anything at runtime.
What changed
The three changes merged in order a little before 7 am, and the image built and passed its PDF check.
Keeping it current
The rule in the image’s README is to follow the Chrome version Frappe itself downloads, because Frappe’s code talks to Chrome directly and hasn’t been released against newer ones. When we moved the image to Frappe 16.52.0 on October 16, print_utils.py still named 133.0.6943.35, so the pin stayed. That upgrade’s local check printed a submitted Sales Invoice through the desk’s PDF route with the baked Chrome: 200 application/pdf, 72 KB, one page, in 0.4 s, and no download.
What we haven’t checked
Every v16 image since October 12 carries Chrome, and our own site has run one since at least October 15. What we haven’t done yet is the check on the site itself: that Print Settings says Chrome after the patch, and that a General Ledger PDF renders from the desk and from the phone. It’s still on our list.