Some test text!

Search
Hamburger Icon

Cli / Guides / Batch PDF

Batch PDF editing with command-line

If the user specifies a folder rather than a specific PDF document, then all the PDF files inside of the folder will be processed in the specified way.

pagemaster <directory>|<password>,<page list 1>

that is, each file will be processed as if <directory> was the path of that file.

So, if directory pdf_files contained files pdf1.pdf pdf2.pdf and pdf3.pdf

pdf_files\|pass,1-10

would be equivalent to

pdf1.pdf|pass,1-10 pdf2.pdf|pass,1-10 pdf3.pdf|pass,1-10

PDF PageMaster also allows processing of subfolders, using the '--subfolders' option.

If '--subfolders' option is specified, the 'remove', 'insert' and 'split' functions will create the required subfolder directory structure at the output path, if required. (A directory is required if it contains PDF files or contains folders that are required.) The 'merge' function will merge all PDF files found in the subfolders into one PDF at the output location.

Examples:

The examples provided below are based on the following directory and file structure:

  • directory pdf_dir contains files p1.pdf p2.pdf and p3.pdf as well as directories

pdf_First and pdf_Second

  • directory pdf_First contains directories pdf_Third and pdf_Fourth

  • directory pdf_Second contains files p4.pdf and p5.pdf

  • directory pdf_Third contains file p6.pdf

  • directory pdf_Fourth contains only a text file ignored.txt

Merge files p1.pdf p2.pdf and p3.pdf and store the result in output.pdf:

pagemaster -m pdf_dir/ -o output.pdf

Merge files p1.pdf p2.pdf p3.pdf p4.pdf p5.pdf and p6.pdf and store the result in output.pdf:

pagemaster -m --subfolders pdf_dir/ -o output.pdf

Split files p1.pdf p2.pdf p3.pdf and store the resulting files p1_1-5.pdf p2_1-5.pdf and p3_1-5.pdf in output/

pagemaster -s pdf_dir/,1-5 -o output/

Create the directories output/pdf_First output/pdf_Second and output/pdf_First/pdf_Third,

split the files p1.pdf p2.pdf p3.pdf p4.pdf p5.pdf and p6.pdf and store the resulting files

p1_1-5.pdf p2_1-5.pdf and p3_1-5.pdf in output/, p4_1-5.pdf and p5_1-5.pdf

in output/pdf_Second/ and p6_1-5 in output/pdf_First/pdf_Third/ (pdf_Fourth is not created since it is not required):

pagemaster -s --subfolders pdf_dir/,1-5 -o output/

Remove the first page of p1.pdf, p2.pdf and p3.pdf:

pagemaster -r pdf_dir/,1

Remove the first page of p1.pdf, p2.pdf, p3.pdf, p4.pdf, p5.pdf and p6.pdf:

pagemaster -r --subfolders pdf_dir/,1

Append insert.pdf to p1.pdf, p2.pdf and p3.pdf:

pagemaster -i insert.pdf pdf\_dir/

Append insert.pdf to p1.pdf, p2.pdf, p3.pdf, p4.pdf, p5.pdf and p6.pdf:

pagemaster -i insert.pdf --subfolders pdf_dir/

Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales