How many parts does your PDF really contain? Every PDF is built from numbered objects, and the PDF Object Counter tallies them for you.
You choose one PDF, and the tool shows six numbers in a small results box. It only reports. It never edits or saves your file, so it suits anyone curious about how a PDF is put together.
Table of Contents
- What the PDF Object Counter Shows
- How to Use the PDF Object Counter
- How It Works
- A Sample Walkthrough
- How to Read the Results
- Why Counts Differ Between Files
- Privacy and File Handling
- Limitations
- FAQs About the PDF Object Counter
What the PDF Object Counter Shows
The results box is titled "PDF Indirect Object Metrics:". It lists six lines.
- Total Indirect Objects: every numbered object the PDF library reads, including objects packed inside compressed object streams.
- Stream Objects: how many of those objects are streams, which hold page content, images, and font data.
- Streams With a Compression Filter: how many streams carry a /Filter entry in their dictionary.
- Font Objects: every font dictionary, not counting the CID descendant fonts that belong to a composite font.
- Embedded Font Files: font descriptors that point to an actual font file stored in the PDF.
- Document Pages: the page count of the document.
There is no button and no download. A short note under the numbers explains what the counts mean.
How to Use the PDF Object Counter
- Drag one PDF onto the box that says "Drag & drop PDF to count structural objects". You can also click the box to open a file picker.
- Watch the status line change from "Ready" to "Counting objects...".
- Read the six lines in the results box.
- Look for "Done. Counted N indirect objects." in the status line, where N is your first number.
- To check another file, drop or pick a new PDF. The old numbers clear first.
If you drop several files at once, only the first PDF is counted. You can pick the same file twice in a row and get a fresh result.
How It Works
The tool opens your PDF with the pdf-lib library, which parses the file the way a PDF editor would. It then goes through every indirect object and sorts each one by type.
Choose PDF→Parse the Document→Sort Each Object→Six Numbers
Streams are counted by their type, and a stream counts as filtered when its dictionary has a /Filter entry. Fonts are counted from font dictionaries, and font files from font descriptors. No text search is involved, so compressed objects are not missed.
A Sample Walkthrough
Tariq is a print shop operator. He wants to see what a small four-page handout contains before he sends it to a client.
He drops handout.pdf onto the box. The file uses two standard fonts and one small picture. The results box shows these lines.
- Total Indirect Objects: 15
- Stream Objects: 6
- Streams With a Compression Filter: 6
- Font Objects: 2
- Embedded Font Files: 0
- Document Pages: 4
Embedded Font Files is 0 because standard fonts are named in the file but not stored in it. The status line reads "Done. Counted 15 indirect objects."
These numbers come from a real test file, so your own files will give different totals.
How to Read the Results
Start with the total. A short document with a high total usually has many small pieces, such as vector shapes or form fields. A long scan often has a low total, because each page is one large image.
Compare Stream Objects with Streams With a Compression Filter. When the second number is lower, some streams are stored raw. When they match, every stream uses a filter.
The filter line counts any filter, including image filters such as DCTDecode. It does not mean every stream is zipped with Flate.
Font Objects and Embedded Font Files tell different stories. A file can name many fonts and embed none. That keeps it small, but it may look different on another device.
Why Counts Differ Between Files
Two files with the same pages can show very different counts. A report exported from a design program may hold hundreds of small objects. A phone scan may hold only a few.
Newer PDFs often pack many objects inside compressed object streams. This tool counts those packed objects too. A modern file and an older copy of one document should give similar totals.
If you only need images, fonts, or links, a focused tool gives a clearer answer. The PDF Image Counter and the PDF Font Counter each target one kind of content. For the basic page total, the PDF Page Counter is enough.
Privacy and File Handling
The code reads your file with the browser's own file reader and parses it with the pdf-lib library. It sends the file to no server. No upload, form post, or network request involves your PDF.
The page does load the pdf-lib script from a public code host when it opens. Your PDF is not part of that request. The tool also keeps no copy, so you need to pick the file again after a refresh.
Limitations
- It reads one file at a time. There is no batch mode.
- If a file was edited by appending updates, only the latest copy of each object is counted. Older copies are not.
- The total is objects as the library reads them. In unusual files it can differ slightly from a raw cross-reference table count.
- Encrypted or password-protected files cannot be counted. The tool has no password box, so unlock the file first.
- Files over 200 MB are refused with a message.
A damaged file shows "This PDF could not be read. It may be damaged. Repair or re-save the file, then try again." A non-PDF file gets a message asking for a file that ends in .pdf.
The tool reports counts only. To see more detail about one file, try the PDF File Information Viewer or the PDF Link Counter. You can browse related utilities in the PDF tools hub.
FAQs About the PDF Object Counter
Does the PDF Object Counter change my file?
No. It reads the file and shows numbers. It has no save or download button.
Is my PDF uploaded to a server?
No. The code processes the file in your browser and sends it nowhere. The pdf-lib script itself loads from a public code host.
Why does the page count not match the object count?
They measure different things. Objects include fonts, images, and page content, so one page can use many objects.
Are the counts exact or estimated?
They are exact for the objects the library finds in the parsed file. They are not guesses from a text search.
Can it count text blocks, images, or tables?
No. It counts structural objects only. It does not detect visual items such as tables or text blocks.
Why did I see an error instead of numbers?
The file may be locked with a password, damaged, or not a real PDF. Try another copy or unlock the file.
This tool runs in your web browser and may not handle every PDF file, font, or browser the same way. Keep a backup of your original file. Reviewed for general accuracy by Prof. Dr. Khalil Mudassar, PhD.