Some test text!

Discord Logo

Chat with us

PDFTron is now Apryse, learn more here.

Cli / Guides / Remove PDF



PDFTron is now Apryse, learn more here.

Remove pages from PDF with command-line

To remove specific pages or page ranges from PDF documents, use -r or --remove option.


pagemaster (-r or --remove) <input file1>,<pagelist1>,<pagelist2>

The operation will remove the given pages (in each page-list) from the input files. For a detailed description of how to specify 'page-lists' as part of PDF merge operation, please refer to Section 4.8 of this user manual. The following are some additional examples of how to use 'page-lists' to customize the merging process:

By default, the files will be overwritten, but the -o option can be used to specify an output directory.

Please note that because PDF documents must contain at least one page, the 'remove' function cannot delete all pages in a document.


Remove page 1 of firstpageremoved.pdf:

pagemaster -r firstpageremoved.pdf,1

Remove the first page from all PDF documents located in MyPDFs folder and its sub-folders:

pagemaster -r MyPDFs,1 \--subfolders

Similar to above line, but save all files in the 'Output' folder instead of overwriting the originals: pagemaster -r MyPDFs,1 --subfolders

Remove all odd pages from 'in1.pdf' and all even pages from 'in2.pdf':

pagemaster -r in1.pdf,o in2.pdf,e

Remove all even pages as well as the odd pages between 1 and 10 (1, 3, 5, 7, 9):

pagemaster -r mixedpages.pdf,e,1-10

Get the answers you need: Support