Disassembler Command

The disasm (disassemble) command dumps a flat, grep-friendly map of the PDF file's internal structure.

Usage

pdfsyntax disasm input.pdf

Output Format

The output contains columns describing the file layout:

+ 009 [70 ]            @- ind_obj   1,0           dict   /Catalog
+ 080 [48 ]            @- ind_obj   2,0           dict   /Outlines
+ 376 [121] 100% _     @- ind_obj   5,0           stream

Legend

  1. Region: + (Physical region) or - (Logical/Detail line).
  2. Position: Byte offset in the file.
  3. Size: Size of the object in bytes.
  4. Compression: Ratio of compressed size / plain size (if stream).
  5. Filter: Applied filters (e.g., _Flate for FlateDecode).
  6. Type: Region type (e.g., ind_obj, xreftable, comment).
  7. Reference: The Object ID (e.g., 1,0 for Object 1, Generation 0).
  8. Details: Dictionary keys or stream info.

Use Cases

This command is useful for debugging PDF corruption, understanding file overhead, or checking if specific objects (like /JS or /OpenAction) exist in the file.