Been searching web for an answer for this for a MONTH. I am not an expert in Coldfusion. So supposedly this is easy in CF -- but the mark-up conf开发者_如何学编程uses the HECK out of me. So here I am.
I have managed to import and read a PDF using the CF Proxy for Actionscript: http://forums.adobe.com/thread/754629?tstart=0 --- BUT --- After all my trouble there, the precious form filed information that I was looking for was not there in the PDF info object. GRRRR. So I am back to looking for a way to do this with CFC's or CFM's or PHP.
All I want is this:
- Read the PDF from a Flex app.
- GET the form field information.
- WRITE a new PDF with the form field values.
I have found so many close but no cigar options ... and I have tried so many that failed. There are so many free PDF this and that out there. But Adobe seems to reserve the real functionality for themselves. All the free options don't seem to have access to the form data?
Anyways I am so exhausted with looking for ways to do this. I need help!
It is possible to collect only form data and not the whole PDF file which is a lot more efficient in case you do not need the PDF but the form data. I am assuming you are interested in the form data.
You can have your PDF file submit FDF or XFDF (in Acrobat, create a button, select its action as submit and edit it to select FDF or XFDF, URL, fields,...) to a ColdFusion, PHP,... page that can read form fields. If you chose FDF, form data will be in form scope. If you chose XFDF you have to collect them from HTTP header of request.
FDF is simpler. It gives you all form data but not the comments added to the PDF file. (XFDF give yous the comments too). You can simply ready the data from the form scope (CF: form.your_PDF_field_name) just the same way you would read data posted from a HTML form.
As for writing to new PDF withe form field values, you can send a .xfdf or .fdf file to the browser. Inside either of them there will be the address of the PDF file (local or on a server). In either file you can supply form field values that PDF file will use to pre-fill its form fields.
I'm sure Flex has features to deal with form data and producing text files (xfdf ,FDF)
Hope it helps
精彩评论