File: README.md

package info (click to toggle)
cpdf 2.9-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 7,140 kB
  • sloc: ml: 35,825; makefile: 66; sh: 49
file content (145 lines) | stat: -rw-r--r-- 3,956 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<img width="400" height="163" alt="cpdf logo" src="https://github.com/user-attachments/assets/af9e0a36-4bf3-49e0-b7c0-2534e7e1f0d6" />

Coherent PDF Command Line Tools
===============================

(If you are looking for binaries, there are here: https://www.github.com/coherentgraphics/cpdf-binaries )

CPDF is distributed under the AGPL - see LICENSE.md. If you are unable to abide
by the terms of the AGPL, you will need a commercial license.

For commercial licenses, email
[contact@coherentgraphics.co.uk](mailto:contact@coherentgraphics.co.uk) or
visit [https://www.coherentpdf.com/](https://www.coherentpdf.com/)

Copyright Coherent Graphics Ltd 2026.

Keep up to date by joining the very low volume cpdf-announce mailing list:

https://groups.google.com/g/cpdf-announce/

This code builds two things:

a) The CPDF PDF command line tool for editing PDF files.

b) cpdf as an OCaml library, for which documentation is here:

[https://coherentpdf.com/cpdf/](https://coherentpdf.com/cpdf/)

Prerequisites to build
----------------------

The OCaml compiler

[http://ocaml.org](http://ocaml.org)

The camlpdf library

[http://github.com/johnwhitington/camlpdf](http://www.github.com/johnwhitington/camlpdf)

The ocamlfind library manager

[http://projects.camlcity.org/projects/findlib.html](http://projects.camlcity.org/projects/findlib.html)

If you are using the OPAM package manager:

[http://opam.ocamlpro.com](http://opam.ocamlpro.com)

these can be installed by:

```
opam install camlpdf
```

To build
--------

If downloading from Github, obtain the correct source. This means choosing the
tag for a particular version, such as "v2.9". The head of the master branch
is unstable.

1. Type `make` to make the cpdf executable and the library

2. Type `make install` to install the OCaml cpdf library.

The `cpdf` executable should be manually placed somewhere suitable.

Alternatively, the library and command-line binary can be installed by

```
opam install cpdf
```
Package management

•	OPAM CamlPDF / CPDF
•	Debian
•	Fedora
•	Homebrew
•	Winget
•	Choco

Documentation
-------------

The file `cpdfmanual.pdf` in this folder is the documentation for the command
line tools. The documentation for the cpdf OCaml library is in `doc/html/cpdf/`
in this folder once the library has been built.

C API
-----

A C interface to cpdf is available, in source and binary form:

[https://github.com/johnwhitington/cpdflib-source](https://github.com/johnwhitington/cpdflib-source)

[https://github.com/coherentgraphics/cpdflib-binary](https://github.com/coherentgraphics/cpdflib-binary)

Python API
----------

A Python interface to cpdf is available:

[https://pypi.org/project/pycpdflib](https://pypi.org/project/pycpdflib)

Java API
--------

A Java interface to cpdf is available:

[https://github.com/coherentgraphics/jcpdf](https://github.com/coherentgraphics/jcpdf)

.NET API
--------

A .NET interface to cpdf is available:

[https://github.com/coherentgraphics/dotnet-libcpdf](https://github.com/coherentgraphics/dotnet-libcpdf)

JavaScript API
--------------

A JavaScript version of cpdf, for server and client side is available:

Distribution: [https://www.npmjs.com/package/coherentpdf](https://www.npmjs.com/package/coherentpdf)

Source: [https://github.com/coherentgraphics/coherentpdf.js](https://github.com/coherentgraphics/coherentpdf.js)

Acknowledgments
---------------

The file [cpdfxmlm.ml](cpdfxmlm.ml) was written by Daniel Bünzli.

The file [cpdfyojson.ml](cpdfyojson.ml) was written by Martin Jambon and others.

Unicode Data Files are under the Unicode Inc. License agreement.

The error descriptions for -verify "PDF/UA-1(matterhorn)" come from the PDF
Association, and are licensed under the Creative Commons Attribution 4.0
International license.

PDF/UA support in Cpdf was implemented under NLnet grant 2023-12-031.

Contact
-------

[contact@coherentgraphics.co.uk](mailto:contact@coherentgraphics.co.uk)