Wednesday, July 9, 2008

Create PDF file in Perl

Today I tried to create a PDF file using a program. I choose the language Perl to do this task, because there should be one or more useful module for pdf creation in Perl (I shall try to do the same task using PHP and Python later).

For PDF creation I found the module PDF::Create very useful. If you want to create and/or modify a pdf file, then you can try PDF::API2.

Here is an article on pdf creation from the book PDF Hack, that uses PDF::API2 to create a pdf file: Use Perl to create PDF. Note that I had to change the sample code (line 11) my $txt = $page->hybrid; to my $txt = $page->text;

Hope you can create PDFs smoothly. Please share your experience.

No comments: