The CPDF PDF command line tool for editing PDF files. cpdf as an OCaml library
Go to file
John Whitington 09d0e912ca Deprecate -squeeze-no-recompress 2023-06-21 15:38:32 +01:00
compressor
docsplits
html_manual
manualimages Finish -draw documentation first draft 2023-06-08 15:06:58 +01:00
old Remove pdfgraphics to old/ 2023-06-13 14:07:34 +01:00
.gitignore
Changes -> 2.6 2023-06-20 16:48:34 +01:00
LICENSE
META
Makefile Remove pdfgraphics to old/ 2023-06-13 14:07:34 +01:00
OCamlMakefile
README.md Acknowledgments 2023-05-14 17:50:32 +01:00
cpdf.1
cpdfaddtext.ml Remove pdfgraphics to old/ 2023-06-13 14:07:34 +01:00
cpdfaddtext.mli
cpdfannot.ml Tidying up 2023-06-20 15:31:19 +01:00
cpdfannot.mli
cpdfattach.ml
cpdfattach.mli
cpdfbookmarks.ml
cpdfbookmarks.mli
cpdfcolours.ml more 2023-06-07 16:35:26 +01:00
cpdfcolours.mli more 2023-06-07 15:39:04 +01:00
cpdfcommand.ml Deprecate -squeeze-no-recompress 2023-06-21 15:38:32 +01:00
cpdfcommand.mli
cpdfcommandrun.ml
cpdfcomposition.ml
cpdfcomposition.mli
cpdfcoord.ml
cpdfcoord.mli
cpdfcreate.ml
cpdfcreate.mli
cpdfdebug.ml
cpdfdebug.mli
cpdfdraft.ml
cpdfdraft.mli
cpdfdraw.ml
cpdfdraw.mli
cpdfembed.ml Fighting with embedding 2023-06-13 16:25:10 +01:00
cpdfembed.mli
cpdferror.ml
cpdferror.mli
cpdfextracttext.ml
cpdfextracttext.mli
cpdffont.ml
cpdffont.mli
cpdfimage.ml Direct PNG output was misinformed 2023-06-14 18:38:26 +01:00
cpdfimage.mli
cpdfimpose.ml
cpdfimpose.mli
cpdfjpeg.ml
cpdfjpeg.mli
cpdfjson.ml
cpdfjson.mli
cpdfmanual.pdf Deprecate -squeeze-no-recompress 2023-06-21 15:38:32 +01:00
cpdfmanual.tex Deprecate -squeeze-no-recompress 2023-06-21 15:38:32 +01:00
cpdfmetadata.ml
cpdfmetadata.mli
cpdfocg.ml
cpdfocg.mli
cpdfpad.ml
cpdfpad.mli
cpdfpage.ml
cpdfpage.mli
cpdfpagelabels.ml
cpdfpagelabels.mli
cpdfpagespec.ml
cpdfpagespec.mli
cpdfpng.ml
cpdfpng.mli
cpdfposition.ml
cpdfposition.mli
cpdfpresent.ml
cpdfpresent.mli
cpdfremovetext.ml
cpdfremovetext.mli
cpdfshape.ml Remove pdfgraphics to old/ 2023-06-13 14:07:34 +01:00
cpdfshape.mli Remove pdfgraphics to old/ 2023-06-13 14:07:34 +01:00
cpdfspot.ml
cpdfspot.mli
cpdfsqueeze.ml Deprecate -squeeze-no-recompress 2023-06-21 15:38:32 +01:00
cpdfsqueeze.mli Deprecate -squeeze-no-recompress 2023-06-21 15:38:32 +01:00
cpdfstrftime.ml
cpdfstrftime.mli
cpdftexttopdf.ml closer..closer.... 2023-06-13 20:23:59 +01:00
cpdftexttopdf.mli
cpdftoc.ml
cpdftoc.mli
cpdftruetype.ml Finishing for week 2023-06-16 17:24:13 +01:00
cpdftruetype.mli
cpdftweak.ml
cpdftweak.mli
cpdftype.ml
cpdftype.mli
cpdfunicodedata.ml
cpdfunicodedata.mli
cpdfunicodedata.source.ml
cpdfxmlm.ml
cpdfxmlm.mli
cpdfxobject.ml
cpdfxobject.mli
cpdfyojson.ml
cpdfyojson.mli
hello.pdf
logo.pdf
mkinstall

README.md

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