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.10.0.tar.gz (73.7 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.10.0-py3-none-any.whl (75.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pdfnaut-0.10.0.tar.gz
Algorithm Hash digest
SHA256 3c753f7e0228b7b4da3e4d0ef61d9c4b0baa193f34a718df69430441fa2c9bbd
MD5 995df409229285ced91d0eb453e0000f
BLAKE2b-256 cb12c9e5db30263dd095b9d2e12bc52370db30c8c0f737984bbc8c00149fe5d4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pdfnaut-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 75.2 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.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 09ce620b7b3fe013905fa7bd5e265d68bfa553d9debf8b89e25e42234f91dfb5
MD5 86c91362da64442fef276d470a295361
BLAKE2b-256 45808a590fc97249749afed7abc433158365e070fbd9af1fdeba184ff4c2d0bc

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