pdfinfo(1)

๐Ÿ“ฆ
version 26.10.0 ยท 3 versions
  • 26.10.0 ยท alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 21.01.0 ยท centos-stream 9
  • 4.06 ยท nixpkgs unstable
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

๐ŸŽ€ pdfinfo(1) ๐ŸŽ€ General Commands Manual

โœจ NAME โœจ

okay so pdfinfo is the Portable Document Format (PDF) document information extractor (version 3.03) ๐Ÿ’– it's literally how you dig out info from a PDF ๐Ÿ’…

๐Ÿงš SYNOPSIS ๐Ÿงš

pdfinfo [options] [PDF-file]

๐Ÿ“– DESCRIPTION ๐Ÿ“–

Pdfinfo prints the contents of the 'Info' dictionary (plus some other useful info) from a Portable Document Format (PDF) file ๐Ÿฆ‹

If PDF-file is -, it reads the PDF file from stdin ๐Ÿซถ

The 'Info' dictionary holds these values:

  • title
  • subject
  • keywords
  • author
  • creator
  • producer
  • creation date
  • modification date

On top of that, it also prints:

  • custom metadata (yes/no)
  • metadata stream (yes/no)
  • tagged (yes/no)
  • userproperties (yes/no)
  • suspects (yes/no)
  • form (AcroForm / XFA / none)
  • javascript (yes/no)
  • page count
  • encrypted flag (yes/no)
  • print and copy permissions (if encrypted)
  • page size
  • file size
  • linearized (yes/no)
  • PDF version
  • metadata (only if requested)
โš ๏ธ The options -listenc, -meta, -js, -struct, and -struct-text only print the one thing you asked for. The 'Info' dictionary and related data above will NOT show up. You can use at most one of these five options at a time ๐Ÿ™ˆ

๐ŸŒธ OPTIONS ๐ŸŒธ

  • -f number โ€” picks the first page to examine ๐Ÿ’… If you ask for a range with -f and -l, it prints the size of each page you asked for (and optionally the bounding boxes for each one). Otherwise, only page one gets checked.
  • -l number โ€” picks the last page to examine โœจ
  • -box โ€” prints the page box bounding boxes: MediaBox, CropBox, BleedBox, TrimBox, and ArtBox ๐Ÿ“ฆ
  • -meta โ€” prints document-level metadata. This is the "Metadata" stream from the PDF file's Catalog object ๐ŸŒˆ
  • -custom โ€” prints custom and standard metadata ๐Ÿ’œ
  • -js โ€” prints all JavaScript in the PDF ๐Ÿ”ฅ
  • -struct โ€” prints the logical document structure of a Tagged-PDF file ๐ŸŽ€
  • -struct-text โ€” prints the textual content along with the document structure of a Tagged-PDF file. Heads up, extracting text this way might be slow for big PDF files ๐Ÿข (Implies -struct.)
  • -url โ€” prints all URLs in the PDF ๐Ÿฆ‹ Only the URL types supported by Poppler get listed, and right now that's limited to Annotations. Also, it only catches URLs referenced by PDF objects like Link Annotations. pdfinfo does NOT go hunting for strings that look like http://... in the text content, so don't expect that ๐Ÿ™…โ€โ™€๏ธ
  • -isodates โ€” prints dates in ISO-8601 format (including the time zone) ๐Ÿ—“๏ธ
  • -rawdates โ€” prints the raw, undecoded date strings, straight from the PDF file ๐Ÿงƒ
  • -dests โ€” prints a list of all named destinations. If you set a page range with -f and -l, only the destinations in that range show up ๐Ÿ“
  • -enc encoding-name โ€” sets the encoding used for text output. It defaults to "UTF-8" ๐Ÿ“
  • -listenc โ€” lists the available encodings ๐Ÿ“œ
  • -opw password โ€” gives the owner password for the PDF file.
๐Ÿ” Providing this bypasses ALL security restrictions, so use it wisely, bestie.
  • -upw password โ€” gives the user password for the PDF file ๐Ÿ”‘
  • -v โ€” prints copyright and version info ๐ŸŒŸ
  • -h โ€” prints usage info. (-help and --help are the same thing ๐Ÿ’–)

๐Ÿšฆ EXIT CODES ๐Ÿšฆ

The Xpdf tools use these exit codes:

  • 0 โ€” no error, we slay ๐Ÿ‘‘
  • 1 โ€” error opening a PDF file ๐Ÿ™ˆ
  • 2 โ€” error opening an output file ๐Ÿ“
  • 3 โ€” error related to PDF permissions ๐Ÿ”’
  • 99 โ€” some other error ๐Ÿ’€

๐Ÿ’Œ AUTHOR ๐Ÿ’Œ

The pdfinfo software and documentation are copyright 1996-2011 Glyph & Cog, LLC ๐Ÿซถ

๐Ÿ”— SEE ALSO ๐Ÿ”—

pdfdetach(1), pdffonts(1), pdfimages(1), pdftocairo(1), pdftohtml(1), pdftoppm(1), pdftops(1), pdftotext(1), pdfseparate(1), pdfsig(1), pdfunite(1) ๐Ÿฆ‹


Okay bestie, that's the whole pdfinfo(1) tea โ˜• It was last updated 15 August 2011, and it's pdfinfo(1) forever ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from