The CPDF PDF command line tool for editing PDF files. cpdf as an OCaml library
Go to file
John Whitington 28fe2a7f6f Document -info / OpenAction 2024-11-07 19:14:51 +00:00
compressor
docsplits Ready for updated cpdfdocs.js 2024-05-10 14:20:36 +08:00
html_manual
manualimages docs 2024-09-23 16:32:05 +01:00
old Spelling 2024-09-04 13:22:21 +01:00
.gitignore
Changes Changes 2024-11-07 17:35:32 +00:00
LICENSE.md Fix license, YoJson attribution 2024-08-02 18:11:37 +01:00
META Fix source + docs for v2.7.2 2024-10-23 15:26:14 +01:00
Makefile Add subformat / title 2024-10-02 14:20:51 +01:00
OCamlMakefile
README.md Fix source + docs for v2.7.2 2024-10-23 15:26:14 +01:00
cpdf.1 update 2024-10-28 12:29:54 +00:00
cpdf.install Move .install file to root 2023-08-15 17:58:29 +01:00
cpdf.opam Fix source + docs for v2.7.2 2024-10-23 15:26:14 +01:00
cpdfaddtext.ml harded against attempts to build empty truetype fonts 2024-05-08 10:48:10 +08:00
cpdfaddtext.mli Docstring fixes for v2.7 2024-03-04 15:16:14 +00:00
cpdfannot.ml Fix link rewriting in -set-annotations 2023-09-19 13:43:21 +01:00
cpdfannot.mli
cpdfattach.ml Modernize @B bookmark namer 2024-11-04 15:06:34 +00:00
cpdfattach.mli Modernize @B bookmark namer 2024-11-04 15:06:34 +00:00
cpdfbookmarks.ml @b 2024-11-04 16:29:43 +00:00
cpdfbookmarks.mli
cpdfchop.ml Finished -chop-v, -chop-h 2024-02-05 15:29:54 +00:00
cpdfchop.mli Docstring fixes for v2.7 2024-03-04 15:16:14 +00:00
cpdfcolours.ml
cpdfcolours.mli Documentation for new v2.6 features 2023-07-27 12:05:18 +01:00
cpdfcommand.ml Rewrite W/H when -jpeg-to-jpeg 2024-11-06 14:54:02 +00:00
cpdfcommand.mli Clean up Cpdfcommand/Cpdfdrawcontrol mutual recursion 2023-10-04 15:07:29 +01:00
cpdfcommandrun.ml
cpdfcomposition.ml Add piece info to composition 2024-11-05 11:51:47 +00:00
cpdfcomposition.mli Docstring fixes for v2.7 2024-03-04 15:16:14 +00:00
cpdfcoord.ml Update and modernize page characteristics 2024-11-05 14:59:02 +00:00
cpdfcoord.mli
cpdfcreate.ml
cpdfcreate.mli
cpdfdebug.ml
cpdfdebug.mli
cpdfdraft.ml Use new CamlPDF option to avoid pointless compression 2023-12-16 20:18:06 +00:00
cpdfdraft.mli
cpdfdraw.ml Preserve nested stags 2024-10-28 14:09:01 +00:00
cpdfdraw.mli Fix source + docs for v2.7.2 2024-10-23 15:26:14 +01:00
cpdfdrawcontrol.ml Rework autotagging 2024-09-27 12:40:36 +01:00
cpdfdrawcontrol.mli Rework, add elt_info 2024-09-26 15:22:22 +01:00
cpdfembed.ml harded against attempts to build empty truetype fonts 2024-05-08 10:48:10 +08:00
cpdfembed.mli Move Standard 14 substitute loading into Cpdfembed 2024-04-01 19:03:31 +01:00
cpdferror.ml First working roundtrip structure tree 2024-06-05 15:26:12 +01:00
cpdferror.mli
cpdfextracttext.ml
cpdfextracttext.mli Documentation for new v2.6 features 2023-07-27 12:05:18 +01:00
cpdffont.ml Fix missing_fonts for Type3 2024-07-02 18:17:00 +01:00
cpdffont.mli Documentation strings and typos 2024-07-19 18:30:57 +01:00
cpdfimage.ml Warning 2024-11-06 20:13:57 +00:00
cpdfimage.mli Plumbing for -jpeg-to-jpeg-scale, -jpeg-to-jpeg-dpi 2024-11-05 14:02:57 +00:00
cpdfimpose.ml
cpdfimpose.mli
cpdfjpeg.ml Allow Exit JPEGs 2023-11-14 14:42:39 +00:00
cpdfjpeg.mli Documentation for new v2.6 features 2023-07-27 12:05:18 +01:00
cpdfjpeg2000.ml Silence no-return warning 2024-04-16 07:49:11 +08:00
cpdfjpeg2000.mli Skeleton for JPEG2000 support 2024-03-20 20:24:44 +00:00
cpdfjson.ml Account for CamlPDF comment changes 2024-09-20 17:22:12 +01:00
cpdfjson.mli v2.6 documentation 2023-07-27 13:21:15 +01:00
cpdfmanual.pdf Document -info / OpenAction 2024-11-07 19:14:51 +00:00
cpdfmanual.tex Document -info / OpenAction 2024-11-07 19:14:51 +00:00
cpdfmetadata.ml Report openaction in -info[-json] 2024-11-07 18:23:07 +00:00
cpdfmetadata.mli Set document language with -set-language 2024-06-12 17:21:20 +01:00
cpdfocg.ml
cpdfocg.mli
cpdfpad.ml Removal or commenting of unused code 2024-02-23 16:17:12 +00:00
cpdfpad.mli
cpdfpage.ml -center-to-fit done 2024-10-31 14:48:56 +00:00
cpdfpage.mli Fix up center_to_fit scaffolding 2024-10-31 14:07:40 +00:00
cpdfpagelabels.ml
cpdfpagelabels.mli
cpdfpagespec.ml Removal or commenting of unused code 2024-02-23 16:17:12 +00:00
cpdfpagespec.mli Fix source + docs for v2.7.2 2024-10-23 15:26:14 +01:00
cpdfpng.ml Removal or commenting of unused code 2024-02-23 16:17:12 +00:00
cpdfpng.mli Extend PNG loading to greyscale and 16bpp 2024-01-01 11:46:32 +00:00
cpdfposition.ml
cpdfposition.mli
cpdfpresent.ml
cpdfpresent.mli
cpdfprinttree.ml Add Jambon's tree printer 2024-06-27 13:36:05 +01:00
cpdfprinttree.mli Docstrings 2024-07-24 15:05:02 +01:00
cpdfremovetext.ml warning 39 2024-02-27 15:57:31 +00:00
cpdfremovetext.mli Documentation for new v2.6 features 2023-07-27 12:05:18 +01:00
cpdfshape.ml Removal or commenting of unused code 2024-02-23 16:17:12 +00:00
cpdfshape.mli Documentation for new v2.6 features 2023-07-27 12:05:18 +01:00
cpdfspot.ml Removal or commenting of unused code 2024-02-23 16:17:12 +00:00
cpdfspot.mli
cpdfsqueeze.ml Removal or commenting of unused code 2024-02-23 16:17:12 +00:00
cpdfsqueeze.mli Deprecate -squeeze-no-recompress 2023-06-21 15:38:32 +01:00
cpdfstrftime.ml Removal or commenting of unused code 2024-02-23 16:17:12 +00:00
cpdfstrftime.mli
cpdftexttopdf.ml Clean up chains 2024-10-23 13:44:31 +01:00
cpdftexttopdf.mli Scaffolding for struct trees in typesetter 2024-10-02 13:27:57 +01:00
cpdftoc.ml Allow bold, italic, colours for bookmarks 2024-11-03 17:33:08 +00:00
cpdftoc.mli
cpdftruetype.ml Truetype cmap matterhorns 2024-06-21 17:27:40 +01:00
cpdftruetype.mli Truetype cmap matterhorns 2024-06-21 17:27:40 +01:00
cpdftweak.ml
cpdftweak.mli Docstring fixes for v2.7 2024-03-04 15:16:14 +00:00
cpdftype.ml More structure tree work 2024-10-03 16:18:09 +01:00
cpdftype.mli Fix source + docs for v2.7.2 2024-10-23 15:26:14 +01:00
cpdfua.ml Clean up chains 2024-10-23 13:44:31 +01:00
cpdfua.mli Fix source + docs for v2.7.2 2024-10-23 15:26:14 +01:00
cpdfunicodedata.ml Removal or commenting of unused code 2024-02-23 16:17:12 +00:00
cpdfunicodedata.mli
cpdfunicodedata.source.ml Removal or commenting of unused code 2024-02-23 16:17:12 +00:00
cpdfxmlm.ml
cpdfxmlm.mli
cpdfxobject.ml
cpdfxobject.mli
cpdfyojson.ml Fix license, YoJson attribution 2024-08-02 18:11:37 +01:00
cpdfyojson.mli Fix license, YoJson attribution 2024-08-02 18:11:37 +01:00
hello.pdf Update 2024-10-28 12:32:14 +00:00
logo.pdf
mkinstall

README.md

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