How to combine several HTML files into one PDF file? How to run multiple concurrent instances of the software to convert documents to PDF files at same time?

Hello,

I'm testing your command line utility to try to batch convert HTML files into PDFs, and am running into an issue. If I can resolve it I'll be glad to adopt htmltools as my weapon of choice and pay for the licensing.

My PDFs are distorting (namely, they are stretched top-to bottom.) I have a very long webpage that I want to break into 8.5"x11" pages in the PDF. My HTML file has some built in pie graphs, so when they aren't round it is very apparent. When I open the page in Chrome and choose "Print to PDF" I don't have this issue. The command I'm using with your tool is:

htmltools.exe -width 612 -height 792 in.html out.pdf

I imagine this is a common issue in the scaling, can you advise?

Thanks,
Customer
------------------------------------------------------------
Thanks for your message, you may run following command lines to try again,

htmltools.exe -webkit in.html out.pdf
htmltools.exe -html2pdf2 in.html out.pdf
htmltools.exe -width 612 -height 792 -emfheight 792 in.html out.pdf

Can you get better PDF file with above command lines?

VeryPDF
------------------------------------------------------------
This does not resolve my issue. Webkit fixes the stretch, but my images don't load (.PNGs)

html2pdf2 throws an error

The last option still suffers from stretch.

Thank you so much for your help. I've attached a zip file with the HTML document as well as the images. I just want to get a standard sized (8.5"x11") multi-page PDF file built from the HTML file. The images are very important, so it is critical that they are not distorted (the graphs should be circles) and not cut in half between pages.

I don't have an Order ID yet, we wanted to be sure that the tool could produce the output we were looking for before we purchased it. I'm currently on a trial with about 250 attempts left.

Customer
------------------------------------------------------------
We suggest you may download and install "Document Converter (docPrint Pro) v6.0" from following URL,

https://www.verypdf.com/artprint/docprint_pro_setup.exe

after you installed it, you can run following command line to convert this HTML file to PDF file properly,

"C:\Program Files (x86)\docPrint Pro v6.0\doc2pdf.exe" -i D:\downloads\in\in.html -o D:\downloads\in\in.pdf

We hoping "Document Converter (docPrint Pro) v6.0" will work fine to you, please to try.

VeryPDF
------------------------------------------------------------
I've purchased the program, but when I run it using

doc2pdf.exe -i in.html -o out.pdf

I get stuck in a loop where it says
Waiting here (1)
Waiting here (2)
Waiting here (3)
Waiting here (4)
...

The file is created successfully, but the program is stuck. When I press the Break key it goes back to the prompt, and VeryPDF PDF Editor Tools opens. I don't want that, I need to run about 500 files through this program and can't have it get stuck.

Customer
------------------------------------------------------------
I've gotten it to work, albeit slowly, but my images are being cut off at the bottom of some pages. Please advise.

Customer
------------------------------------------------------------
The Image Cutting is caused by IE, you may open this web page in IE, print it to a PDF virtual printer and create a PDF file, you will notice these images be cutted too.

You can also open this web page in IE and check it in the print preview window, the output PDF file is same as the contents in print preview window.

VeryPDF
------------------------------------------------------------
Good Evening,

I am using doc2pdf, and need to combine multiple webpages (*.html) into one long PDF file. I cannot find the syntax for using multiple inputs, but
neither

doc2pdf -i page1.html -i page2.html -i page3.html -o output.pdf -O 2 -V

or

doc2pdf -i page1.html page2.html page3.html -o output.pdf -O 2 -V

or

doc2pdf -i *.html -o output.pdf -O 2 -V

seem to work, they create a page that looks to be from IE saying that navigation to the page was canceled.

Also, my documents have strange whitespace on the top and bottom of the page.

I've attached two html files I am trying to PDF into one. This is just a sample, it is actually a massive batch job I need to automate.

Also, the landscape orientation is critical

Thanks,
Customer
------------------------------------------------------------
Thanks for your message, you can run following command lines to merge several HTML files to a single PDF file,

