may I produce an XML version of a pdf form with javascript?

I need to produce a pdf form, when the user finish its fulfillment he has to press to "save" button that will save the form and its contents in pdf form and generate a XML file that will be transformed with XSLT. Is it possible to produce that XML with javascript?

Thanks in advance


Carlos Agudo


3 Answers

Voted Best Answer

From http://www.adobe.com/devnet/acrobat/fdftoolkit.html

XFDF is an XML format. You can use any standard XML tool to process XFDF.

methods available in Acrobat:

doc.exportAsXFDF
doc.exportAsXFDFStr

if you generated your form in LiveCycle:

Forms created with LiveCycle Designer produce XML data. You can use any standard XML tool to process XML data.

Hope it helps.


By Ricardo Falegnami   

This is some documentation about the XFDF specification:
http://partners.adobe.com/public/developer/en/xml/XFDF_Spec_3.0.pdf

maybe there is a more recent version (most of the latest documentation is now available on-line only)


Ricardo Falegnami   

The documentation says:

XML tools supporting XSLT can be used to transform an XFDF file to another format. Currently, Adobe does not provide a schema for validation because the specification cannot be realized in standard XML Schema (XSD). In the future, a schema in Relax NG format may be provided.

See what this fellow and his wife have done for MS Excel: http://www.tarrget.info/XFDF2XL/index.html
from outside it seems he is using a common XML config file and not a true XSTL template. Yet, the final result is pretty good.


Ricardo Falegnami   


Please specify a reason: