How to rotate the pages when convert HTML to PDF?

Why convert HTML to PDF?

HTML is the most widely used language for describing web pages. Web paged are HTML files. The Portable Document Format (PDF), the international standard (ISO 32000-1) for more secure and reliable distribution and exchange of electronic documents and forms. If you want to print HTML files, you’d better convert them to PDF files first. This is because not all printer can support HTML files, but theoretically, all the printers can print PDF files.

Why choose VeryPDF HTML Converter Command Line?

May be there are various HTML to PDF converter available on the internet; however, most of them cannot convert a whole long webpage to a single PDF page. Most of the HTML to PDF converters will convert a single webpage to multiple PDF pages, instead of converting one webpage to one PDF page. By the means of VeryPDF HTML Converter Command Line, you can easily solve this problem, and can perfectly convert a webpage to a single PDF page easily and accurately. VeryPDF HTML Converter Command Line is a powerful document converter, which can not only convert HTML to PDF, but also it can convert HTML and other formats like PCX and EMF To PDF. Moreover, VeryPDF HTML Converter Command Line support batch conversion, and also can be used to rotate the pages.

How to rotate the pages and batch convert HTML to PDF?

In order to rotate the pages, the command line should include the following command -rotate <int>, which can be used to rotate pages by an angle of degree 90, 180, or 270. Three steps are required to rotate the pages and batch convert HTML to PDF via a command line.

1. Open the command prompt window

It’s easy to open the command prompt window. It will only take four steps to open the command prompt window. You should: Click “Start”; > Click “Run” on the menu that appears on the computer screen; > Enter “cmd” in the “Run” dialog box, > Click “OK”.

clip_image002

2. Enter a command line

Generally speaking, the command should conclude four factors:

htmltools -rotate <int> <HTML file> <PDF file>

  • Factor 1: htmltools ---- the executable file
  • Factor 2: -rotate <int> ---- the command which can be used to rotate pages. The angle brackets are used to mark the essential content. int means integer. This command permits three parameter values, which are 90, 180, and 270.
  • Factor 3: <HTML file> ---- the input HTML file(s)
  • Factor 4: <PDF file> ---- the output PDF file(s)

Whenever you enter a command line, you should remember that the whole directories of the files, rather than only the names of the files, must appear in the command prompt window, because the directories can lead the computer to find the place where the files are store in. With no exception, when you enter the command line to rotate pages when batch convert HTML to PDF, you should enter the directories, too. Taking the following command line as an example,

D:\htmltools\htmltools.exe -rotate 90 D:\in\*.html D:\out\*.pdf

  • D:\htmltools\htmltools.exe is the directory of the executable file htmltools.exe. In the example, the directory shows that the executable file is in the folder htmltools on disc D. The example directory can be replaced by the actual directory of the executable file in your computer.
  • -rotate 90 is the command for bit depth setting. It specifies 90 as the angle degree. The number can be replaced by 180 or 270.
  • D:\in\*.html is the directory of the input files. This directory indicates that the input files are in HTML format, and they are in the folder in on disk D.
  • D:\out\*.pdf is the directory of output files. The file extension pdf in the command line indicates that the output format is PDF, and all the output files must be stored in the folder out on disk D. Both the directories of the input and output files can be substituted.

3. Press “Enter”

Click “Enter” on the keyboard, you can master the computer to batch convert HTML to PDF files right away. In a few seconds, you can view the effect of the output PDF files in the selected output folder. If you are interested in the methods of convert HTML to image files, you can also read the related articles at the knowledge base of VeryPDF. The following is the comparison between one original HTML file and the output PDF file.

Before

clip_image004

After

clip_image006

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

This entry was posted in HTML Converter (htmltools) and tagged , , , . Bookmark the permalink.

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!