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 [ boxTypes ] inFile [flags]

Flags

namedescriptionrequired
p(ages)selected pagesno

Common Flags


Arguments

namedescriptionrequired
boxTypescomma separated list of box types: m(edia), c(rop), t(rim), b(leed), a(rt)no
inFilePDF input fileyes

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 'm,c' test.pdf --pages 1 --unit cm
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.