views:

14

answers:

0

I currently have a project there are a number of forms that are processed and stored in the DB. Upon successful completion an admin is notified by email with the contents of that form submission.

The problem is for one of these forms i need it to look exactly like the mail order version which I have in PDF format.

So I have two basic options:

  1. Figure out all the coordinates of the "field" i need to write to, and then overlay my drawn text at those coordinates
  2. Turn the pdf into a pdf form using Acrobat Pro's form wizard and then set the field values programmatically

Option 1 i know is doable. I've done similar things before. The problem is the form is pretty complex and there are A LOT of coordinates to figure out... Moreover, there is a lot of trial and error to this process.

Option 2 seems like it would be easier so long as i can access the fields through iteration or name/id and just set the values.

So my question is, does Zend_Pdf support the manipulation of PDF form fields? I dont see anything in the API other than Submit and Reset form actions that would denote it supports this.

Additionally, if there are other OO F/OSS PDF libraries that would support option 2 i would be interested in hearing about them as well as any alternative approaches.