pdfcpu

Logo

A PDF processor written in Go.

View the Project on GitHub pdfcpu/pdfcpu


Changelog

List Boxes

Have a look at some examples.

Usage

pdfcpu boxes list [-p(ages) selectedPages] -- [boxTypes] inFile


Flags

name description required
p(ages) selected pages no


Common Flags

name description values
v(erbose) turn on logging  
vv verbose logging  
q(uiet) quiet mode  
u(nit) display unit po(ints),in(ches),cm,mm
c(onf) config dir $path, disable
upw user password  
opw owner password  


Arguments

name description required
boxTypes comma separated list of box types: m(edia), c(rop), t(rim), b(leed), a(rt) no
inFile PDF input file yes


Examples

List all page boundaries of test.pdf:

$ pdfcpu box list test.pdf
listing mediaBox, cropBox, trimBox, bleedBox, artBox for upc.pdf
pages: all
Page 1: rot=+0 orientation:portrait
  MediaBox (points) (0.00, 0.00, 595.27, 841.89) w=595.27 h=841.89 ar=0.71 (inherited)
   CropBox (points) (0.00, 0.00, 595.27, 841.89) w=595.27 h=841.89 ar=0.71 (default)
   TrimBox (points) (0.00, 0.00, 595.27, 841.89) w=595.27 h=841.89 ar=0.71 (default)
  BleedBox (points) (0.00, 0.00, 595.27, 841.89) w=595.27 h=841.89 ar=0.71 (default)
    ArtBox (points) (0.00, 0.00, 595.27, 841.89) w=595.27 h=841.89 ar=0.71 (default)

Page 2: rot=+0 orientation:portrait
  MediaBox (points) (0.00, 0.00, 595.27, 841.89) w=595.27 h=841.89 ar=0.71 (inherited)
   CropBox (points) (0.00, 0.00, 595.27, 841.89) w=595.27 h=841.89 ar=0.71 (default)
   TrimBox (points) (0.00, 0.00, 595.27, 841.89) w=595.27 h=841.89 ar=0.71 (default)
  BleedBox (points) (0.00, 0.00, 595.27, 841.89) w=595.27 h=841.89 ar=0.71 (default)
    ArtBox (points) (0.00, 0.00, 595.27, 841.89) w=595.27 h=841.89 ar=0.71 (default)


List mediaBox and cropBox of page 1 of test.pdf using display unit cm:

$ pdfcpu box list -u cm -pages 1 -- "m,c" test.pdf
listing mediaBox, cropBox for test.pdf
pages: 1
Page 1: rot=+0 orientation:portrait
  MediaBox (cm) (0.00, 0.00, 21.00, 29.70) w=21.00 h=29.70 ar=0.71 (inherited)
   CropBox (cm) (0.00, 0.00, 21.00, 29.70) w=21.00 h=29.70 ar=0.71 (default)


Hint

The info command also prints page boundaries if the -pages flag is present.