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
- Region:
+(Physical region) or-(Logical/Detail line). - Position: Byte offset in the file.
- Size: Size of the object in bytes.
- Compression: Ratio of compressed size / plain size (if stream).
- Filter: Applied filters (e.g.,
_Flatefor FlateDecode). - Type: Region type (e.g.,
ind_obj,xreftable,comment). - Reference: The Object ID (e.g.,
1,0for Object 1, Generation 0). - 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.