Linux at Ngee Ann Polytechnic

PDF::API2 Tutorials

September 30, 2007 · Leave a Comment

The Perl module PDF::API2 is awesome for perlers who want to create PDFs, but its documentation is horrible. In this post, I provide useful links for people who have just started with PDF::API2.

Tutorial for adding text and simple geometric shapes

http://rick.measham.id.au/pdf-api2/

A simple Hello World in PDF tutorial

http://pdfapi2.wiki.sourceforge.net/BeginnersTutorialStarting

Text and Images

Perl Graphics Programming by Shawn Wallace. Link points to Google Book Search.

Tables

http://search.cpan.org/~omega/PDF-Table-0.9.3/lib/PDF/Table.pm

Oh, by the way, make sure that your PNGs are not interlaced, as PDF::API2 does not support it. Yes, I’m looking at you, GD::Graph. Make sure that you disable interlacing for images generated with GD::Graph.

“Unsupported Interlace(1) Method at /usr/lib/perl5/site_perl/5.8.8/PDF/API2/Resource/XObject/Image/PNG.pm line 85.”

Categories: Perl · Programming

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment