A PDF processor written in Go.
View the Project on GitHub pdfcpu/pdfcpu
This command removes selected page boundaries for selected pages.
Media Box can’t be removed since it is mandatory and may be inherited.
Media Box is mandatory and serves as default/parent box for Crop Box.
Crop Box serves as default/parent box for Art Box, Bleed Box and Trim Box.
Have a look at some examples.
pdfcpu boxes remove [-p(ages) selectedPages] -- boxTypes inFile [outFile]
name | description | required |
---|---|---|
p(ages) | selected pages | no |
name | description | values |
---|---|---|
v(erbose) | turn on logging | |
vv | verbose logging | |
q(uiet) | quiet mode | |
-o(ffline) | disable http traffic | |
c(onf) | config dir | $path, disable |
opw | owner password | |
upw | user password | |
u(nit) | display unit | po(ints),in(ches),cm,mm |
name | description | required |
---|---|---|
boxTypes | comma separated list of box types: c(rop), t(rim), b(leed), a(rt) | yes |
inFile | PDF input file | yes |
outFile | PDF output file | no |
Remove all page boundaries other than Media Box for page 2 of in.pdf:
$ pdfcpu box rem -pages 2 -- "c,b,a,t" in.pdf out.pdf
removing cropBox, trimBox, bleedBox, artBox for in.pdf
writing out.pdf...
Remove Crop Box for all pages of in.pdf:
$ pdfcpu box rem -- "crop" in.pdf out.pdf
removing cropBox for in.pdf
writing out.pdf...
pages: all