← Back to Open-Source PDF Software

Open-Source PDF Software Capable of Inspecting PDF Object Structure

Inspect/dump low-level PDF object structure for debugging

12 tools

Perl

CAM::PDF

Library

Perl module (PDF 1.0–1.5) for reading and writing PDFs: extract/delete/duplicate pages, get page text/content trees, append/prepend pages from other PDFs, handle password-protected documents and permissions, list/add fonts, list/fill form fields, remove annotations, detect linearized PDFs, remove unused objects, and apply compression filters.

Tested
Stale
OCaml

Caradoc

Cli

OCaml parser and validator for PDF file structure, built by the French national cybersecurity agency (ANSSI) specifically for security-focused PDF analysis rather than general-purpose PDF processing. Offers CLI analysis commands and an interactive console for exploring a PDF's object graph directly, aimed at spotting structural anomalies (malformed objects, suspicious cross-references) that a normal PDF reader would silently paper over or reject outright.

DepreciatedStale
Python

digital-born-pdf-scanner

Cli

CLI tool that checks whether PDF files are 'born-digital' (created directly from a digital source, with a real text layer) versus scanned images with no underlying text — a distinction that matters before running OCR or text extraction on a large batch of unknown-provenance PDFs. Scans single files or whole directories recursively, reporting results as TSV/CSV for easy filtering in a spreadsheet or further scripting.

Stale
Python

HURIDOCS PDF Document Layout Analysis

DockerServer

Self-hosted PDF layout-analysis service (choice of a VGT or LightGBM model) exposed over an HTTP API: segments and classifies page regions — text, titles, pictures, tables, and similar — as structured output rather than a flat text dump. Built by HURIDOCS, a human-rights documentation NGO, originally for processing large volumes of case files where a region's semantic type (not just its text) matters for downstream analysis. Runs as a Docker service you deploy and call, not a library you import.

Ruby

Origami

Cli

Pure-Ruby framework for parsing, modifying, and creating PDF files, with lazy on-demand parsing: compression filters with predictors, RC4/AES encryption (including Revision 6), digital signatures and usage rights, file attachments, AcroForm/XFA forms, and object streams. Ships CLI tools including `pdfcop` for detecting dangerous PDF content (not a full malware-analysis/forensics suite by the author's own description) plus decompression, decryption, encryption, resource-extraction, and metadata-inspection utilities.

Stale
Python

pdf-parser

Cli

Part of the Didier Stevens Suite of security tools: parses a PDF document to identify and inspect its fundamental elements/objects, with an option to search for specific strings within indirect objects — used for PDF malware analysis and forensic triage. Public domain.

Rust

pdf-rs

Library

Rust library to read, manipulate, and write PDF files: stable reading with examples for extracting content/metadata/names/text, plus Pathfinder integration for rendering and a companion `inspect-prim` tool for hierarchically exploring PDF structure. Modification and writing support are still experimental.

JavaScript

pdf2xml-viewer

Library

Displays and inspects individual text boxes within PDF documents by converting them to pdf2xml format (via poppler-utils) and rendering the boxes with D3.js in a browser — useful for examining OCR-processed 'sandwich' PDFs before extraction. Companion tool to pdftabextract, for viewing the row/column grids it detects.

DepreciatedStale
Python

Pdfalyzer

Cli

PDF forensics/analysis tool that visualizes a PDF's internal tree-like object structure as large, color-coded diagrams, scans embedded binary streams for suspicious/malicious content using YARA rules (via the companion Yaralyzer), and force-decodes suspicious font binaries.

C++

PDFedit

GuiLibrary

PDF editing library, GUI application, and command-line tools for viewing and directly editing the internal structure of PDF documents — raw objects, streams, and cross-reference tables — rather than just visual page content. Particularly useful for inspecting and repairing malformed or non-standard PDFs that better-behaved editors refuse to open. A Flatpak build is available for running it on modern Linux distributions despite the project itself being unmaintained since 2020.

DepreciatedStale
Python

pikepdf

Library

Pythonic wrapper around qpdf for reading, writing, and manipulating PDFs: merge, split, rotate, rearrange, and delete pages; read/write XMP and DocumentInfo metadata (auto-synced); losslessly extract or replace embedded images (preserving original JPEG compression); open password-protected files and save with RC4, AES-128, or AES-256 encryption (or remove it); linearize for 'fast web view'; direct object-level/content-stream access; automatic repair on open; access to qpdf's Job API; and Jupyter notebook preview rendering.

C++

qpdf

Library

Low-level, content-preserving PDF structure tool: linearizes PDFs for fast web view, encrypts and decrypts, splits and merges files, inspects and edits PDF object structure directly, and repairs damaged files without altering actual page content. Explicitly does not render pages or extract text — its own documentation is clear this is a structural transformation tool, not a content-reading one, and points elsewhere (e.g. the `pdftools` R package) for extraction needs.

Tested