OCaml library for reading, writing and modifying PDF files
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
utop Fixed up utop makefile Oct 7, 2014
Changes Updated Apr 5, 2018
LICENSE
META
Makefile
OCamlMakefile
README.md Warning to pick a tag when downloading from Github May 12, 2015
flatestubs.c
introduction_to_camlpdf.pdf Removed pdfsqueeze Sep 11, 2014
introduction_to_camlpdf.tex
logo.pdf
miniz.c
mkinstall
pdf.ml
pdf.mli
pdfafm.ml
pdfafm.mli Documentation fixes for v2.2 Jan 9, 2017
pdfafmdata.ml
pdfafmdata.mli
pdfannot.ml
pdfannot.mli Added Pdfannot.{add_annotation,make_border,make} Jun 2, 2017
pdfcff.ml Initial import Aug 14, 2013
pdfcff.mli
pdfcodec.ml
pdfcodec.mli Compressing strings for inclusion in binaries Oct 6, 2014
pdfcrypt.ml
pdfcrypt.mli
pdfcryptprimitives.ml Adapt code to use safe-string mode Jun 25, 2018
pdfcryptprimitives.mli
pdfdate.ml
pdfdate.mli Initial import Aug 14, 2013
pdfdest.ml Tidying Nov 21, 2014
pdfdest.mli Initial import Aug 14, 2013
pdfflate.ml Adapt code to use safe-string mode Jun 25, 2018
pdfflate.mli Adapt code to use safe-string mode Jun 25, 2018
pdffun.ml
pdffun.mli
pdfgenlex.ml
pdfgenlex.mli
pdfglyphlist.ml
pdfglyphlist.mli
pdfgraphics.ml Initial import Aug 14, 2013
pdfgraphics.mli Documentation fixes for v2.2 Jan 9, 2017
pdfimage.ml Fixes based on new warnings in OCaml 4 Oct 14, 2013
pdfimage.mli Initial import Aug 14, 2013
pdfio.ml
pdfio.mli
pdfjpeg.ml
pdfjpeg.mli
pdfmarks.ml Initial import Aug 14, 2013
pdfmarks.mli
pdfmerge.ml error reporting Jul 31, 2018
pdfmerge.mli
pdfocg.ml
pdfocg.mli Initial import Aug 14, 2013
pdfops.ml error reporting Jul 31, 2018
pdfops.mli Better debug for inline images Jul 4, 2017
pdfpage.ml
pdfpage.mli
pdfpagelabels.ml
pdfpagelabels.mli Bug fixes to page label representation Sep 18, 2014
pdfpaper.ml Initial import Aug 14, 2013
pdfpaper.mli Initial import Aug 14, 2013
pdfread.ml
pdfread.mli
pdfshapes.ml
pdfshapes.mli Initial import Aug 14, 2013
pdfspace.ml
pdfspace.mli
pdfstandard14.ml Tentative fix to make textwidth work with ImplicitInFontFile encoding. Dec 26, 2017
pdfstandard14.mli
pdftext.ml
pdftext.mli Better textwidth Nov 4, 2016
pdftransform.ml
pdftransform.mli
pdftruetype.ml Initial import Aug 14, 2013
pdftruetype.mli Initial import Aug 14, 2013
pdftype0.ml
pdftype0.mli
pdftype1.ml Initial import Aug 14, 2013
pdftype1.mli
pdfunits.ml
pdfunits.mli
pdfutil.ml
pdfutil.mli
pdfwrite.ml
pdfwrite.mli
rijndael-alg-fst.c
rijndael-alg-fst.h
sha2.c
sha2.h Added beginnings of C SHA support Sep 26, 2014
stubs-aes.c
stubs-sha2.c

README.md

CamlPDF

CamlPDF is an OCaml library for reading, writing and modifying PDF files. It is the basis of the commercial "CPDF" command line tool, which is available at http://www.coherentpdf.com/.

License

Copyright Coherent Graphics Ltd 2007 - 2013. Released under the LGPL with special linking exception. See "LICENCE" for details.

To Build

If downloading from Github, obtain the correct source. This means choosing the tag for a particaular version, such as "v2.1.1". The head of the master branch is unstable.

  1. Run "make". This will build camlpdf.a, camlpdf.cma, camlpdf.cmxa and the documentation (in doc/camlpdf/html).

  2. If your environment has "ocamlfind", "make install" will install the library. Otherwise, use the built outputs as you will.

Documentation

The API documentation, which is built by the makefile in doc/camlpdf/html, can also be accessed online at http://www.coherentpdf.com/camlpdf.

The file introduction-to-camlpdf.pdf will help the beginner.

Some level of knowledge of the PDF file format itself, which is large, may be required. The standard texts are the author's book:

http://shop.oreilly.com/product/0636920021483.do

and the ISO standard for PDF:

http://www.adobe.com/devnet/pdf/pdf_reference.html

Acknowledgments

The file miniz.c is a (very slightly modified) version of the miniz.c zlib implementation by Rich Geldreich, avalable here:

http://code.google.com/p/miniz/

The files flatestubs.c, pdfflate.ml and pdfflate.mli are a slightly modified version of some parts of CamlZip by Xavier Leroy. The originals are available here:

http://pauillac.inria.fr/~xleroy/software.html

OCamlMakefile was written by Markus Mottl. It is available here:

http://bitbucket.org/mmottl/ocaml-makefile

These works are also released under the LGPL with special linking exception, as described in LICENCE.