The CPDF PDF command line tool for editing PDF files. cpdf as an OCaml library
Go to file
John Whitington 030d1c7018 more 2023-03-14 18:36:37 +00:00
compressor more 2022-01-13 13:04:57 +00:00
debug more 2021-10-25 16:26:30 +01:00
dotnetsplits more 2022-03-09 14:11:10 +01:00
html_manual more 2022-08-19 15:48:56 +01:00
javascriptsplits more 2022-08-17 16:13:08 +01:00
javasplits more 2022-04-04 17:06:06 +02:00
pysplits more 2022-01-23 15:08:18 +00:00
splits move papersize enum 2022-03-04 18:33:51 +00:00
test more 2021-11-02 13:56:45 +00:00
.gitignore more 2017-01-12 19:53:46 +00:00
Changes more 2023-03-14 18:36:37 +00:00
LICENSE more 2022-01-20 19:44:31 +00:00
META more 2021-11-12 14:00:57 -08:00
Makefile more 2023-03-02 17:29:14 +00:00
OCamlMakefile Removed dependency on Unix 2013-11-11 16:39:45 +00:00
README.md more 2022-01-14 11:04:38 +00:00
blank.pdf more 2016-11-01 18:12:16 +00:00
blank20.pdf More work on new bookmarks format 2017-11-04 16:24:14 +00:00
blankowneruser.pdf more manual fixes w.r.t recrypt 2014-11-18 14:57:18 +00:00
cpdf.1 more 2022-01-13 13:06:15 +00:00
cpdfaddtext.ml sum and fsum 2023-03-12 16:29:32 +00:00
cpdfaddtext.mli more 2022-10-19 16:32:56 +01:00
cpdfannot.ml more 2023-02-20 19:39:42 +00:00
cpdfannot.mli more 2023-01-13 14:30:46 +08:00
cpdfattach.ml Fix to work with CamlPDF new getnum 2022-07-14 14:06:25 +01:00
cpdfattach.mli more 2022-01-13 15:18:21 +00:00
cpdfbookmarks.ml more 2023-02-17 15:30:39 +00:00
cpdfbookmarks.mli Code for cpdflib 2022-01-16 18:39:42 +00:00
cpdfcommand.ml more 2023-03-06 19:11:12 +00:00
cpdfcommand.mli demo gone 2021-10-15 17:18:23 +01:00
cpdfcommandrun.ml Return cpdf.top to working order 2022-01-11 19:13:46 +00:00
cpdfcoord.ml Fix to work with CamlPDF new getnum 2022-07-14 14:06:25 +01:00
cpdfcoord.mli More on drawing 2022-12-01 17:21:13 +00:00
cpdfcreate.ml more 2021-12-21 11:12:52 +00:00
cpdfcreate.mli more 2022-01-13 16:35:03 +00:00
cpdfdebug.ml more 2021-12-21 11:12:52 +00:00
cpdfdebug.mli more 2022-01-13 13:43:23 +00:00
cpdfdraft.ml tidying 2021-12-31 19:33:34 +00:00
cpdfdraft.mli more 2022-01-13 16:35:03 +00:00
cpdfdraw.ml more 2022-12-22 20:42:55 +00:00
cpdfdraw.mli more 2022-12-22 20:42:55 +00:00
cpdfembed.ml more 2023-02-20 12:56:59 +00:00
cpdfembed.mli more 2023-02-20 12:56:59 +00:00
cpdferror.ml Split off a little code 2021-10-02 12:22:59 +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 more 2022-09-27 19:58:27 +01:00
cpdffont.ml more 2023-02-21 14:50:07 +00:00
cpdffont.mli more 2022-01-13 16:35:03 +00:00
cpdfimage.ml Fix to work with CamlPDF new getnum 2022-07-14 14:06:25 +01:00
cpdfimage.mli more 2022-01-13 16:35:03 +00:00
cpdfimpose.ml Fix to work with CamlPDF new getnum 2022-07-14 14:06:25 +01:00
cpdfimpose.mli more 2022-01-13 16:18:54 +00:00
cpdfjpeg.ml more 2022-12-23 13:14:24 +00:00
cpdfjpeg.mli more 2022-12-23 13:14:24 +00:00
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-27 18:50:10 +00:00
cpdfmanual.tex more 2023-03-09 11:09:24 +00:00
cpdfmetadata.ml tidying 2021-12-31 19:33:34 +00:00
cpdfmetadata.mli more 2022-01-13 15:18:21 +00: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 tidying 2021-12-31 19:33:34 +00:00
cpdfpad.mli more 2022-01-13 16:18:54 +00:00
cpdfpage.ml more 2022-09-21 17:40:28 +01:00
cpdfpage.mli more 2022-01-13 16:18:54 +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 Extend DUP to 999999 pages 2023-03-14 18:34:16 +00:00
cpdfpagespec.mli Intial implementation of page labels in ranges 2023-03-13 21:28:03 +00:00
cpdfpng.ml sum and fsum 2023-03-12 16:29:32 +00:00
cpdfpng.mli Beginning on -jpeg, -png 2023-01-11 12:12:51 +08:00
cpdfposition.ml more 2022-09-21 17:40:28 +01:00
cpdfposition.mli more 2022-09-21 17:40:28 +01:00
cpdfpresent.ml more 2021-12-17 16:12:03 +00:00
cpdfpresent.mli more 2022-01-13 15:18:21 +00:00
cpdfremovetext.ml more 2022-09-27 19:58:27 +01:00
cpdfremovetext.mli more 2022-09-27 19:58:27 +01:00
cpdfspot.ml more 2021-12-19 13:26:15 +00:00
cpdfspot.mli more 2022-01-13 16:18:54 +00:00
cpdfsqueeze.ml more 2023-02-20 12:56:59 +00:00
cpdfsqueeze.mli more 2022-01-13 16:18:54 +00:00
cpdfstrftime.ml more 2022-06-07 16:51:03 +01:00
cpdfstrftime.mli stderr unbuffered 2021-07-23 16:26:07 +01:00
cpdftexttopdf.ml more 2022-10-20 15:06:49 +01:00
cpdftexttopdf.mli more 2022-10-19 13:48:13 +01:00
cpdftoc.ml more 2022-10-19 16:45:52 +01:00
cpdftoc.mli more 2022-10-19 15:34:19 +01:00
cpdftruetype.ml more 2022-11-25 11:55:22 +00:00
cpdftruetype.mli more 2022-10-10 16:40:57 +01:00
cpdftweak.ml more 2023-01-17 13:37:54 +08:00
cpdftweak.mli more 2023-01-17 13:37:54 +08:00
cpdftype.ml Revert to fonts not fontpacks in cpdftype 2022-10-18 13:48:35 +01:00
cpdftype.mli Revert to fonts not fontpacks in cpdftype 2022-10-18 13:48:35 +01:00
cpdfunicodedata.ml Import and parse UnicodeData.txt 2021-11-11 11:45:47 -08:00
cpdfunicodedata.mli more 2022-01-13 13:43:23 +00:00
cpdfunicodedata.source.ml Import and parse UnicodeData.txt 2021-11-11 11:45:47 -08:00
cpdfutil.ml Adds processing of /L in line annotations when transformed 2022-07-15 16:47:28 +01:00
cpdfutil.mli more 2021-12-22 08:58:56 +00:00
cpdfxmlm.ml Remove -w3 and fix deprecations 2022-04-09 14:13:12 +02:00
cpdfxmlm.mli Yojson in 2021-10-05 17:16:13 +01:00
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 Decompress now non-lazy. Otherwise, deferred decryption fails due to 2017-01-04 17:52:14 +00:00
logo.pdf Fixed building of cpdfmanual.tex by adding logo.pdf 2013-08-29 12:12:36 +01:00
mkinstall install script 2021-06-20 16:27:46 +01:00
splitjs more 2022-08-17 16:13:08 +01:00
splitwrapper Update splits for v2.5 cpdflib 2022-01-19 17:09:46 +00:00

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