PDF document creation with Markup languages

New, powerful features have recently been added to PDF::Builder and PDF::Table, enabling faster and easier high-level generation of PDF documents. The versions are respectively 3.025 and 1.005, and are available on CPAN.

As well as the ability to "pour" text into a document's defined page areas, and have it flow easily over pages, this new version also enables high level text formatting with markup languages, as well as much-enhanced font management. The markup supports Markdown (via Text::Markdown) and a large (and growing) subset of HTML/CSS, as well as simple paragraphs-only markup, and for the first time can be used to format cells in PDF::Table. This is far from the final version, as many improvements are in the pipeline for this functionality, and are expected to be released over the coming one to two years. These will include, among other things, proper word hyphenation and probably some form of paragraph shaping, such as Knuth-Plass. The full list (at this time) is at https://github.com/PhilterPaper/Perl-PDF-Builder/issues/195 .

If sufficient users find this markup and formatting capability useful to them, but need it for non-PDF output, we would be happy to discuss splitting out this capability into a separate package, writing to a generic interface to a low level renderer, such as PDF::Builder for PDF output. It is currently fairly tightly tied to PDF::Builder and PDF output, but is should be possible to make it more generic. If someone wishes to adopt this open source code and maintain a separate package, or to sponsor this work and get it done much sooner, let's discuss and coordinate on GitHub (PhilterPaper/Perl-PDF-Builder).

This work has been undertaken by Catskill Technology Services, LLC (Woodstock, New York, USA) and has been kindly sponsored by Amtivo Group (Kings Hill, Kent, UK). If you wish to browse our open source software products to see what they're about, before doing a full installation, full product documentation and output for examples is available at https://www.catskilltech.com (links on home page).

A tip o' the hat to Steve Simms (@ssimms on GitHub) and other developers and maintainers, past and present, of PDF::API2, from which PDF::Builder was forked; and Johan Vromans (@sciurius on GitHub), whose Text::Layout inspired many features of Font Manager. Also thanks to Andy Beverley (@abeverley or @ctrlo on GitHub) of MyActiv Ltd, for requesting the new feature set and arranging and coordinating the sponsorship.

Leave a comment

About Phil Perry

user-pic Perling in one form or another since 2000. I maintain packages PDF::Builder, PDF::Table, and Text::KnuthPlass (more to come!), so I guess my principal interest is text processing. Semi-retired, otherwise.