Question john.smith4237 · Mar 12

Convert HTML to PDF

Hi Guys,

We currently use wkhtmltopdf to convert our html based Zen page reports to PDF using in windows, but because we are now moving to IRIS running in a container we can use that anymore and I've been told that IRIS does have some kind of tool kit or utility that can do similar job and I'm not talking about  GenerateReport() methond in zen reports?

Thanks 

Product version: IRIS 2024.3

Comments

Ian Minshall · Mar 13

If you like dismantling InterSystems code. IS use fop at its base to create PDF's.

Follow the method ##class(Ens.Config.Production).CreateDocumentPDF(..)

and if you drill down you will come to the $Z(-100) call in the class Ens.Util.Documentation, and how to set it up to create the PDF. You will need a XSLT to transform the HTML to something it can read.

0
Julian Matthews · Mar 13

Hey John.

I know it's not a direct answer to what you're looking to do, but we ended up writing a nodeJS app that acts an API that we pass HTML to and it returns a PDF, and we then have an Operation we call this API with.

0
PagerianDevelper · Apr 11

We have been using fop for years to create our PDF documents to our complete satisfaction.

0