I was trying to do somethign similar, I think.
You have a pdf "template" type of thing and you want to modify it using PHP?
I looked for days. I discovered that you really can't modify a PDF. You can create new ones using PHP. But I don't think you can modify it as if a template.
For example, you can't search for a string "Name" and replace it with whatever text you want. It has to do with the way the file is structured, evidently it doesn't have any kind of object model, it's just a bunch of drawing commands.
If you don't believe me, try looking on sourceforge.com. There are PDF libraries for PHP, but I couldn't find ANY that let me modify an existing pdf.
There are other file formats that are better for this type of activity.
Goodluck...