pdfcpu

Logo

PDF tooling for Go and the command line.

View the Project on GitHub pdfcpu/pdfcpu


Changelog
Future Directions

Insert Pages

This command inserts empty pages:

Have a look at some examples.

Usage

pdfcpu pages insert [ description ] inFile [ outFile ] [flags]

Flags

namedescriptionrequiredvaluesdefault
p(ages)selected pagesno
m(ode)nobefore, afterbefore

Common Flags


Arguments

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

Examples

Insert an empty page before every page of in.pdf. This way you get a PDF that gives you space for adding annotations for pages:

$ pdfcpu pages insert in.pdf
writing in.pdf...

Insert an empty page before pages 1 to 5:

$ pdfcpu pages insert in.pdf out.pdf --pages 1-5
writing out.pdf...

Insert an empty page after the last page:

$ pdfcpu pages insert in.pdf out.pdf --pages l --mode after 
writing out.pdf...

Insert a page into streamed input and upload the result:

$ aws s3 cp s3://acme-forms/packet.pdf - \
   | pdfcpu pages insert --pages 1 - - \
   | aws s3 cp - s3://acme-forms/packet-with-cover.pdf