Skip to main content

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.

Release files for capypdf 0.21.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for capypdf 0.21.0
File Size Uploaded
capypdf-0.21.0.tar.gz 31.0 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for capypdf 0.21.0
File Interpreter ABI Platform
capypdf-0.21.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
capypdf-0.21.0-py3-none-macosx_26_0_arm64.whl Python 3 none macOS 26.0+ ARM64 Details

Total release size: 33.5 MB

Release files / capypdf-0.21.0.tar.gz

Download URL capypdf-0.21.0.tar.gz
Size 31.0 MB
Tags Source
SHA-256 checksum
How to use checksums
a83973dc3231d3353b69ff00f04770b6802ecf1301001080e285084019670771
BLAKE2b-256 checksum
How to use checksums
09075f789f6f6ee4ad6438e8eb400a54750a1a4d748f958f064ee91e8b36b1aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Release files / capypdf-0.21.0-py3-none-win_amd64.whl

Download URL capypdf-0.21.0-py3-none-win_amd64.whl
Size 1.2 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
4a739f86253bda4a20650aefa0bdd542f776534deb9555f72ba9d1daa0f2f9bb
BLAKE2b-256 checksum
How to use checksums
7788c47440acae8e87afcdec7e3f1d9b33dfd645b90683797f74ccc17f1b1d5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / capypdf-0.21.0-py3-none-macosx_26_0_arm64.whl

Download URL capypdf-0.21.0-py3-none-macosx_26_0_arm64.whl
Size 1.3 MB
Tags Python 3 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
c0455d7db9047585071a3c99f55a6d0875743410ab095ee529779f674a123775
BLAKE2b-256 checksum
How to use checksums
e24ed3c16ad91fe42d098b6e86663b9374fef61dc53cb1296725412ea2fb6bf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.21.0 This release

3 release files

0.19.0

3 release files

0.18.0

1 release file

0.15.0

3 release files

0.14.0

3 release files

0.13.0

3 release files

0.11.0

3 release files

0.10.0

3 release files

0.9.0

3 release files

0.8.0

3 release files

0.7.0

3 release files

0.6.0

3 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page