Skip to main content

Explore PDFs with ease

Project description

pdfnaut

Documentation Status PyPI - License PyPI - Downloads PyPI - Version

[!Warning] pdfnaut is currently in an early stage of development and has only been tested with a small set of compliant documents. Some non-compliant documents may work under strict=False. Expect bugs or issues.

pdfnaut aims to become a PDF processor for parsing PDF 2.0 files.

pdfnaut provides a high-level interface for reading and writing PDF documents as described in the PDF 2.0 specification for actions such as reading and writing metadata, modifying and inserting pages, creating PDF objects, etc.

Installation

pdfnaut requires at least Python 3.10 or later. To install pdfnaut via pip:

python -m pip install pdfnaut

If you plan to work with encrypted or protected PDF documents, you must install one of the supported crypt providers. See Standard Security Handler in the documentation for details.

Examples

Example 1: Accessing the content stream of a page

from pdfnaut import PdfDocument

pdf = PdfDocument.from_filename("tests/docs/sample.pdf")
for operator in pdf.pages[0].content_stream:
    print(operator)

Example 2: Reading document information

from pdfnaut import PdfDocument

pdf = PdfDocument.from_filename("tests/docs/sample.pdf")
print(pdf.doc_info.title)
print(pdf.doc_info.author)

For more examples on what pdfnaut can do, see the examples directory in the repository or see the guides in the documentation.

Contributing

Contributions to pdfnaut should be done according to the Contributing Guidelines. You can contribute in many ways including adding small features, resolving issues, writing documentation, and more.

License

pdfnaut is provided under the terms of the Apache License 2.0.

Project details


Download files

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

Source Distribution

pdfnaut-0.12.0.tar.gz (87.9 kB view details)

Uploaded Source

Built Distribution

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

pdfnaut-0.12.0-py3-none-any.whl (90.7 kB view details)

Uploaded Python 3

File details

Details for the file pdfnaut-0.12.0.tar.gz.

File metadata

  • Download URL: pdfnaut-0.12.0.tar.gz
  • Upload date:
  • Size: 87.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pdfnaut-0.12.0.tar.gz
Algorithm Hash digest
SHA256 31bba6a17fdb8dce596da88b276323828b771a36f32b017400604a0a06a7a68b
MD5 515ef9830b5c63aa91742bd7a7c40ca5
BLAKE2b-256 d83986b9f7a3fc40e033565cde76721e86185b98450f44772aa7cc19ad836783

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdfnaut-0.12.0.tar.gz:

Publisher: python-publish.yml on aescarias/pdfnaut

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

File details

Details for the file pdfnaut-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: pdfnaut-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 90.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pdfnaut-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1df3ddf98f229b90e0a3420bac4f3db2030a2ecd7834e386333b9e3ac49825d5
MD5 d963d710f4abb8e3ca3bec1785aaba4b
BLAKE2b-256 2bb2f7e041be90397941b7254de215797820eda9263e503e19e50ee3abe7f703

See more details on using hashes here.

Provenance

The following attestation bundles were made for pdfnaut-0.12.0-py3-none-any.whl:

Publisher: python-publish.yml on aescarias/pdfnaut

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