Skip to main content

A color managed PDF generation library.

Project description

CapyPDF

CapyPDF is a low level library for generating PDF files. It does not have its own document model, it merely exposes PDF primitives directly.

Features

  • Aims to support all functionality in PDF (eventually), including accessibility features
  • Reads PNG, JPEG and TIFF files
  • Fully color managed using LittleCMS 2
  • Not implemented in C
  • Provides a plain C API for easy integration into scripting languages
  • Ships with a ctypes Python binding and a C++ wrapper header
  • Minimal dependencies
  • Creates PDF 2.0 unless chosen PDF type (X, A, etc) requires a specific older version

Things the library does not do

  • Reading PDF files
  • Modifying PDF files
  • Cryptographic operations (i.e. document signing)
  • Supporting any other backend than PDF
  • Parsing any vector data files like SVG
  • Data conversions in general (apart from colorspaces)

API stability guarantees

Until 1.0 there is no guarantee of any kind. Anything can be changed. However we try not to change things without a good reason. Once 1.0 happens, we aim to provide the following:

  • The plain C interface is both API and ABI stable
  • Only C symbols are exported so you alter build settings to get at the internals, there is no stability guarantee
  • The Python API shall be stable as well

PDF validity

The library shall always generate PDFs that are syntactically valid. Any deviation is a bug that should be reported.

The output is not guaranteed to be semantically valid. PDF has certain requirements for valid documents that can not be checked in a plain PDF generation library. This work needs to be done by the generating application. CapyPDF does have some semantic checks, such as not permitting RGB images in PDF/X3 documents, but they are implemented on a best effort basis.

Status

The basic functionality is there and the library can be used to generate fairly complex documents. The APIs are not stable yet, however they are not expected to change much any more.

AI policy

The use of any and all AI tools for this project is prohibited. Issues and pull requests created using AI will not be looked at, but instead will be closed immediately upon detection.

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

capypdf-0.21.0.tar.gz (31.0 MB view details)

Uploaded Source

Built Distributions

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

capypdf-0.21.0-py3-none-win_amd64.whl (1.2 MB view details)

Uploaded Python 3Windows x86-64

capypdf-0.21.0-py3-none-macosx_26_0_arm64.whl (1.3 MB view details)

Uploaded Python 3macOS 26.0+ ARM64

File details

Details for the file capypdf-0.21.0.tar.gz.

File metadata

  • Download URL: capypdf-0.21.0.tar.gz
  • Upload date:
  • Size: 31.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for capypdf-0.21.0.tar.gz
Algorithm Hash digest
SHA256 a83973dc3231d3353b69ff00f04770b6802ecf1301001080e285084019670771
MD5 bf87273cf7fbbf13129663d6eeb1e730
BLAKE2b-256 09075f789f6f6ee4ad6438e8eb400a54750a1a4d748f958f064ee91e8b36b1aa

See more details on using hashes here.

File details

Details for the file capypdf-0.21.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: capypdf-0.21.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for capypdf-0.21.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 4a739f86253bda4a20650aefa0bdd542f776534deb9555f72ba9d1daa0f2f9bb
MD5 f2dd19d96d97a1ec0eb7284288de9ca6
BLAKE2b-256 7788c47440acae8e87afcdec7e3f1d9b33dfd645b90683797f74ccc17f1b1d5a

See more details on using hashes here.

File details

Details for the file capypdf-0.21.0-py3-none-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for capypdf-0.21.0-py3-none-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 c0455d7db9047585071a3c99f55a6d0875743410ab095ee529779f674a123775
MD5 96c0fed19f6e8858604ded8aaad9a830
BLAKE2b-256 e24ed3c16ad91fe42d098b6e86663b9374fef61dc53cb1296725412ea2fb6bf7

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