The CPDF PDF command line tool for editing PDF files. cpdf as an OCaml library
Go to file
John Whitington 3bb87b6352 more 2023-02-17 15:46:09 +00:00
compressor
debug
dotnetsplits
html_manual
javascriptsplits
javasplits
pysplits
splits
test
.gitignore
Changes more 2023-02-15 21:28:44 +00:00
LICENSE
META
Makefile
OCamlMakefile
README.md
blank.pdf
blank20.pdf
blankowneruser.pdf
cpdf.1
cpdfaddtext.ml
cpdfaddtext.mli
cpdfannot.ml more 2023-02-17 15:30:39 +00:00
cpdfannot.mli
cpdfattach.ml
cpdfattach.mli
cpdfbookmarks.ml more 2023-02-17 15:30:39 +00:00
cpdfbookmarks.mli
cpdfcommand.ml more 2023-02-17 15:30:39 +00:00
cpdfcommand.mli
cpdfcommandrun.ml
cpdfcoord.ml
cpdfcoord.mli
cpdfcreate.ml
cpdfcreate.mli
cpdfdebug.ml
cpdfdebug.mli
cpdfdraft.ml
cpdfdraft.mli
cpdfdraw.ml
cpdfdraw.mli
cpdfembed.ml more 2022-11-22 15:09:21 +00:00
cpdfembed.mli
cpdferror.ml
cpdferror.mli
cpdfextracttext.ml
cpdfextracttext.mli
cpdffont.ml
cpdffont.mli
cpdfimage.ml
cpdfimage.mli
cpdfimpose.ml
cpdfimpose.mli
cpdfjpeg.ml
cpdfjpeg.mli
cpdfjson.ml UTF8 mode finished 2023-02-17 15:45:09 +00:00
cpdfjson.mli more 2023-02-17 15:30:39 +00:00
cpdfmanual.pdf more 2023-02-10 14:33:07 +00:00
cpdfmanual.tex more 2023-02-17 15:46:09 +00: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
cpdfspot.ml
cpdfspot.mli
cpdfsqueeze.ml more 2023-02-03 13:01:55 +00:00
cpdfsqueeze.mli
cpdfstrftime.ml
cpdfstrftime.mli
cpdftexttopdf.ml
cpdftexttopdf.mli
cpdftoc.ml
cpdftoc.mli
cpdftruetype.ml
cpdftruetype.mli
cpdftweak.ml more 2023-01-17 13:37:54 +08:00
cpdftweak.mli more 2023-01-17 13:37:54 +08:00
cpdftype.ml
cpdftype.mli
cpdfunicodedata.ml
cpdfunicodedata.mli
cpdfunicodedata.source.ml
cpdfutil.ml
cpdfutil.mli
cpdfxmlm.ml
cpdfxmlm.mli
cpdfxobject.ml
cpdfxobject.mli
cpdfyojson.ml
cpdfyojson.mli
hello.pdf
logo.pdf
mkinstall
splitjs
splitwrapper

README.md

cpdf-source

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

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 presently-scanty 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/

Contact

contact@coherentgraphics.co.uk