Skip to main content

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


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

Uploaded Source

Built Distributions

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

Uploaded Python 3Windows x86-64

capypdf-0.16.0-py3-none-macosx_15_0_arm64.whl (1.3 MB view details)

Uploaded Python 3macOS 15.0+ ARM64

File details

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

File metadata

  • Download URL: capypdf-0.16.0.tar.gz
  • Upload date:
  • Size: 6.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for capypdf-0.16.0.tar.gz
Algorithm Hash digest
SHA256 86d90e4a4cc0f8bbbe9ab6760c22c4f4b61101340d89ffc1337b138ebec65af1
MD5 46b91e9a9af4fbea1bdb38083ee0ba4b
BLAKE2b-256 549236af94d33459de7f16a6875c3c5d62557ba79ef690e11248277045ab671f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: capypdf-0.16.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.16.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 00a4b1e4d2bec6815b6b5feffbd96eb1588eb3b52e8667ac793526dc3b6ad5ce
MD5 4bab73e340215d27bb67f961918c2b6e
BLAKE2b-256 bf90b269632e02c817948b39f53cfd65a83295c7008220b4fea4bae5e81cf899

See more details on using hashes here.

File details

Details for the file capypdf-0.16.0-py3-none-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for capypdf-0.16.0-py3-none-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 1b9749301ab1976d03dfe858379be72c6f132aeb5651eca56993469e3204d46f
MD5 3306aa3ec66b0e0d5c69c1b7bef290a2
BLAKE2b-256 fa6672d5c5e043f63e20a9ebe5eedac8424d4d900e0700babb7af1d97752b7d7

See more details on using hashes here.

Supported by

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