This article is mainly about convert specific pages of CHM to PDF with the command line application VeryPDF CHM to PDF Converter Command Line.
CHM is the help file format which is widely used by software publishers to show the usage of software. With VeryPDF CHM to PDF Converter Command Line, you can not only convert the whole CHM file to PDF document, but also can select specified pages from a CHM file and convert them to PDF.
Just by following the instructions below, you can convert selected pages from a CHM file to PDF document.
Step 1. Download and install
First of all, please click the following button to download this application.
Then, please double click the downloaded file and follow the setup wizard to install it on the computer. After the installation, you can find an executable file named chm2pdf.exe which is the called program in the installed folder.
Step 2. Input commands
Please open MS-DOS command prompt window in which you are able to input commands at first. Then, please refer to the command line template shown below to input your own commands:
chm2pdf [options] <input file> <output file>
- chm2pdf: call the program.
- [options]: set parameters
- <input file>: specify the input CHM file
- <output file>: specify the output PDF document
To specify the pages, please use the following three options:
- -chp <int/int/int..>: Select a CHM chapter to convert to PDF.
- -chpft <int/…> <int/…> : Select a chapter or section range to convert. The chapters or sections must be under the same level.
- -pgft <int> <int>: Select a page range to convert.
chm2pdf -chp 2/1 input.chm output.pdf
chm2pdf -chpft 2/1 2/3 input.chm output.pdf
chm2pdf -pgft 1 25 input.chm output.pdf
The first example is to extract the first chapter of chapter two from a CHM file to PDF.
The second example is to select section 1, 2, 3 of chapter two from a CHM file to PDF.
The third example is to extract pages from 1 to 25 from a CHM file to PDF.
After inputting the commands, please hit the Enter button on the keyboard to run the commands.
Several seconds later, you can get the target PDF document in the specified location.
In the following snapshots, you can check the conversion effect.
Input CHM file
Output PDF file
This is the end of this article and you can get full version of VeryPDF CHM to PDF Converter Command Line here.