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.11.0.tar.gz (82.4 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.11.0-py3-none-any.whl (84.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdfnaut-0.11.0.tar.gz
  • Upload date:
  • Size: 82.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for pdfnaut-0.11.0.tar.gz
Algorithm Hash digest
SHA256 ad499b3b21a38d581eac0a4687051af3cd31d5f72a004ad5f3f3fa0902d1ea7a
MD5 6ad76d6359bb4dbd6b06f9a1af0f098b
BLAKE2b-256 f1ad2107cfccdd5436bd3e49939ea806cca65081c1b100f2db32a268afeb9b8c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pdfnaut-0.11.0-py3-none-any.whl
  • Upload date:
  • Size: 84.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for pdfnaut-0.11.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6a140c7460a8b3456ee05c8fa6ea3d871f6e43817505b4933f9be9eca3bdc8bd
MD5 55f5755e093d2ba0e395c3c0712a7b1f
BLAKE2b-256 a89cc6d44c5949ebef4ed84de772900f82689e76c106dfe8af5b927ac8df8566

See more details on using hashes here.

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