PDF Command Line Tools 1.3 and CamlPDF Progress

PDF Command Line Tools 1.3 now out, with new features for fonts, better splitting by bookmark, and dozens of smaller improvements.

There will be a new release of CamlPDF in the next few months. It will be somewhat backward-incompatible due in part to the changes required to get it cross-compiling with F#, and partly due to some redesigning due to experience.

New modules:

  • Pdfspace: Colourspaces
  • Cff: Parse Type 1 Compact Format Fonts
Large numbers of other things fixed / added. Better text support etc.

And, if there’s time, the Pdfgraphics module, which lifts a PDF page operator stream, its resources (fonts, colourspaces, images) to an immutable tree of paths, images, clipviews and resources etc, allowing proper structured editing of graphic content with the guarantee that every page can be represented in this format and that the read-edit-write cycle is non-destructive. This is somewhat difficult to get right, though, so may take a while to complete. Here’s the main part of the (rather large) type Pdfgraphic.graphic:

and graphic_elt =
| Path of (path * path_attributes)
| Text of textblock list * textblock_attributes
| MCPoint of string
| MCPointProperties of string * Pdf.pdfobject
| MCSection of string * graphic_elt list
| MCSectionProperties of string * Pdf.pdfobject * graphic_elt list
| Image of image_attributes * int
| GraphicInlineImage of Pdf.pdfobject * bytestream * Transform.transform_matrix
| Clip of path * graphic_elt list
| Shading of path option * shading * Transform.transform_matrix

and graphic =
{elements : graphic_elt list;
fonts : fontname list;
resources : Pdf.pdfobject}

This entry was posted in Uncategorized and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *