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.1.tar.gz (82.5 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.1-py3-none-any.whl (84.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pdfnaut-0.11.1.tar.gz
  • Upload date:
  • Size: 82.5 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.1.tar.gz
Algorithm Hash digest
SHA256 34ac9c25383fab89cf47c0356b868da8a643aa7b971f11afe236764b272a8d5d
MD5 37ba36f35686f55c629134d5a66d32aa
BLAKE2b-256 931f4da7d790936d7ec7b8cf8f89190137211dc410e93bf7d76f3956a4f7cf8a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pdfnaut-0.11.1-py3-none-any.whl
  • Upload date:
  • Size: 84.9 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 609babafec8abd935bb0e71a07a3e84a49e5bf5bdbaf173f2f7e4bcf5f42a0d6
MD5 a1e1a8b901826ff7f7fe0aa80acf06b1
BLAKE2b-256 7b642aea26943373f8fc518bbaac29df87b311e690973ab6e33f0c08480532d9

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