Writing PDF

acme on 2006-01-12T20:12:55

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...


Bottom Left? Ohhhh

GAVollink on 2006-01-12T20:46:32

That explains why I've seen so many things output "upside-down" in PDF applications!

PDF::API2++

ChrisDolan on 2006-01-12T22:36:39

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.

Re:PDF::API2++

ChrisDolan on 2006-01-12T23:02:07

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 Word like a cross-platform vehicle for documents, but it's far from cross-platform, or even cross-version!

Yam Fries

markjugg on 2006-01-13T16:37:36

I'm fond of a similar recipe: Yam Fries.

Sweet Potatoes...

Matts on 2006-01-13T21:15:33

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.