pdfcpu

Logo

PDF tooling for Go and the command line.

View the Project on GitHub pdfcpu/pdfcpu


Changelog
Future Directions

Remove Boxes

Have a look at some examples.

Usage

pdfcpu boxes remove boxTypes inFile [ outFile ] [flags]

Flags

namedescriptionrequired
p(ages)selected pagesno

Common Flags


Arguments

namedescriptionrequired
boxTypescomma separated list of box types: c(rop), t(rim), b(leed), a(rt)yes
inFilePDF input file, use - to read from stdinyes
outFilePDF output file, use - to write to stdoutno

Examples

Remove all page boundaries other than Media Box for page 2 of in.pdf:

$ pdfcpu boxes remove 'c,b,a,t' in.pdf out.pdf --pages 2
removing cropBox, trimBox, bleedBox, artBox for in.pdf
writing out.pdf...

Remove Crop Box for all pages of in.pdf:

$ pdfcpu boxes remove 'crop' in.pdf out.pdf
removing cropBox for in.pdf
writing out.pdf...
pages: all

Remove page boundaries while reading the PDF from stdin:

$ aws s3 cp s3://acme-print/ad-boxes.pdf - \
   | pdfcpu boxes remove 'trim,bleed' - - \
   | aws s3 cp - s3://acme-print/ad-clean-boxes.pdf