Using Frappe Charts in Print Format


I’d like to use Frappe Charts ( in my print format.

For a trial-and-error approach, I copied the script from which worked fine when viewing the print in full-page mode. The regular preview and the PDF does not work.

I run Frappe Framework: v13.14.0 (version-13) in development mode.

Is there any guide to run custom javascript for print formats? Is storing the “resulting” HTML from a custom script into a DocType field the only way to run Javascript in the PDF preview?

Best regards