PDF creation?

Steve Cookson it at sca-uk.com
Sun Apr 21 14:23:37 BST 2013


> I know I'm going to want to create the document from scratch, not fill in
a
> template, and I'm probably going to want multi-line text and basic drawing
> (a horizontal line or two)

I use Wx::PdfPrinter, part of the wxPerl framework.

It produces anything you want.  I have a multi-page medical report with a
bitmap header, text with plenty of decorations, digitised signatures and
pages of photos.

As it's part of a framework, it prove more complex to install, however, than
you want.

You should get most of it by "cpan install Wx".

Then:

my $printer = Wx::PdfPrinter->new();

Then you need to create and select your data source ($print_object), which
may not be trivial.

Then:

$printer->Print($self, $print_object, 0);

Here is its source documentation, it's part of Wx::PdfDocument.

http://search.cpan.org/~mdootson/Wx-PdfDocument-0.12/lib/Wx/PdfDocument.pm

Good luck,

Steve




More information about the london.pm mailing list