Skip to main content

PdfExTools

This package contains tools can be used to handle pdf files.

1. PageNumberExtractor:

to extract physical page numbers, i.e., the page numbers printed in page (as part of content in the page), rather than the logical page numbers tracked by pdf reader or tools like pdfplumber, pymupdf, etc. This can be useful because sometimes the pdf file was excerpted from a large file, as a result, the page number showing in page can start from 135 to 145, while the total number of pages is 11 (1-11).

1) to install:

pip install PdfExTools

2) to use, do the following:

from pdfextools import PageNumberExtractor

pdf_file = r"./sample-pdfs/2-col-pubmed.pdf"

print("pdf_file: " + pdf_file)

extractor = PageNumberExtractor()
page_numbers = extractor.process(pdf_file)

print(page_numbers)

The result will be a dictionary mapping logical page numbers (base-0) to the physical ones. For example:

pdf_file: /sample-pdfs/2-col-pubmed.pdf
{0: 11, 1: 12, 2: 13, 3: 14, 4: 15, 5: 16, 6: 17, 7: 18, 8: 19, 9: 20, 10: 21, 11: 22, 12: 23}

Metadata

Release files for pdfextools 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pdfextools 0.3.0
File Size Uploaded
pdfextools-0.3.0.tar.gz 5.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pdfextools 0.3.0
File Interpreter ABI Platform
pdfextools-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.7 kB

Release files / pdfextools-0.3.0.tar.gz

Download URL pdfextools-0.3.0.tar.gz
Size 5.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7d158398758ed0a9ffdc2894bc89bebe26f9761dd340635817ebb9cee54fa9c4
BLAKE2b-256 checksum
How to use checksums
0c64b6eebaf254642934e3710df0ddd8975d13ef62d82c688995811bfc5a92ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

Release files / pdfextools-0.3.0-py3-none-any.whl

Download URL pdfextools-0.3.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f649d4763c06a372117b9ae7cf1b61ef0b2509eee4a8a260f858b5b5af151cd1
BLAKE2b-256 checksum
How to use checksums
fa909c716c61dcccbe009f56e806a4117e45a060b88046ae2646e3c0e83c7d99
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.1.post20201107 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page