The CPDF PDF command line tool for editing PDF files. cpdf as an OCaml library
Go to file
John Whitington d812881619 Optional content checks 2024-06-19 16:57:50 +01:00
compressor more 2023-04-13 16:56:32 +01:00
docsplits Ready for updated cpdfdocs.js 2024-05-10 14:20:36 +08:00
html_manual more 2022-08-19 15:48:56 +01:00
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 Changes 2024-06-18 14:47:04 +01:00
LICENSE more 2023-04-13 16:56:32 +01:00
META Cleaning up 2023-04-13 17:07:55 +01:00
Makefile New module for PDF/UA 2024-05-28 16:59:41 +01:00
OCamlMakefile more 2023-03-14 19:57:42 +00:00
README.md Beginning to encode matterhorn protocol 2024-05-29 16:45:36 +01:00
cpdf.1 Updates for v2.7 2024-02-14 14:51:22 +00:00
cpdf.install Move .install file to root 2023-08-15 17:58:29 +01:00
cpdf.opam Updates for v2.7 2024-02-14 14:51:22 +00: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 more 2023-04-22 16:58:05 +01:00
cpdfattach.ml Use new logger 2023-04-25 13:45:56 +01:00
cpdfattach.mli more 2023-04-16 14:44:34 +01:00
cpdfbookmarks.ml Removal or commenting of unused code 2024-02-23 16:17:12 +00:00
cpdfbookmarks.mli Code for cpdflib 2022-01-16 18:39:42 +00:00
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 more 2023-06-07 16:35:26 +01:00
cpdfcolours.mli Documentation for new v2.6 features 2023-07-27 12:05:18 +01:00
cpdfcommand.ml Add -remove-mark 2024-06-18 15:28:19 +01:00
cpdfcommand.mli Clean up Cpdfcommand/Cpdfdrawcontrol mutual recursion 2023-10-04 15:07:29 +01:00
cpdfcommandrun.ml Return cpdf.top to working order 2022-01-11 19:13:46 +00:00
cpdfcomposition.ml Remove nonstandard JSON tuples, replacement scaffolding 2024-06-04 15:29:29 +01:00
cpdfcomposition.mli Docstring fixes for v2.7 2024-03-04 15:16:14 +00:00
cpdfcoord.ml more 2023-05-02 16:09:10 +01:00
cpdfcoord.mli More on drawing 2022-12-01 17:21:13 +00:00
cpdfcreate.ml Newly-created files get IDs by default 2023-05-09 15:02:59 +01:00
cpdfcreate.mli more 2022-01-13 16:35:03 +00:00
cpdfdebug.ml
cpdfdebug.mli more 2022-01-13 13:43:23 +00:00
cpdfdraft.ml Use new CamlPDF option to avoid pointless compression 2023-12-16 20:18:06 +00:00
cpdfdraft.mli more 2022-01-13 16:35:03 +00:00
cpdfdraw.ml Removal or commenting of unused code 2024-02-23 16:17:12 +00:00
cpdfdraw.mli v2.6 documentation 2023-07-27 13:21:15 +01:00
cpdfdrawcontrol.ml Support memory JPEGs and PNGs for cpdflib 2024-03-26 20:02:41 +00:00
cpdfdrawcontrol.mli Support memory JPEGs and PNGs for cpdflib 2024-03-26 20:02:41 +00: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 more 2022-01-13 13:43:23 +00:00
cpdfextracttext.ml more 2022-09-27 19:58:27 +01:00
cpdfextracttext.mli Documentation for new v2.6 features 2023-07-27 12:05:18 +01:00
cpdffont.ml Matterhron 31_009 2024-06-08 13:41:18 +01:00
cpdffont.mli Matterhron 31_009 2024-06-08 13:41:18 +01:00
cpdfimage.ml Make sure JPEG2000 images are listed 2024-03-22 15:33:08 +00:00
cpdfimage.mli Skeleton for JPEG2000 images 2024-03-22 13:57:04 +00:00
cpdfimpose.ml q/Q/BT/ET by data structure 2023-05-09 14:30:30 +01:00
cpdfimpose.mli more 2022-01-13 16:18:54 +00:00
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 Update for CamlPDF inline image changes 2023-11-28 17:13:36 +00:00
cpdfjson.mli v2.6 documentation 2023-07-27 13:21:15 +01:00
cpdfmanual.pdf JSON typo 2024-06-09 16:08:47 +01:00
cpdfmanual.tex JSON typo 2024-06-09 16:08:47 +01:00
cpdfmetadata.ml Report mark info, and add matterhorn suspects test 2024-06-18 13:11:31 +01:00
cpdfmetadata.mli Set document language with -set-language 2024-06-12 17:21:20 +01:00
cpdfocg.ml Correct UTF8 outputs 2022-01-04 17:17:37 +00:00
cpdfocg.mli more 2022-01-13 16:18:54 +00:00
cpdfpad.ml Removal or commenting of unused code 2024-02-23 16:17:12 +00:00
cpdfpad.mli more 2022-01-13 16:18:54 +00:00
cpdfpage.ml Support for JSON page info in cpdflib 2024-02-08 14:33:11 +00:00
cpdfpage.mli Docstring fixes for v2.7 2024-03-04 15:16:14 +00:00
cpdfpagelabels.ml more 2022-01-08 16:21:28 +00:00
cpdfpagelabels.mli more 2022-01-13 16:18:54 +00:00
cpdfpagespec.ml Removal or commenting of unused code 2024-02-23 16:17:12 +00:00
cpdfpagespec.mli v2.6 documentation 2023-07-27 13:21:15 +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 More positions 2023-04-07 15:31:21 +01:00
cpdfposition.mli More positions 2023-04-07 15:31:21 +01:00
cpdfpresent.ml
cpdfpresent.mli more 2022-01-13 15:18:21 +00: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 more 2022-01-13 16:18:54 +00:00
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 Allow typesetting of the empty document 2024-05-06 15:37:58 +08:00
cpdftexttopdf.mli more 2022-10-19 13:48:13 +01:00
cpdftoc.ml Clear font cache on initialisation 2023-07-21 15:21:09 +01:00
cpdftoc.mli more 2022-10-19 15:34:19 +01:00
cpdftruetype.ml Round away from zero 2024-05-10 10:50:35 +08:00
cpdftruetype.mli Final v2.6 doc fixes 2023-07-27 13:33:44 +01:00
cpdftweak.ml removal of old things 2023-04-12 19:37:30 +01:00
cpdftweak.mli Docstring fixes for v2.7 2024-03-04 15:16:14 +00:00
cpdftype.ml Allow typesetting of the empty document 2024-05-06 15:37:58 +08:00
cpdftype.mli v2.6 documentation 2023-07-27 13:21:15 +01:00
cpdfua.ml Optional content checks 2024-06-19 16:57:50 +01:00
cpdfua.mli Add -remove-mark 2024-06-18 15:28:19 +01:00
cpdfunicodedata.ml Removal or commenting of unused code 2024-02-23 16:17:12 +00:00
cpdfunicodedata.mli more 2022-01-13 13:43:23 +00:00
cpdfunicodedata.source.ml Removal or commenting of unused code 2024-02-23 16:17:12 +00:00
cpdfxmlm.ml Remove -w3 and fix deprecations 2022-04-09 14:13:12 +02:00
cpdfxmlm.mli
cpdfxobject.ml more 2021-12-21 15:33:56 +00:00
cpdfxobject.mli more 2022-01-13 16:35:03 +00:00
cpdfyojson.ml Update Yojson ready for OCaml 5 2022-08-15 19:37:51 +01:00
cpdfyojson.mli Update Yojson ready for OCaml 5 2022-08-15 19:37:51 +01:00
hello.pdf
logo.pdf
mkinstall

README.md

Coherent PDF Command Line Tools

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

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.7". 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-pdfua "matterhorn1.1" come from the PDF Association, and are licensed under the Creative Commons Attribution 4.0 International license.

Contact

contact@coherentgraphics.co.uk