Question

Is there any way in PHP how to pre-fill PDF form (AcroForms) and serve it to a user to further editing? I cannot use XFA/XDP. It must be the AcroForm which user can edit and save in Acrobat Reader 11. And It is needed to be editable pre-fill. So the user can rewrite pre-filled field.

Was it helpful?

Solution

Hmm… it looks like server-side form filling time today… I just answered a similar question.

So, in short, IMHO the first choice would be a form filling application, such as FDFMerge by Appligent. This is a command-line application, and can therefore very easily be controlled using PHP. With its result, the user can continue filling, overwriting, and saving (as far as he does not use a crappy PDF viewer). And with Adobe Reader XI, saving the filled form is no issue anymore anyway.

Another approach would be crafting an according FDF file and send that to the user. An "accordingly crafted" FDF has a key pointing to the base PDF (the blank PDF). When opening the FDF, and the base PDF is not already open, Acrobat/Reader (down)loads the base PDF and fills it out. This would be client-side filling.

There is not much literature around about FDF, but the dry description is in a section of the Portable Document Format reference, which is part of the Acrobat SDK, downloadable from the Adobe website.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top