2024-01-23 19:48:11 +01:00
|
|
|
Coherent PDF Command Line Tools
|
|
|
|
===============================
|
2013-08-15 21:29:55 +02:00
|
|
|
|
2013-08-29 12:54:56 +02:00
|
|
|
Free for non-commercial use. See LICENSE for details. Copyright Coherent
|
2024-02-14 15:51:22 +01:00
|
|
|
Graphics Ltd 2024.
|
2013-08-29 12:54:56 +02:00
|
|
|
|
|
|
|
This code builds two things:
|
|
|
|
|
|
|
|
a) The CPDF PDF Command Line Tools, which are a popular commercial command line
|
|
|
|
tool for editing PDF files.
|
|
|
|
|
2023-05-14 18:50:32 +02:00
|
|
|
b) cpdf as an OCaml library, for which documentation is here:
|
2022-01-14 12:04:38 +01:00
|
|
|
|
|
|
|
[https://coherentpdf.com/cpdf/](https://coherentpdf.com/cpdf/)
|
|
|
|
|
2013-08-29 12:54:56 +02:00
|
|
|
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:
|
|
|
|
|
2013-09-16 14:43:55 +02:00
|
|
|
```
|
|
|
|
opam install camlpdf
|
|
|
|
```
|
2013-08-29 12:54:56 +02:00
|
|
|
|
|
|
|
To build
|
|
|
|
--------
|
|
|
|
|
2021-06-21 16:54:05 +02:00
|
|
|
If downloading from Github, obtain the correct source. This means choosing the
|
2024-02-14 15:51:22 +01:00
|
|
|
tag for a particular version, such as "v2.7". The head of the master branch
|
2024-01-23 19:48:11 +01:00
|
|
|
is unstable.
|
2015-05-12 16:13:07 +02:00
|
|
|
|
2013-09-16 14:43:55 +02:00
|
|
|
1. Type `make` to make the cpdf executable and the library
|
2013-08-29 12:54:56 +02:00
|
|
|
|
2013-09-16 14:43:55 +02:00
|
|
|
2. Type `make install` to install the OCaml cpdf library.
|
2013-08-29 12:54:56 +02:00
|
|
|
|
2013-09-16 14:43:55 +02:00
|
|
|
The `cpdf` executable should be manually placed somewhere suitable.
|
2013-08-29 12:54:56 +02:00
|
|
|
|
2013-09-16 14:43:55 +02:00
|
|
|
Alternatively, the library and command-line binary can be installed by
|
2013-08-29 12:54:56 +02:00
|
|
|
|
2013-09-16 14:43:55 +02:00
|
|
|
```
|
2013-08-29 12:54:56 +02:00
|
|
|
opam install cpdf
|
2013-09-16 14:43:55 +02:00
|
|
|
```
|
|
|
|
|
2013-08-29 12:54:56 +02:00
|
|
|
Documentation
|
|
|
|
-------------
|
|
|
|
|
2013-09-16 14:43:55 +02:00
|
|
|
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/`
|
2013-08-29 12:54:56 +02:00
|
|
|
in this folder once the library has been built.
|
|
|
|
|
2021-06-28 19:22:43 +02:00
|
|
|
C API
|
|
|
|
-----
|
|
|
|
|
|
|
|
A C interface to cpdf is available, in source and binary form:
|
|
|
|
|
2021-06-28 19:24:31 +02:00
|
|
|
[https://github.com/johnwhitington/cpdflib-source](https://github.com/johnwhitington/cpdflib-source)
|
2021-06-28 19:23:34 +02:00
|
|
|
|
2021-06-28 19:24:31 +02:00
|
|
|
[https://github.com/coherentgraphics/cpdflib-binary](https://github.com/coherentgraphics/cpdflib-binary)
|
2021-06-28 19:22:43 +02:00
|
|
|
|
2022-01-13 14:00:17 +01:00
|
|
|
Python API
|
|
|
|
----------
|
|
|
|
|
|
|
|
A Python interface to cpdf is available:
|
|
|
|
|
2024-02-24 14:05:28 +01:00
|
|
|
[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)
|
2022-01-13 14:00:17 +01:00
|
|
|
|
2023-05-14 18:50:32 +02:00
|
|
|
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.
|
|
|
|
|
2024-06-27 15:39:49 +02:00
|
|
|
The error descriptions for -verify "PDF/UA-1(matterhorn)" come from the PDF
|
2024-05-29 17:45:36 +02:00
|
|
|
Association, and are licensed under the Creative Commons Attribution 4.0
|
|
|
|
International license.
|
|
|
|
|
2013-08-29 12:54:56 +02:00
|
|
|
Contact
|
|
|
|
-------
|
|
|
|
|
2013-12-27 17:44:42 +01:00
|
|
|
[contact@coherentgraphics.co.uk](mailto:contact@coherentgraphics.co.uk)
|