Try ERPNext Try Frappe Cloud Buy Support Partners Foundation

Include DPI parameter into PDF options


I would like to propose the following feature request:

ERPNext: v12.16.2 (version-12)

Frappe Framework: v12.13.0 (version-12)

Problem description
The current implementation uses a default or hardcoded DPI setting for the PDF output (refer to the latest post in Wkhtmltopdf 0.12.3 SSL Errors on Debian 9). This leads to problems (e.g. character spacing and shape) with several fonts, that apparently need a higher DPI setting.

Current workaround
Right now, I added a line to the options defaults in the function “prepare_options” in with a custom DPI setting (e.g. “dpi”: 300). This leads to a difference of the code to the production branch thus breaking “bench update”. I therefore have to restore the file before each update.

Proposed solution
Please add an option parameter like “page-size”, “orientation” or the margins for DPI. Using this parameter users could overwrite the default setting using the custom print formats thus leaving the code unchanged.

Best regards,

1 Like

Agree, would be great to have the dpi settable :+1:

I have a function in my backlog to add product specs to a quotation print, dpi would be very helpful