Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

acme (189)

  (email not shown publicly)

Leon Brocard (aka acme) is an orange-loving Perl eurohacker with many varied contributions to the Perl community, including the GraphViz module on the CPAN. YAPC::Europe was all his fault. He is still looking for a Perl Monger group he can start which begins with the letter 'D'.

Journal of acme (189)

Thursday January 12, 2006
03:12 PM

Writing PDF

[ #28331 ]

It's not just webby stuff, you know. This week I've been mostly been writing PDF using PDF::API2. The docs are complete, but there's a walkthrough which is very helpful. Of course, I had to go slightly overboard and read the PDF Reference. PDF::API2 is pretty good, you can copy pages from other PDFs, insert images and use TTF fonts. Actually doing the design is a bit tedious (this box here, this text here in this colour) but not too hard. I really liked working on this project as I'm generating a very colourful, well-designed double-sided A3 sheet with minimal amounts of coding. I'd recommend it whenever you have to generate and print very specific designs. I quite like PDF, and I wonder why it's not more popular. Well, apart from (0, 0) being bottom-left...

In cooking news, I made roasted curried sweet potatoes yesterday, mmm...

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • That explains why I've seen so many things output "upside-down" in PDF applications!
  • I like PDF::API2 too. The author is very responsive on the pdf-api2 mail list. The difficult font support is very well done, in particular. And I'm the author of a "competitor" module, CAM::PDF. Well, not really competition -- PDF::API2 is optimized for creating PDFs while CAM::PDF is optimized for editing PDFs. We've taken ideas from each other's code and we've both taken ideas from the earlier Text::PDF.

    My biggest complaint is that PDF::API2 lacks regression tests.
    • Oh another point I forgot to make: why it's not more popular. I think the main reason is that it's an end format rather than an intermediate format. That is, PDF can be very hard to edit. Editing PDF can be like composing a letter in Illustrator. There are just better optimized tools for that.

      And that said, it's a hugely popular format. There simply is no competitor today for cross-platform, pixel-perfect, efficient delivery of static media. Someday, SVG may compete but not yet. Some people treat MS
  • I'm fond of a similar recipe: Yam Fries [].
  • Interesting - I made Roasted Curried Sweet Potatoe Soup for Christmas Eve (and we just finished off the left over soup that went in the freezer this week). It was yummy.

    Basically take your recipe there, mash them up, add butter, coconut milk, some herbs and spices, blend, sieve, and serve with some corriander.