"C:\Program Files (x86)\docPrint Pro v6.0\doc2pdf.exe" -p 2 -i D:\page1.html -o D:\out.pdf
"C:\Program Files (x86)\docPrint Pro v6.0\doc2pdf.exe" -p 2 -i D:\page2.html -o D:\out.pdf
"C:\Program Files (x86)\docPrint Pro v6.0\doc2pdf.exe" -p 2 -i D:\page3.html -o D:\out.pdf
"C:\Program Files (x86)\docPrint Pro v6.0\doc2pdf.exe" -p 2 -i D:\page4.html -o D:\out.pdf

>>Also, my documents have strange whitespace on the top and bottom of the page.

You may set "margin" options to try again, for example,

"C:\Program Files (x86)\docPrint Pro v6.0\doc2pdf.exe" -p 2 -s marginleft=0 -s margintop=0 -s marginright=0 -s marginbottom=0 -i D:\downloads\2070_048_page3_12.html -o D:\downloads\_out.pdf

Will "margin" options work better for you?

VeryPDF
------------------------------------------------------------
Hello,

Thank you for the quick reply. I am now able to combine multiple files, thanks! Setting the margins to 0 still does not correct the problem with the excessive margins.

Also, is it possible to run multiple concurrent sessions of the software? Running in parallel would greatly improve my ability to hit the deadlines I have.

Thanks,
Customer
------------------------------------------------------------
Yes, you can run multiple instances of doc2pdf.exe to convert more office files to PDF files at same time, but you need install more virtual PDF Printers first. You can use administrator privilege to run batchaddprinters.bat to install more virtual PDF Printers into your system first,

"C:\Program Files (x86)\docPrint Pro v6.0\psdriver\batchaddprinters.bat"

Then you can use "-s printer=auto" option to convert more documents to PDF files at same time,
-----------------------------------------
start "" ..\doc2pdf.exe -s printer=auto -s outdebuglog=1 -s nochangedefaultprinter=1 -i "%CD%\test.doc" -o "%CD%\test.doc.pdf"
start "" ..\doc2pdf.exe -s printer=auto -s outdebuglog=1 -s nochangedefaultprinter=1 -i "%CD%\test.docx" -o "%CD%\test.docx.pdf"
start "" ..\doc2pdf.exe -s printer=auto -s outdebuglog=1 -s nochangedefaultprinter=1 -i "%CD%\test.ppt" -o "%CD%\test.ppt.pdf"
start "" ..\doc2pdf.exe -s printer=auto -s outdebuglog=1 -s nochangedefaultprinter=1 -i "%CD%\test.pptx" -o "%CD%\test.pptx.pdf"
start "" ..\doc2pdf.exe -s printer=auto -s outdebuglog=1 -s nochangedefaultprinter=1 -i "%CD%\test.rtf" -o "%CD%\test.rtf.pdf"
start "" ..\doc2pdf.exe -s printer=auto -s outdebuglog=1 -s nochangedefaultprinter=1 -i "%CD%\test.xls" -o "%CD%\test.xls.pdf"
start "" ..\doc2pdf.exe -s printer=auto -s outdebuglog=1 -s nochangedefaultprinter=1 -i "%CD%\test.xlsx" -o "%CD%\test.xlsx.pdf"
start "" ..\doc2pdf.exe -s printer=auto -s outdebuglog=1 -s nochangedefaultprinter=1 -i "%CD%\test.doc" -o "%CD%\test1.doc.pdf"
start "" ..\doc2pdf.exe -s printer=auto -s outdebuglog=1 -s nochangedefaultprinter=1 -i "%CD%\test.doc" -o "%CD%\test2.doc.pdf"
-----------------------------------------

docPrint Pro v6.0 is include some test .bat files, you can run them and test concurrent conversion function easily,

"C:\Program Files (x86)\docPrint Pro v6.0\examples\test-concurrent-conversion-by-auto-choose-printer.bat"

"C:\Program Files (x86)\docPrint Pro v6.0\examples\test-concurrent-conversion-by-manual-choose-printer.bat"

"C:\Program Files (x86)\docPrint Pro v6.0\examples\test-batch-conversion.bat"

Here is another article for concurrent conversion function, we hoping it may useful to you,

https://www.verypdf.com/wordpress/201109/install-more-docprint-pdf-driver-printers-and-convert-more-documents-at-same-time-2340.html

VeryPDF

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!