Skip to main content

A purpose-built PDF link analysis reporting tool.

Project description

pdflinkcheck

A purpose-built tool for comprehensive analysis of hyperlinks and link remnants within PDF documents, primarily using the PyMuPDF library. Use the CLI or the GUI.


Graphical User Interface (GUI)

The tool can be run using a simple cross-platform graphical interface (Tkinter):

Screenshot of the pdflinkcheck GUI

To launch the GUI, use the command: pdflinkcheck-gui


✨ Features

  • Active Link Extraction: Identifies and categorizes all programmed links (External URIs, Internal GoTo/Destinations, Remote Jumps).
  • Anchor Text Retrieval: Extracts the visible text corresponding to each link's bounding box.
  • Remnant Detection: Scans the document's text layer for unlinked URIs and email addresses that should potentially be converted into active links.
  • Structural TOC: Extracts the PDF's internal Table of Contents (bookmarks/outline).

📥 Installation (Recommended via pipx)

The recommended way to install pdflinkcheck is using pipx, which installs Python applications in isolated environments, preventing dependency conflicts.

# Ensure you have pipx installed first (if not, run: pip install pipx)
pipx install pdflinkcheck

Note for Developers: If you prefer a traditional virtual environment or are developing locally, use pip:

# From the root of the project
pip install .

🚀 Usage

The main command is pdflinkcheck analyze.

# Basic usage: Analyze a PDF and check for remnants (default behavior)
pdflinkcheck analyze "path/to/my/document.pdf"

Command Options

Option Description Default
<PDF_PATH> Required. The path to the PDF file to analyze. N/A
--check-remnants / --no-check-remnants Toggle scanning the text layer for unlinked URLs/Emails. --check-remnants
--max-links INTEGER Maximum number of links/remnants to display in the detailed report sections. 50
--help Show command help and exit. N/A

Example Run

pdflinkcheck analyze "TE Maxson WWTF O&M Manual.pdf" --max-links 10

Run from source

git clone http://github.com/city-of-memphis-wastewater/pdflinkcheck.git
cd pdflinkcheck
uv sync
python src/pdflinkcheck/analyze.py

⚠️ Platform Compatibility Note

This tool relies on the PyMuPDF library, which requires specific native dependencies (like MuPDF) that may not be available on all platforms.

Known Incompatibility: This tool is not officially supported and may fail to run on environments like Termux (Android) due to underlying C/C++ library compilation issues with PyMuPDF. It is recommended for use on standard Linux, macOS, or Windows operating systems.


Document Compatibility

While pdflinkcheck uses the robust PyMuPDF library, not all PDF files can be processed successfully. This tool is designed primarily for digitally generated (vector-based) PDFs.

Processing may fail or yield incomplete results for:

  • Scanned PDFs (images of text) that lack an accessible text layer.
  • Encrypted or Password-Protected documents.
  • Malformed or non-standard PDF files.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

pdflinkcheck-1.1.1.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

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

pdflinkcheck-1.1.1-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file pdflinkcheck-1.1.1.tar.gz.

File metadata

  • Download URL: pdflinkcheck-1.1.1.tar.gz
  • Upload date:
  • Size: 12.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pdflinkcheck-1.1.1.tar.gz
Algorithm Hash digest
SHA256 dcb3ecf66721bd9cfb139e94252d4e9c0a69ffd596ae1e549297b4b9974a15d1
MD5 d367f81fde4a90f876cf96e42af6c1b8
BLAKE2b-256 4b6fc1cefff6617e563c15ba4f0a485146f59d3d6c1047617ee27d2a3fef6cce

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdflinkcheck-1.1.1.tar.gz:

Publisher: publish.yml on City-of-Memphis-Wastewater/pdflinkcheck

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

File details

Details for the file pdflinkcheck-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: pdflinkcheck-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pdflinkcheck-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e63f4772d5d50bf788b01e4cf7d86b48f2a30a2236f8aed810febaf21de9a755
MD5 c59646e2dc38155557b0bdabdec0bab7
BLAKE2b-256 1af6d37888376318ec4a493591b788e15ba3949b713ebae28567e87e787dc2d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdflinkcheck-1.1.1-py3-none-any.whl:

Publisher: publish.yml on City-of-Memphis-Wastewater/pdflinkcheck

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