python-poppler
python-poppler is a Python binding to the poppler-cpp library. It allows to read, render, or modify PDF documents. More specifically, it currently allows to:
- read an modify document meta data;
- list and read embedded documents;
- list the fonts used by the document;
- search or extract text on a given page of the document;
- render a page to a raw image;
- get info about transitions effects between the pages;
- read the table of contents of the document.
How to build
This package is currently distributed as source only, and is currently tested on Linux only. It requires poppler 0.62 or higher (but 0.87 is recommended). I will provide a WIndows build once I figure out how to compile poppler for Windows.
You need poppler-cpp with headers, python (3.7 or 3.8) with headers, and cmake. On Arch linux, you need the poppler package. On Ubuntu, you need to install libpoppler-cpp-dev.
The whole build process is handled by the setup.py file.
For instance, to install in the current environment:
$ python setup.py install
This will compile the binary packages, and install the library.
Tests are run using tox:
$ tox
Usage
The package is installed as poppler. It follows the interface of poppler-cpp. Therefore, you can refer to the documentation of the C++ library.
Example:
from poppler import load_from_file, PageRenderer
pdf_document = load_from_file("sample.pdf")
page_1 = pdf_document.create_page(0)
page_1_text = page_1.text()
renderer = PageRenderer()
image = renderer.render_page(page_1)
image_data = image.data
Metadata
Release files for python-poppler 0.1.1
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-poppler-0.1.1.tar.gz | 15.7 kB | Without provenance | Details for python-poppler-0.1.1.tar.gz |
Release files / python-poppler-0.1.1.tar.gz
| Download URL | python-poppler-0.1.1.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1eb737b416576666867b49ac29dcde9960c180dc4a8e62c4b7ae3f3f0229db95
|
|
BLAKE2b-256 checksum How to use checksums |
48f0e7f408e68ca2d4a8325b2f3a6c62d30e0e8b3a6319b5a2169ef14baef09d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Security for python-poppler 0.1.1
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.