OCaml library for reading, writing and modifying PDF files
OCaml C TeX Makefile C++ Shell
Latest commit 0dffaaf Jul 24, 2016 @johnwhitington Notes
Failed to load latest commit information.
examples Flags Dec 7, 2014
utop Fixed up utop makefile Oct 7, 2014
Changes Changes for 4.02/4.03, including no pattern matching on exception str… Mar 25, 2016
LICENSE Spelling Nov 25, 2014
META Fixed version number in META Aug 19, 2013
Makefile Work on content stream sharing Mar 29, 2016
OCamlMakefile Working on providing a Utop top level Sep 14, 2014
README.md Warning to pick a tag when downloading from Github May 12, 2015
flatestubs.c For some platforms, need include <stdint.h> Nov 25, 2015
introduction_to_camlpdf.pdf Removed pdfsqueeze Sep 11, 2014
introduction_to_camlpdf.tex Removed pdfsqueeze Sep 11, 2014
logo.pdf Removed pdfsqueeze Sep 11, 2014
miniz.c Initial import Aug 14, 2013
mkinstall Added script to make & install for debug use Sep 24, 2014
pdf.ml Fixed bytes_of_input May 14, 2015
pdf.mli Made Pdf.ToGet opaque in preparation for decryption-on-demand Apr 27, 2015
pdfafm.ml Tidying Nov 21, 2014
pdfafm.mli Commenting for release Nov 23, 2014
pdfafmdata.ml Began support for reading header of AFM files Sep 8, 2014
pdfafmdata.mli Initial import Aug 14, 2013
pdfannot.ml Tidying Nov 21, 2014
pdfannot.mli Initial import Aug 14, 2013
pdfcff.ml Initial import Aug 14, 2013
pdfcff.mli Initial import Aug 14, 2013
pdfcodec.ml Tidying Nov 21, 2014
pdfcodec.mli Compressing strings for inclusion in binaries Oct 6, 2014
pdfcrypt.ml Shamix now cached Apr 27, 2015
pdfcrypt.mli Recrypt finished Nov 6, 2014
pdfcryptprimitives.ml Tidying Nov 19, 2014
pdfcryptprimitives.mli Commenting for release Nov 23, 2014
pdfdate.ml Initial import Aug 14, 2013
pdfdate.mli Initial import Aug 14, 2013
pdfdest.ml Tidying Nov 21, 2014
pdfdest.mli Initial import Aug 14, 2013
pdfflate.ml Fixes based on new warnings in OCaml 4 Oct 14, 2013
pdfflate.mli Commenting for release Nov 23, 2014
pdffun.ml Changes for 4.02/4.03, including no pattern matching on exception str… Mar 25, 2016
pdffun.mli Initial import Aug 14, 2013
pdfgenlex.ml Reformatting Nov 11, 2014
pdfgenlex.mli Initial import Aug 14, 2013
pdfglyphlist.ml Initial import Aug 14, 2013
pdfglyphlist.mli Initial import Aug 14, 2013
pdfgraphics.ml Initial import Aug 14, 2013
pdfgraphics.mli Initial import Aug 14, 2013
pdfimage.ml Fixes based on new warnings in OCaml 4 Oct 14, 2013
pdfimage.mli Initial import Aug 14, 2013
pdfio.ml Removed printf May 14, 2015
pdfio.mli Faster 'getstream' Apr 27, 2015
pdfjpeg.ml Initial import Aug 14, 2013
pdfjpeg.mli Initial import Aug 14, 2013
pdfmarks.ml Initial import Aug 14, 2013
pdfmarks.mli Initial import Aug 14, 2013
pdfmerge.ml Work on content stream sharing Mar 29, 2016
pdfmerge.mli Pdfmerge rotations gone Nov 23, 2014
pdfocg.ml Initial import Aug 14, 2013
pdfocg.mli Initial import Aug 14, 2013
pdfops.ml Changes for 4.02/4.03, including no pattern matching on exception str… Mar 25, 2016
pdfops.mli Initial import Aug 14, 2013
pdfpage.ml Notes Jul 24, 2016
pdfpage.mli Beginning work on new resources and contents renumbering system Mar 29, 2016
pdfpagelabels.ml Tidying Nov 19, 2014
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 more Jul 22, 2016
pdfread.mli More -revision support Dec 11, 2014
pdfshapes.ml Initial import Aug 14, 2013
pdfshapes.mli Initial import Aug 14, 2013
pdfspace.ml Initial import Aug 14, 2013
pdfspace.mli Initial import Aug 14, 2013
pdfstandard14.ml To allow better standard font descriptions Sep 8, 2014
pdfstandard14.mli Spelling corrections Sep 8, 2014
pdftext.ml Made Pdf.ToGet opaque in preparation for decryption-on-demand Apr 27, 2015
pdftext.mli Initial import Aug 14, 2013
pdftransform.ml Initial import Aug 14, 2013
pdftransform.mli Initial import Aug 14, 2013
pdftruetype.ml Initial import Aug 14, 2013
pdftruetype.mli Initial import Aug 14, 2013
pdftype0.ml Initial import Aug 14, 2013
pdftype0.mli Initial import Aug 14, 2013
pdftype1.ml Initial import Aug 14, 2013
pdftype1.mli Initial import Aug 14, 2013
pdfunits.ml Fixes based on new warnings in OCaml 4 Oct 14, 2013
pdfunits.mli Initial import Aug 14, 2013
pdfutil.ml Changes for 4.02/4.03, including no pattern matching on exception str… Mar 25, 2016
pdfutil.mli Added split6 Nov 5, 2014
pdfwrite.ml more May 1, 2015
pdfwrite.mli Comments for release Nov 23, 2014
rijndael-alg-fst.c Beginning to use C implementation of AES Sep 26, 2014
rijndael-alg-fst.h Beginning to use C implementation of AES Sep 26, 2014
sha2.c Added beginnings of C SHA support Sep 26, 2014
sha2.h Added beginnings of C SHA support Sep 26, 2014
stubs-aes.c Beginning to use C implementation of AES Sep 26, 2014
stubs-sha2.c SHA now provided by C primitives for speed Sep 30, 2014

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.