Skip to main content

GUI for exploring PDF internals

Project description

pdfsnoop

A GTK desktop tool for exploring PDF internals.

feature screenshot
content disassembly
page preview/font highlighting
annotation highlighting

What it does

Opens a PDF file and displays its internal object tree, allowing you to inspect dictionaries, arrays, streams, and indirect references. Selecting an object in the tree shows its contents in a detail pane. For page objects, a rendered preview is shown. Content streams are disassembled into annotated PDF operators.

Selecting certain objects highlights them on the page preview:

  • Font objects — highlights text using that font in yellow
  • Annotation objects — highlights the annotation rectangle
  • Link annotations — highlights the link rectangle in blue

Installation

Requires Python 3.10+, GTK 3, and Poppler.

On Debian/Ubuntu you may need system packages:

sudo apt install python3-gi python3-gi-cairo gir1.2-gtk-3.0 gir1.2-poppler-0.18 libgirepository-2.0-dev

If your repo doesn't have libgirepository-2.0-dev, try libgirepository1.0-dev. (One less hyphen!)

Then either run

sudo apt install pipx
pipx install pdfsnoop --system-site-packages

or if that doesn't work, run these commands to install manually:

SNOOPDIR=~/software/pdfsnoop  # or wherever you like
mkdir -p $SNOOPDIR && cd $SNOOPDIR
python -m venv --system-site-packages pdfsnoop-venv
source pdfsnoop-venv/bin/activate
git clone https://github.com/qooxzuub/pdfsnoop
pip install ./pdfsnoop

For the second method, if you add $SNOOPDIR/pdfsnoop-venv/bin to your PATH then running pdfsnoop should work.

Usage

pdfsnoop file.pdf

Keyboard shortcuts

Key Action
j / k Move down / up
h / l Collapse / expand node
g Jump to page number
e Edit value inline or stream in $EDITOR
s Extract stream or image
f Normalize content stream
w Save PDF as...
/ or Ctrl+F Search
q Quit

License

Mozilla Public License 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdfsnoop-0.1.0.tar.gz (46.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pdfsnoop-0.1.0-py3-none-any.whl (36.8 kB view details)

Uploaded Python 3

File details

Details for the file pdfsnoop-0.1.0.tar.gz.

File metadata

  • Download URL: pdfsnoop-0.1.0.tar.gz
  • Upload date:
  • Size: 46.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pdfsnoop-0.1.0.tar.gz
Algorithm Hash digest
SHA256 951cf3271889cc3358203ac8889e04e3a5eaaeb816a8d9e44d624a7c20aac57a
MD5 105a876f989ccfb3e2d237f485e32ac4
BLAKE2b-256 282930dcbc2f6281756e5ac098c2837f07c1edc3a30191456a66b389ca8626b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdfsnoop-0.1.0.tar.gz:

Publisher: publish.yml on qooxzuub/pdfsnoop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pdfsnoop-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pdfsnoop-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 36.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pdfsnoop-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 90d3c4d49f9bface33c6b1aa3b0f8a1ef704ed3915e263e8bb6ba86e0b682e2c
MD5 3f6ef0b6c091adeab2330acd60ada47a
BLAKE2b-256 2107202fe5e7dd6443e9e838d26cd47e2d9e0c0371984c677b64593a1d44478b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdfsnoop-0.1.0-py3-none-any.whl:

Publisher: publish.yml on qooxzuub/pdfsnoop

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page