Try ERPNext Buy Support Partners Foundation

Pdf's not looking nice as html documents (assume CSS missing)

Continuing the discussion from V11 pdf file don't apply css and image:

I am having trouble with the pdf’s created on my v11.1.16 instance (wkhtmltopdf 0.12.4 (with patched qt)) I know this is not the most recent version of wkhtmltopdf but should work still though

From other Topics in this regards I figure it’s the CSS which is not being processed between html and the pdf created

Full Page view

pdf view

tried, did not change anything. Is there any other advice out there?

I’m having the exact same issue- fonts load fine, but the CSS (grid/alignment) formatting is stripped out and the print is resized to ~65% of what it should be.



(plus a few others)


  • did the libssl1 install, then updated wkhtmltopdf to the latest version 0.12.5
  • added “http_port”: 443 to my site_config
  • reset server hostname via hostnamectl {sitename}
  • tried with all firewalls down
  • ran ‘bench use’ and ‘bench setup nginx’ as well as ‘use-url https’, etc
  • half a dozen other things mentioned in various other fixes; then reset, and cleanly did just the basics listed above again.

I got nothing. Still doing this with custom print formats as well as core- both saving to pdf as well as trying to actually print.

The ability to print invoices is kind of super business-critical if anyone has any suggestions, they are greatly longed for.

1 Like

Try this:

Just change “http://localhost:8000” to the URL of your server.


that solved it for me, hurrah!

cd /home/frappe/frappe/bench
bench --site set-config hostname ""

thx @bkm for pointing me towards the right direction

@chancegold please kindly let us know whether this fix solves it on your end as well. Then we can close this Topic