Skip to content
OCaml library for reading, writing and modifying PDF files
OCaml C Other
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Flags Dec 7, 2014
utop Fixed up utop makefile Oct 7, 2014
Changes Finished for v2.3 Aug 27, 2019
LICENSE Fix typos Apr 13, 2019
META Fixed version number in META Aug 19, 2013
Makefile .cmti files installed Sep 15, 2019
OCamlMakefile Working on providing a Utop top level Sep 14, 2014
README.md fix typo in README.md: LICENCE -> LICENSE Jul 23, 2019
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 Updated to modern miniz Jun 30, 2019
miniz.h Updated to modern miniz Jun 30, 2019
mkinstall Added script to make & install for debug use Sep 24, 2014
pdf.ml More robustness Jul 18, 2019
pdf.mli Documentation fixes for v2.2 Jan 9, 2017
pdfafm.ml Keep mapping from character name to their width for standard fonts. Aug 1, 2016
pdfafm.mli Documentation fixes for v2.2 Jan 9, 2017
pdfafmdata.ml Began support for reading header of AFM files Sep 8, 2014
pdfafmdata.mli Initial import Aug 14, 2013
pdfannot.ml Made to compile with 3.11.2 Sep 1, 2017
pdfannot.mli Added Pdfannot.{add_annotation,make_border,make} Jun 2, 2017
pdfcff.ml Initial import Aug 14, 2013
pdfcff.mli Initial import Aug 14, 2013
pdfcodec.ml A little more info for broken streams Oct 26, 2018
pdfcodec.mli Compressing strings for inclusion in binaries Oct 6, 2014
pdfcrypt.ml Workaround for Adobe "Error 21" bug on re-saving encrypted files Jun 15, 2017
pdfcrypt.mli Rearranging encryption to prepare for deferred encryption Nov 29, 2016
pdfcryptprimitives.ml Adapt code to use safe-string mode Jun 25, 2018
pdfcryptprimitives.mli Documentation fixes for v2.2 Jan 9, 2017
pdfdate.ml Initial import Aug 14, 2013
pdfdate.mli Initial import Aug 14, 2013
pdfdest.ml Preservation of zero values in bookmarks Sep 17, 2019
pdfdest.mli Preservation of zero values in bookmarks Sep 17, 2019
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 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 Restore zero-copy parsing Aug 1, 2018
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 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 Adapt code to use safe-string mode Jun 25, 2018
pdfio.mli Adapt code to use safe-string mode Jun 25, 2018
pdfjpeg.ml Initial import Aug 14, 2013
pdfjpeg.mli Initial import Aug 14, 2013
pdfmarks.ml more Jul 19, 2019
pdfmarks.mli Initial import Aug 14, 2013
pdfmerge.ml CamlPDF now ready for v2.3 feature complete Jul 18, 2019
pdfmerge.mli Pdfmerge rotations gone Nov 23, 2014
pdfocg.ml Initial import Aug 14, 2013
pdfocg.mli Initial import Aug 14, 2013
pdfops.ml Fix for dodgy inline images Jul 18, 2019
pdfops.mli Better debug for inline images Jul 4, 2017
pdfpage.ml Fix prepend/postpend and expose protect Jul 9, 2019
pdfpage.mli Fix prepend/postpend and expose protect Jul 9, 2019
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 Finished for v2.3 Aug 27, 2019
pdfread.mli Fix for dodgy inline images Jul 18, 2019
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 Tentative fix to make textwidth work with ImplicitInFontFile encoding. Dec 26, 2017
pdfstandard14.mli Better textwidth Nov 4, 2016
pdftext.ml Made Pdf.ToGet opaque in preparation for decryption-on-demand Apr 27, 2015
pdftext.mli Documentation fixes Sep 14, 2019
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 Adapt code to use safe-string mode Jun 25, 2018
pdfutil.mli Documentation fixes Sep 14, 2019
pdfwrite.ml Adapt code to use safe-string mode Jun 25, 2018
pdfwrite.mli more Feb 25, 2018
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 "LICENSE" for details.

To Build

If downloading from Github, obtain the correct source. This means choosing the tag for a particular 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, available 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.

You can’t perform that action at this time.