Hi Vivek,
We bought a license for CoolUtils (coolutils.com), whch also has command line functionality. There are dozens of different converters with CoolUtils, but you can buy just the one.
We use a batch file for the command line, which will take two parameters, and an "option file" (used by the converter):
"C:\Program Files (x86)\TotalHTMLConverter\HTMLConverter.exe" "%1" "%2" -c pdf -fp -combine -si -pc Normal -ps letter -OptionFile %3
then call the batch file using $zf:
set command=dir_"Converters\html\ConvertHtmlToPDF.BAT"
set params(1)=fromHTMLfilename
set params(2)=toPDFfilename
set params(3)=OptionFileName
; NEXT: $ZF(-1) NOT USED BECAUSE ANY PROBLEM WITH THE CONVERTER PROGRAM WOULD CAUSE THIS PROCESS TO HANG UNTIL ETERNITY!!!
; Fire off HTML>PDF Converter program in background (-2 = don't wait)
s status=$ZF(-100,"/ASYNC",command,.params)
The OptionFile has PDF codes like:
po=Landscape
PgHead=&b&d &t
PgFoot=&bPage &p of &P&bInsights powered by RevenueHealth Systems (C) 2018
I used the utility's "Command Line Parameters" help file to figure out how to set all the options, and how to use the option file. I wrote a note to myself to "See http://www.verydoc.com/htmlprint-footer-header.html" for use on the pdf codes that are in the option file.
It took a while, and I had to program in a new "language" of PDF options and stuff.
Good luck!
- Log in to post comments
.png)
.png)
.png)
.png)