Question:I want to write a program to use some external program to create a PDF file from many HTML files.But what confuses me is that I don't know if there is a command in Linux that I can use directly to finish my idea. I want to know if there is any command that I can use to create a PDF from an HTML file or many HTML files. Is there any solution on VeryPDF?
Answer: According to your needs, maybe you can have a free trial of this software: VeryPDF HTML to Any Converter Command Line, by which you can from an HTML file or many HTML files by command line under Linux version. Meanwhile this software also can help you convert HTML to images, PDF, PS, EPS, and Office document formats. Please check more information of this software on homepage, in the following part, let us check how to use this software.
- As this is Linux version, we have compressed it. When downloading finishes, please unpack it to your disk mounted in the Linux system. The executable program is in sub folder bin.
- This software supports Linux distributions of Debian, CentOS, Ubuntu, Fedora, Gentoo, openSUSE, Slackware, Arch, etc.
Step 2. Create PDF from HTML file under Linux.
- When you use this software, please refer to the usage and example.
- Usage: html2any [options] <input file> <output file>
- Here are some code examples for your reference.
- When from single HTML file under Linux, please refer to the following command line template:
- When you need to create PDF from HTML file, you can write some bat file.
- Here are some parameters for your reference:
html2any -disable-external-links http://www.verypdf.com/ _disable-external-links.pdf
By this above command line template,we can from HTML file and disable external links.
-disable-external-links : Remove external links.
-disable-internal-links : Remove internal links.
-disable-smart-shrinking : Disable the intelligent shrinking strategy used by WebKit that makes the pixel/DPI ratio none constant.
-dpi <DPI> : Change the DPI explicitly (this has no effect on X11 based systems).
-enable-plugins : Enable installed plugins (such as flash).
-ignore-load-errors : Ignore pages that claim to have encountered an error during loading.
-print-media-type : Use print media-type instead of screen.
-proxy <proxy> : Use a proxy.
-quiet : Be less verbose.
-read-args-from-stdin : Read command line arguments from stdin.
-redirect-delay <msec> : Wait some milliseconds for js-redirects (default 200).
There are more parameters and functions of this software, I can not list all of them here. Please check more on readme.txt file. During the using, if you have any question, please contact us as soon as possible.