A color managed PDF generation library tech preview
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 available in PDF (eventually)
- 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
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)
- Supporting PDF versions earlier than 1.7 (possibly PDF 2.0)
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
File details
Details for the file capypdf-0.13.0.tar.gz
.
File metadata
- Download URL: capypdf-0.13.0.tar.gz
- Upload date:
- Size: 6.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ac8093e24895a04ec443b42779220080c520461c140a6d36175d86ceb4b01eb |
|
MD5 | 1c1ea71c48e28f2164bc52646daf3e6f |
|
BLAKE2b-256 | de6e2aeaf0c3810a2ee52e53dddde71aeef7a202f6479caeae5a365b04eed693 |
File details
Details for the file capypdf-0.13.0-py3-none-win_amd64.whl
.
File metadata
- Download URL: capypdf-0.13.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/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53ea3003feda3a56bb19514a346fe2f1dfd206fe58ec7ea4c07b9f0f9a56adc4 |
|
MD5 | 0712a4102c349ff83b09fd96d39de95d |
|
BLAKE2b-256 | 6027c6fe7b9e47fbb00643304357ac47cbac5a1a3ad60e62f00b9486088b7ef4 |
File details
Details for the file capypdf-0.13.0-py3-none-macosx_15_0_arm64.whl
.
File metadata
- Download URL: capypdf-0.13.0-py3-none-macosx_15_0_arm64.whl
- Upload date:
- Size: 1.3 MB
- Tags: Python 3, macOS 15.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a7fa72d244447f843fca3e5199ffb7e7ee51fa4dd12d01f78616af662880cc4 |
|
MD5 | 93ed31066804453e294a4e56794ee8c3 |
|
BLAKE2b-256 | ba08d757e6dd47bd1a5d1bf22106e88ef3e72ec5db8ed119a20110e1a26624d5 |