You may have already known how to delete pdf pages by using Advanced PDF Tools Command Line https://www.verypdf.com/wordpress/201112/delete-pdf-pages-using-command-line-15662.html. But have ever considered how to insert pdf pages, following the below steps, you will master how to insert pdf pages to a pdf file by using Advanced PDF Tools Command Line.
This article will use---insert pages specified by page range (/1,2-4,9) of d:\pdf1.pdf and page 1,3 of d:\pdf2.pdf into d:\input.pdf before second page---as example to illustrate.
First step—Downloading
Follow this link you will obtain Advanced PDF Tools
https://www.verypdf.com/pdfinfoeditor/advanced_pdf_tools_cmd.zip
The whole package is just of 3.04 MB, making the download swiftly, do remember to extract it, for it is a zipped package.
Second step—Launching
You are bound to launch MS-DOS command prompt window. Because the command line is bound to be operated under the MS-DOS environment. The procedure is easy, and the following pictures will guide you.
1) click “start” and then go to “Run”
2) input cmd into the following
3) press “ok”, you will find MS-DOS command prompt window popping up
Third step—Inputting
input command line to insert pdf pages to a pdf file
it goes below
pdftools.exe -i “C:\input.pdf” -o “C:\output.pdf” "-*" "2|0|d:\pdf1.pdf/1,2-4,9|d:\pdf2.pdf/1,3"
where
- the option -i is to specify a pdf filename or a directory for input,
- the option -o is to specify the pdf file name for output,
- "-*" "2|0|d:\pdf1.pdf/1,2-4,9|d:\pdf2.pdf/1,3" : -*” is to insert pdf pages, 2 means source file’s page number, 0 means before.
so the command line can be paraphrased as insert pages specified by page range (/1,2-4,9) of d:\pdf1.pdf and page 1,3 of d:\pdf2.pdf into d:\input.pdf before second page.
when the input is done, press “enter” key, you will see
Fourth step—Checking
open the file to check the result, the VeryPDF.com makes a comparison below
Before
After
Through the contrast, you can find totally 7 pages have been inserted, they are 1,2-4,9 of d:\pdf1.pdf and page 1,3 of d:\pdf2.pdf respectively and indicated by black circle.