Link

Inspect the contents of PDF files with the JPedal Inspector

If you do not have JPedal, you can download a trial copy from here.

View the contents of PDF files from Command Line or another language

To start JPedal in inspect mode, pass the --inspect parameter via the command line:

java -jar jpedal.jar --inspect "pdfFile.pdf"

Features:

Many new features to follow!

View the Cross-References

Click ‘View’ then ‘Xref’. The Cross-Reference Viewer allows you to view the list of objects which are stored in the Cross-Reference table and Cross-Reference streams. You may click on an object to view its contents in the right-hand pane.

Xref Window

Pause decoding at a specific command

You can pause the decoding of a PDF file at a specific command. This can be achieved using the slider, the cassette buttons, or the text field. Each command is highlighted in blue in the right-hand pane. Any associated data is displayed above the command it came from.

You may also set breakpoints by selecting a command. Breakpoints are displayed with red boxes. The resume button underneath the command pane will advance to the next breakpoint. The button on the far right will clear all the breakpoints.

Limit Decoder

View the object tree

Object Tree

Click ‘View’ then ‘Objects’. The Object Viewer allows you to view the internal structure of a PDF file and discover how objects are related to each other. Each object in the tree displays its reference, its type, and its /Type key if it has one. You may click on an object to view its contents in the right-hand pane.

Object highlighting

When you view an object from the Cross-Reference Viewer or the Object Viewer, its contents will be highlighted. Below are the colors used and what they correspond to.

Object Color
Dictionary Key Orange
Dictionary Value Cyan
Object Reference Red
Number Purple
Boolean Green
String Blue
Hexadecimal Blue

View images

You can view the images which are stored inside a PDF file. Images are typically stored as XObjects or as data to an ID command. The JPedal Inspector supports both.

There are three ways you can view images in the Inspector:

  1. Find the XObject in the Cross-Reference Viewer and press ‘Show Image’
  2. Find the XObject in the Object Viewer and press ‘Show Image’
  3. Find a DO or ID command in the command window, right-click and press ‘View Image’ or ‘View Inline Image’

View streams

You can decode and view the contents of a stream by opening the Cross-Reference Viewer or Object Viewer and pressing ‘Decode Stream’