Skip to main content

A color managed PDF generation library tech preview

Project description

CapyPDF

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

Features

  • Fully color managed using LittleCMS 2
  • All fonts are embedded as subsets
  • Not implemented in C
  • Provides a plain C API for easy integration into scripting languages
  • Ships with a ctypes Python binding
  • Minimal dependencies

Things the library does not do

  • Reading PDF files
  • Modifying PDF files
  • 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

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
  • The internal C++ implementation "API" is not stable in any way
  • Only C symbols are exported so in order to get to the C++ API you have to change build settings. If you do that, 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


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.12.0.tar.gz (6.5 MB view details)

Uploaded Source

Built Distributions

capypdf-0.12.0-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3 Windows x86-64

capypdf-0.12.0-py3-none-macosx_14_0_arm64.whl (1.3 MB view details)

Uploaded Python 3 macOS 14.0+ ARM64

File details

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

File metadata

  • Download URL: capypdf-0.12.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

Hashes for capypdf-0.12.0.tar.gz
Algorithm Hash digest
SHA256 bd1aa778b0267c59ea1115859c82232a766339ce62c999bfff4afe342c31a4a6
MD5 b9c681d5f2abd13dc4db268a48f97cfa
BLAKE2b-256 9c7fd0c1c12708af8fe78fa394f6411abe390fc3df8055cb87da26fe191c97f1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: capypdf-0.12.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

Hashes for capypdf-0.12.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 03d5cd2a0ab14068ac2d7bc517fcc5dc93f4fc89c4df1bd0198567f48a1a63c6
MD5 d4fc5e0a850aca567d7a7fa0809c03ad
BLAKE2b-256 d2421bfdd815d923e3c21c13af77249d0c0bea53616c6048be586e217cb6daf4

See more details on using hashes here.

File details

Details for the file capypdf-0.12.0-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for capypdf-0.12.0-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 458abaf57f24ad5a93f408a23bc947c66d38a980076b228bf81c408a34742b7a
MD5 212e9a87ff487395645723cf25fd8f86
BLAKE2b-256 7a6b8ac5cbbd992a44301006691662f1addbe097daf54f4d9b4972c754d225b0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page