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.9 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.9.0.tar.gz (67.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.9.0-py3-none-any.whl (68.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdfnaut-0.9.0.tar.gz
  • Upload date:
  • Size: 67.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.9.0.tar.gz
Algorithm Hash digest
SHA256 1329be55bbc715dc5a7ced6baf85ee69f5132fac8e66a0ac2cf2f41773e97d35
MD5 eee8411822a3aac9cc07503e5029d47a
BLAKE2b-256 6708bfff211717c00e62ccc31adb173248fb42ad30616de343e636e729bf7abc

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pdfnaut-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 68.6 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.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b1c8a285ffbded04c761e4600e2e8f3d10e2bd3bd77db7400b81a7d283cd6df8
MD5 4d2ad3598df25b5576d7dd17af981e2a
BLAKE2b-256 15824d647c2d5a2a5a478e5a4d618d984824dd19bb80fe8f88de950e258b4953

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