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
Comments
Do you mean Intersystems Reports?
https://docs.intersystems.com/components/csp/docbook/Doc.View.cls?KEY=G…
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.
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.
We have been using fop for years to create our PDF documents to our complete satisfaction.