Analyze the space usage of a PDF

The space usage is available starting with pdfToolbox 16

The space usage tool in pdfToolbox analyzes a PDF file in detail and shows exactly how much space each component of the PDF file takes up. By providing a precise byte-by-byte breakdown, it helps to identify which elements are consuming the most space.

To access the space usage in pdfToolbox, simply click on the pie chart icon in the lower menu bar in pdfToolbox Desktop. This will open the space usage dialog:

pdfToolbox Desktop interface with a test file and the new pie chart icon in the bottom menu bar.

The space usage provides a detailed breakdown of the total number of bytes used for specific document elements. These elements are grouped into different categories such as:

  • Page content streams
  • Extended graphics state
  • Color spaces
  • Fonts
  • Images
  • Annotations
  • Shadings
  • And more...

The total space usage for each of the categories is provided based on the size of the objects. The sizes are reported in bytes and as a percentage, so you can see the proportional contribution of each category to the total file size.

The total file size is displayed at the bottom. This total is the sum of all categories.

Space usage dialog in pdfToolbox Desktop

In the example shown in the screenshot, the PDF file has a size of 37.2 MB (37,248,102 bytes). The space usage shows that 91.57% of the space is used by images. This indicates that the file contains high-resolution images that contribute significantly to its large file size.

Reducing the file size

In addition to analyzing space usage, it also allows you to reduce file size by removing data from the PDF. This can include

  • Embedded files
  • Annotations
  • Form data
  • Private data from other applications
  • XFA forms
  • Multimedia
  • Object level metadata
  • Structure information

To remove the data, select one or more checkboxes in the fourth column of the table and click OK to proceed. This will bring up a "Save as" dialog. When the PDF is saved, the selected data will be removed.

Remove data inside of the space usage dialog