pdfcpu

Logo

PDF tooling for Go and the command line.

View the Project on GitHub pdfcpu/pdfcpu


Changelog
Future Directions

Remove Pages

This command removes all selected pages from a PDF file. Have a look at some examples.

Usage

pdfcpu pages remove inFile [ outFile ] [flags]

Flags

namedescriptionrequired
p(ages)selected pagesyes

Common Flags


Arguments

namedescriptionrequired
inFilePDF input file, use - to read from stdinyes
outFilePDF output file, use - to write to stdoutno

Examples

Remove pages 1-3 and 5 from notes.pdf:

$ pdfcpu pages remove notes.pdf --pages 1-3,5
removing pages from notes.pdf ...
writing notes_new.pdf ...

Remove pages from streamed input and upload the result:

$ aws s3 cp s3://acme-forms/packet.pdf - \
   | pdfcpu pages remove --pages 2 - - \
   | aws s3 cp - s3://acme-forms/packet-without-page-2.pdf