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.20.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.20.0-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3Windows x86-64

capypdf-0.20.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.20.0.tar.gz.

File metadata

  • Download URL: capypdf-0.20.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.20.0.tar.gz
Algorithm Hash digest
SHA256 4978fe6b73f5f714e380d2f8ce82de64f22788259c756bcb521990b17fba338e
MD5 95ea9e8ca8bac30e5fbc5e7a5c149bd5
BLAKE2b-256 fde43e9154046e56389c448d56de163ab4abe07f05c48e179ba70fea9e7f2eed

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for capypdf-0.20.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 b7cb696224ef2927e37b97e87a206bef2377963a1bcd315b351d22e7646e2073
MD5 de101731d47bed1b968f45c9926ca0d7
BLAKE2b-256 c54325f836005377fcef5f3e4f785c5b6342a8459bc724d606f873dc09085787

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for capypdf-0.20.0-py3-none-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 b0b89b493b05a681b07329c7ea4a5795b3dc7b72b94eb610112ed4c585b08f68
MD5 b1910b8eb13137398692967ca6162d17
BLAKE2b-256 ac2a6a36b5a320b4b0462380e61ef8280b50cc56685988d1d2fe888105b0cb6c

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