PDF Link Checker
This is a fork of the pdf-link-checker.
Situation: You need to upload a PDF somewhere
Now, you want to check if all the links are still active and that the reviewers, reader, or students end up with 404 error codes.
Let this script check that for you!
Setup
-
Install Python
-
Install the
python-pdf-link-checkervia the Python Package Registry.pip install python-pdf-link-checker
Attention: On macOS,
pipis usually the installer of the Python2 instance. Please usepip3orpip3.xin this case. -
Now you should be able to call
pdf-link-checkerwithin your shell.$ pdf-link-checker --version pdf-link-checker 1.1.5
Usage
Check Links
$ pdf-link-checker check-links --help
Usage: pdf-link-checker check-links [OPTIONS] [PDF_FILE]
- Get input PDF and output CSV location. - execute
check_pdf_links(infilepath, infilepath) - Save the report to output CSV
location.
Arguments:
[PDF_FILE] The PDF file to check.
Options:
-r, --report FILE The CSV file with all the checked links.
[default: report.csv]
-I, --ignore-url TEXT URL that should not be checked, e.g., because we
now that they are not activated yet. [default: ]
-C, --ci If set, the command will exit with an error code
if there are broken URLs. [default: False]
-c, --csv-delimiter TEXT The CSV delimiter, e.g., `;` [default: ;]
-A, --ignore-unauthorized If this flag is set, we will ignore 403 status
codes. Some websites block scripts, and thus
existing links will result in 403 codes.
[default: False]
--help Show this message and exit.
Check Page Limit
$ pdf-link-checker check-page-limit --help
Usage: pdf-link-checker check-page-limit [OPTIONS] [PDF_FILE]
Check the page limit.
Arguments:
[PDF_FILE] The PDF file to check.
Options:
-l, --page-limit INTEGER The maximal number of pages
--help Show this message and exit.
Example
$ pdf-link-checker check-links main.pdf
Starting
100%|█████████| 5/5 [00:30<00:00, 6.18s/it]
Done: .../report.csv
Run Pytest to validate returns
From the script directory, run pytest to validate the code. The tests use the PDFs in the data folder.
Contact
If you have any question, please contact Patrick Stöckle.
Metadata
Release files for python-pdf-link-checker 1.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python_pdf_link_checker-1.1.10.tar.gz | 7.3 kB | Without provenance | Details for python_pdf_link_checker-1.1.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| python_pdf_link_checker-1.1.10-py3-none-any.whl | Python 3 | none | any | Details for python_pdf_link_checker-1.1.10-py3-none-any.whl |
Total release size: 16.1 kB
Release files / python_pdf_link_checker-1.1.10.tar.gz
| Download URL | python_pdf_link_checker-1.1.10.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e6491fd9016106f6870471042f9d45a72cad81a7621313c3443d45b746f3a869
|
|
BLAKE2b-256 checksum How to use checksums |
5b12600255af6e897dcba8da7a61169aa666bac0802667f3342bd79f3cb916a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Release files / python_pdf_link_checker-1.1.10-py3-none-any.whl
| Download URL | python_pdf_link_checker-1.1.10-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7d619a4b15251638f281a9a8916172186e32bec9ba84e6ec8e3fcdb55d9a64b2
|
|
BLAKE2b-256 checksum How to use checksums |
ef14aef90ed3791e978ef827eb745af245677c0d81a081a17e825bdf57039bd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.15
|
Security for python-pdf-link-checker 1.1.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.