Making PDFs with PERL
This is cooler than it sounds.
No, really. Please, let it be cooler than it sounds so I feel better about the way I spent my day. Please?
Honest, using the PDF::API2 CPAN module is much more challenging than it sounds. I spent most of the afternoon trying to figure out how to force a second page into my PERL-generated PDF. Why? Because, I want a nice title page for my documentation. Also, I see applications for this frightening technology beyond the scope of my project. See, one of the things we do is prepare, and sell, documentation for our great, big, huge, expensive cranes. That documentation is in, you guessed it, PDF format. A fair portion of this documentation is based on AutoCAD drawings that have been convertd to PDF. So, now, all I have to do it automate most, if not all, of that process and I’ll save a ton of time, which, according to the “time=money” formula will “impact the bottom line”, as they say in boardrooms. Cool. In other words, I found a way to justify my personal project (the server inventory script) by applying the things I’m “testing” there toward the automation of a dirty, low-end, repetetive task that no one likes doing (compiling the documentation PDF). Very cool. And, thanks to all this work on PERL this week, I’ve added a new category: PERL.
Oh, yeah, here is the PERL PDF Example code. Enjoy!