Insert pdf pages to a pdf file using command line

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”

start

Run

2) input cmd into the following

Run

3) press “ok”, you will find MS-DOS command prompt window popping up

command prompt

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

  1. the option -i is to specify a pdf filename or a directory for input,
  2. the option -o is to specify the pdf file name for output,
  3. "-*" "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

command prompt

Fourth step—Checking

open the file to check the result, the VeryPDF.com makes a comparison below

input file

                                                      Before

output file

                                                   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.

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!