The CPDF PDF command line tool for editing PDF files. cpdf as an OCaml library
Go to file
2024-12-10 17:45:52 +00:00
compressor
docsplits
html_manual Fix up html manual to take account of tagpdf 2024-12-10 13:49:30 +00:00
manualimages
old
.gitignore
Changes Version updates 2024-12-09 16:01:11 +00:00
cpdf.1 Version updates 2024-12-09 16:01:11 +00:00
cpdf.install
cpdf.opam Version updates 2024-12-09 16:01:11 +00:00
cpdfaddtext.ml %Bookmark<n> finished 2024-11-11 18:49:11 +00:00
cpdfaddtext.mli First stab at %Bookmark<n> 2024-11-11 16:47:49 +00:00
cpdfannot.ml
cpdfannot.mli
cpdfattach.ml
cpdfattach.mli
cpdfbookmarks.ml
cpdfbookmarks.mli
cpdfchop.ml
cpdfchop.mli
cpdfcolours.ml
cpdfcolours.mli
cpdfcommand.ml Version updates 2024-12-09 16:01:11 +00: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 First stab at %Bookmark<n> 2024-11-11 16:47:49 +00:00
cpdfdraw.mli
cpdfdrawcontrol.ml
cpdfdrawcontrol.mli
cpdfembed.ml
cpdfembed.mli
cpdferror.ml
cpdferror.mli
cpdfextracttext.ml
cpdfextracttext.mli
cpdffont.ml Extend copyfont to use chains 2024-11-21 16:28:54 +00:00
cpdffont.mli
cpdfimage.ml Remove debug printing for release 2024-12-09 16:55:40 +00:00
cpdfimage.mli
cpdfimpose.ml
cpdfimpose.mli
cpdfjpeg2000.ml
cpdfjpeg2000.mli
cpdfjpeg.ml
cpdfjpeg.mli
cpdfjson.ml
cpdfjson.mli
cpdfmanual.pdf Document -collate-n 2024-12-10 17:45:52 +00:00
cpdfmanual.tex Document -collate-n 2024-12-10 17:45:52 +00:00
cpdfmetadata.ml Implement -cm -in -mm 2024-12-02 16:41:12 +00:00
cpdfmetadata.mli Scaffolding for -cm -in -mm 2024-12-02 16:29:34 +00:00
cpdfocg.ml
cpdfocg.mli
cpdfpad.ml
cpdfpad.mli
cpdfpage.ml Implement -cm -in -mm 2024-12-02 16:41:12 +00:00
cpdfpage.mli Scaffolding for -cm -in -mm 2024-12-02 16:29:34 +00:00
cpdfpagelabels.ml
cpdfpagelabels.mli
cpdfpagespec.ml
cpdfpagespec.mli
cpdfpng.ml
cpdfpng.mli
cpdfposition.ml
cpdfposition.mli
cpdfpresent.ml
cpdfpresent.mli
cpdfprinttree.ml
cpdfprinttree.mli
cpdfremovetext.ml
cpdfremovetext.mli
cpdfshape.ml
cpdfshape.mli
cpdfspot.ml
cpdfspot.mli
cpdfsqueeze.ml Remove squeeze debug commands 2024-12-05 13:42:11 +00:00
cpdfsqueeze.mli
cpdfstrftime.ml
cpdfstrftime.mli
cpdftexttopdf.ml
cpdftexttopdf.mli
cpdftoc.ml Dot leaders finished 2024-12-03 18:17:12 +00:00
cpdftoc.mli Scaffolding for dot leaders in TOC 2024-12-02 18:39:29 +00:00
cpdftruetype.ml
cpdftruetype.mli
cpdftweak.ml
cpdftweak.mli
cpdftype.ml
cpdftype.mli
cpdfua.ml
cpdfua.mli
cpdfunicodedata.ml
cpdfunicodedata.mli
cpdfunicodedata.source.ml
cpdfxmlm.ml
cpdfxmlm.mli
cpdfxobject.ml
cpdfxobject.mli
cpdfyojson.ml
cpdfyojson.mli
fixcpdfmanual PDF manual accessibility fixes 2024-12-08 12:45:35 +00:00
hello.pdf
LICENSE.md
logo.pdf
Makefile
META Version updates 2024-12-09 16:01:11 +00:00
mkinstall
OCamlMakefile
README.md Version updates 2024-12-09 16:01:11 +00:00

Coherent PDF Command Line Tools

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 or visit https://www.coherentpdf.com/

Copyright Coherent Graphics Ltd 2024.

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/

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

Java API

A Java interface to cpdf is available:

https://github.com/coherentgraphics/jcpdf

.NET API

A .NET interface to cpdf is available:

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

Source: https://github.com/coherentgraphics/coherentpdf.js

Acknowledgments

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

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

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