simple question about converting html to pdf


just trying to play with the command line version of htmltools. Before I buy and before I hand off to our internal support techies I was trying to convert a bunch of html files to pdf files

I had "htmltools c:\temp\in\*.html c:\temp\out\*.pdf" where the \in has the the html files and \out was the output directory.

but I'm getting an error response.

The windows version worked fine so I'm assuming I'm using the wrong command line. I need a separate file for each html file, the output file name should stay the same, and ideally I'd 200*200 resolution.

if there was a way of seeing what htmltool settings were set when running the windows version I'm sure i could sort it out myself but I'm in a hurry.


Thanks for your message, the latest version of htmltools.exe does support -webkit option, you can use this option to convert your HTML files to PDF files properly, e.g.,

htmltools -webkit c:\temp\in\test.html c:\temp\out\test.pdf

You can also use DOS FOR command line to the batch conversion, e.g.,

for %F in (c:\temp\in\*.html) do htmltools -webkit "%F" "c:\temp\out\%~nF.pdf"

Above command line will batch convert all HTML files in c:\temp\in\ folder to PDF files into c:\temp\out\ folder.

We hoping -webkit option will work fine to you, you may use it to try.


See Also:

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

Verify Code   If you cannot see the CheckCode image,please refresh the page again!