ToolZoneX
Blog

PDF Object Counter

Count a PDF's pages, embedded images, fonts, annotations, links, and total indirect objects. Free, private, runs entirely in your browser.

Click to select a PDF file, or drag and drop

Your file never leaves your browser

What Gets Counted

A PDF is built from many internal objects, and not every count is equally easy to compute reliably in a browser. This tool reports the counts that @cantoo/pdf-lib's public API exposes reliably: the number of pages, unique embedded images referenced across all pages, distinct fonts declared in page resource dictionaries, all annotations(comments, stamps, links, form widgets, etc.), the subset of those that are link annotations, and the total number of indirect objects in the file — every object the PDF assigns its own object number, via context.enumerateIndirectObjects(). This last count is a good rough proxy for how structurally complex a PDF is internally.

How to Use It

  • Upload the PDF you want to analyze.
  • Click Count Objects to scan the entire document.
  • Review the breakdown of pages, images, fonts, annotations, links, and total indirect objects.

Example

A 15-page report might show 15 pages, 8 embedded images, 3 distinct fonts, 22 annotations (mostly links in a table of contents), 20 of which are links, and 340 total indirect objects — giving a quick sense of how much internal structure the file carries beyond just its visible page count.

Common Use Cases

  • Getting a quick structural fingerprint of a PDF before deciding whether to compress or optimize it.
  • Sanity-checking that a generated PDF contains the expected number of images or fonts.
  • Estimating how "heavy" or complex a PDF is internally relative to its visible page count.

FAQ

  • Why might the image or font count seem low? Counts are based on unique resources referenced in page resource dictionaries. Reused images or fonts across many pages are only counted once, and non-standard embeddings may not be detected.
  • What does "total indirect PDF objects" mean? Every object in a PDF that's referenced by number (rather than embedded inline) counts as one indirect object — this includes pages, fonts, images, annotations, and many internal dictionaries and streams, so it's typically much larger than any individual count above.
  • Does this include vector graphics or text runs? No — those live inside content streams rather than as separate countable objects with their own type, so they aren't broken out individually.
  • Is my file uploaded anywhere? No — everything runs entirely in your browser.