Posts Tagged ‘camlpdf’

GraphPDF: A PDF Version of Ocaml’s Graphics Module

Saturday, April 3rd, 2010

I’ve written a version of Ocaml’s Graphics module which outputs PDF directly, using the CamlPDF library - its only dependency. It’s based on the approach of Pierre Weis’ GraphPS program.

It has the same API as Ocaml’s module - just have your build process find the GraphPDF files before it finds the system ones - the vast majority of programs shouldn’t need altering.

Get it here.

CamlPDF 0.5 Released

Monday, March 15th, 2010

I’m pleased to announce the CamlPDF 0.5 release, which includes a couple of new modules (Pdfdate for date manipulation, Pdfannot for annotations and Pdfmarks for bookmarks). Almost every other module has been improved in some way.

Download it here: http://www.coherentpdf.com/ocaml-libraries.html

More importantly, I’ve finally found time to write a short introduction to CamlPDF, which lets you try some basic work within the OCaml top level:

http://www.coherentpdf.com/introduction_to_camlpdf.pdf

There have been some API modifications which are not backward compatible, but the changes to your source are easy to make. This should be the last release with such changes.

There is now a CamlPDF mailing list:

http://www.freelists.org/list/camlpdf

Compiling Code Under OCaml and F# (Part Two)

Friday, July 4th, 2008

[Part One]

Twenty thousand lines of CamlPDF and cpdf later, here are some numbers:

  • Occasions on which conditional compilation is required: 22
  • Compilation warnings with fsc –no-warn 62: 15
  • Time taken: 22 hours

The current executable appears to be about 8 times slower than OCaml native compilation, but I haven’t examined this enough to know how much we might be able to improve upon it.

I’m planning to clean up the code to see how much of the conditional compilation we can get into a single Utility module.

What’s next is to repackage the command line tools as an API for .NET users. I know very little about this topic, so it’s going to require quite a bit of effort before I’m willing to put it on sale and support it.

If you’re familiar with packaging up libraries for .NET and would like to beta test, drop me a line in the comments, or via our website.

PDF Command Line Tools 1.1

Wednesday, June 4th, 2008

I’ve just uploaded the new version of our tools for merging, splitting, annotating, encrypting and stamping PDF files here.

New features:
  • -blacklines and -blackfills (Blacken lines and fills)
  • -idir (Add whole directory of files)
  • -scale-to-fit (Scale pages to fit a given paper size)
  • -scale-contents (Scale page contents)
  • Use page size names (e.g a4paper)
  • Multiline text stamps
  • Print page information (media box etc)
Bugs fixed:
  • -stdin and -stdout now work on Windows
  • Encrypted files now viewable in Acrobat 5.0
  • Merge now produces smaller files when several parts taken from a single input file
A bugfix release of CamlPDF (which forms the basis for these tools) will be released soon. More substantial feature additions for CamlPDF are in the works - more details later.

CamlPDF 0.3 Released

Tuesday, March 4th, 2008

I’ve just uploaded a new version of our library for reading and writing PDF files from within Ocaml - CamlPDF. New features:

  • CCITTFaxDecode support
  • Fully re-entrant
  • Parsing of Type 3 fonts
  • Bit-by-bit operations (e.g some decoders) much faster
and of course many bugfixes and improvements. Thanks to those who’ve provided suggestions for this release.

For the next release I’m planning on bringing a bunch of high level operations I wrote for our commercial software into the library: suggestions on that requested.

Download it here.