Currently playing on my computer (tune in: pls, asx)
The Daily Biff
     
 
Wed, 21 Mar 2007

Create PDF Documents On-The-Fly
One of the things that we are doing for the Skyline High School Class of 1987 Reunion is compiling a journal that includes the answers to a small questionnaire. This was done for the 10-year, but it was all with pencil/paper and postal mail. The person who put it together for the 10-year flat out refuses to do it again manually; and I can't say I blame her. So, I suggested we offer the questionnaire on-line and build the journal pages from the answers on-the-fly (as PDFs or as HTML documents). We could even have the classmate include a picture I promised.

At the time, I didn't really know how I was going to accomplish the task, but I figured it wouldn't be that hard. Thankfully, it wasn't. Using the PDF::API2 perl library and a very handy PDF::API2 tutorial as a crutch, I authored a web app that administers the questionnaire, collects the answers, allows the user to upload a picture, and then builds a PDF file that includes both the answers and the picture. Picture placement is determined based on the aspect ratio of the photo, and the font is resized incrementally from 13-pt down to as low as 8-pt (if necessary) to fit everything on one page. After the document is produced, the classmate can then choose to make the document public or private... in either case, a copy is e-mailed to the person compiling the journal. It's pretty slick. Here is a sample of the questionnaire results (in PDF form) for review.

Source code is available upon your polite request.

:: Posted by rus on Wed, 21 Mar 2007 11:04 pm
:: Filed under /tech



         

March 2007
Sun Mon Tue Wed Thu Fri Sat
       
21

About
The Daily Biff
Rus Berrett's weblog

Contact Me
Email: rus at berrett dot org
AIM: biffordtdavis

Search 'The Daily Biff'



Proclamations
Exaggerated opinions of my own importance. Proceed with caution.

Buy Me Stuff
My wish list is my gift to you (yes, shameless, I know).

Subscribe
Subscribe to a syndicated feed of my weblog, brought to you by the wonders of RSS.

Categories
You can isolate posts by category using the following links.

  •   ·x10 (1)
  •     ·2005 (23)
  •     ·2006 (18)
  •     ·2007 (17)
  •     ·2008 (27)
  •     ·kids (1)
  •     ·meat (14)
  •     ·cola (2)
  •     ·milk (2)
  •     ·meat (1)
  •     ·utah (5)

Archives
Past entries are available for review.

Blogroll
These are a few blogs run by my esteemed friends and colleagues. My personal comments about the blog (and its author) can be accessed by clicking on the "wtf?" graphic to the immediate right of each entry (wtf = "What the flip?" as in "What the flip is grandma doing at the sand dunes?").

Family

What the flip is "Yatyk's Musings"?  And who the flip is Mark Berrett?

Friends

What the flip is "The Improvist"?  And who the flip is Dan Brian?
What the flip is "The Borel-Cantelli Lemma"?  And who the flip is Norm Jones?


    
 
    Valid CSS!

Valid HTML 4.01 Transitional

Powered by blosxom