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):
To launch the GUI:
A. Install from pipx using pipx install pdflinkcheck, and then use the command: pdflinkcheck-gui
or
B. Download and double-click the latest PYZ, EXE, or ELF binary from https://github/com/City-of-Memphis-Wastewater/pdflinkcheck/releases/
✨ 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pdflinkcheck-1.1.14.tar.gz.
File metadata
- Download URL: pdflinkcheck-1.1.14.tar.gz
- Upload date:
- Size: 25.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dcc9111deca84f43bd487953035bde1d27d5626ff231b0c350280a5195b474a
|
|
| MD5 |
3e5d2f878c3fae649576e3bcc32a8927
|
|
| BLAKE2b-256 |
2f15701164c7af1ff314217e80bc944b608a1ce6edbe2d9bdf1a6daf7b662960
|
Provenance
The following attestation bundles were made for pdflinkcheck-1.1.14.tar.gz:
Publisher:
publish.yml on City-of-Memphis-Wastewater/pdflinkcheck
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdflinkcheck-1.1.14.tar.gz -
Subject digest:
2dcc9111deca84f43bd487953035bde1d27d5626ff231b0c350280a5195b474a - Sigstore transparency entry: 760614886
- Sigstore integration time:
-
Permalink:
City-of-Memphis-Wastewater/pdflinkcheck@af69afcb369eb031b7261e937e91941ead4e652d -
Branch / Tag:
refs/tags/v1.1.14 - Owner: https://github.com/City-of-Memphis-Wastewater
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@af69afcb369eb031b7261e937e91941ead4e652d -
Trigger Event:
release
-
Statement type:
File details
Details for the file pdflinkcheck-1.1.14-py3-none-any.whl.
File metadata
- Download URL: pdflinkcheck-1.1.14-py3-none-any.whl
- Upload date:
- Size: 25.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e142e04b7433f7c976c23cf2c8923d3b0523ff9c19896435f8b2b14d78ae6f08
|
|
| MD5 |
48e077f0cb0479c6f82a36015b69b3d3
|
|
| BLAKE2b-256 |
855c2dcbc04c29fbb18f8c5e346a1d89da36c7df6a93cbab639a70db9703a1a3
|
Provenance
The following attestation bundles were made for pdflinkcheck-1.1.14-py3-none-any.whl:
Publisher:
publish.yml on City-of-Memphis-Wastewater/pdflinkcheck
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdflinkcheck-1.1.14-py3-none-any.whl -
Subject digest:
e142e04b7433f7c976c23cf2c8923d3b0523ff9c19896435f8b2b14d78ae6f08 - Sigstore transparency entry: 760614891
- Sigstore integration time:
-
Permalink:
City-of-Memphis-Wastewater/pdflinkcheck@af69afcb369eb031b7261e937e91941ead4e652d -
Branch / Tag:
refs/tags/v1.1.14 - Owner: https://github.com/City-of-Memphis-Wastewater
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@af69afcb369eb031b7261e937e91941ead4e652d -
Trigger Event:
release
-
Statement type: