Skip to content

johnwhitington/cpdf-source

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
April 13, 2023 16:56
April 13, 2023 17:07
August 19, 2022 15:48
old
June 13, 2023 14:07
January 12, 2017 19:53
April 13, 2023 16:56
April 13, 2023 17:07
March 14, 2023 19:57
May 14, 2023 17:50
July 27, 2023 13:41
July 27, 2023 13:21
June 20, 2023 15:31
April 22, 2023 16:58
April 25, 2023 13:45
April 16, 2023 14:44
April 21, 2023 16:22
January 16, 2022 18:39
June 7, 2023 16:35
April 16, 2023 14:44
May 2, 2023 16:09
December 1, 2022 17:21
January 13, 2022 16:35
December 21, 2021 11:12
January 13, 2022 13:43
December 31, 2021 19:33
January 13, 2022 16:35
July 27, 2023 13:21
July 27, 2023 13:21
July 27, 2023 13:33
October 2, 2021 12:22
January 13, 2022 13:43
September 27, 2022 19:58
April 25, 2023 13:45
January 13, 2022 16:35
January 13, 2022 16:35
January 13, 2022 16:18
December 23, 2022 13:14
April 25, 2023 13:45
July 27, 2023 13:21
August 4, 2023 16:42
April 25, 2023 13:45
April 18, 2023 14:42
January 4, 2022 17:17
January 13, 2022 16:18
May 10, 2023 19:11
January 13, 2022 16:18
January 8, 2022 16:21
January 13, 2022 16:18
March 30, 2023 13:39
July 27, 2023 13:21
April 7, 2023 15:31
April 7, 2023 15:31
December 17, 2021 16:12
January 13, 2022 15:18
March 23, 2023 19:24
December 19, 2021 13:26
January 13, 2022 16:18
April 25, 2023 13:45
July 23, 2021 16:26
July 20, 2023 13:35
October 19, 2022 13:48
October 19, 2022 15:34
April 12, 2023 19:37
April 12, 2023 19:37
July 20, 2023 12:56
July 27, 2023 13:21
April 13, 2023 16:56
January 13, 2022 13:43
April 13, 2023 16:56
October 5, 2021 17:16
December 21, 2021 15:33
January 13, 2022 16:35
June 20, 2021 16:27

cpdf-source

Free for non-commercial use. See LICENSE for details. Copyright Coherent Graphics Ltd 2023.

This code builds two things:

a) The CPDF PDF Command Line Tools, which are a popular commercial command line tool for editing PDF files.

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

https://coherentpdf.com/cpdf/

Prerequisites to build

The OCaml compiler

http://ocaml.org

The camlpdf library

http://github.com/johnwhitington/camlpdf

The ocamlfind library manager

http://projects.camlcity.org/projects/findlib.html

If you are using the OPAM package manager:

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.5". 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

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/coherentgraphics/cpdflib-binary

Python API

A Python interface to cpdf is available:

https://pypi.org/project/pycpdflib/

Acknowledgments

The file cpdfxmlm.ml was written by Daniel Bünzli.

The file cpdfyojson.ml was written by Martin Jambon and others.

Contact

contact@coherentgraphics.co.uk