Archive for the 'XFDF' Category

Converting Adobe Designer Static forms to Acrobat PDF Forms

In Ted Padova‘s post, he said,

Adobe Designer 8 supports two different types of forms: Static forms and Dynamic forms. If a form is created as a static form you can easily convert the form in Acrobat 8 to a PDF form.

and he give the steps on how to convert Adobe Designer forms to Acrobat PDF Forms.

This let me thought that I have also done this kind job before, but I did not rely on Adobe Acrobat, just rely iTextSharp, I have used it in my demo software FormServer, and it also have a online demo, Fill and Save PDF Form online, in fact they are the clone of commercial software.
Here is some features about FormServer,

  • support automatically convert static PDF forms created by Adobe Designer to Acrobat Form.
  • support save data to PDF Forms without Adobe Acrobat, only Adobe reader is enough.
  • support save data to FDF

And a HK company found my FormServer, and asked for the source code of “Converting static PDF forms created by Adobe Designer to Acrobat Form”, finally I sold they on US$400.

PS.
With the examples of Bruno Lowagie,Using iText to Fill PDF Forms Created by Adobe Designer, iText can both support Dynamic Forms and Static Forms created by Adobe Designer now.

Be Sociable, Share!

Using iText to Fill PDF Forms Created by Adobe Designer

There are two example codes focus on how to fill Adobe Designer Forms(XFA Forms, Interactive Forms) with iText written by Bruno Lowagie in answer to questions that were posted to the iText mailing list.
FillDynamicXfa and FillDynamicXfa2
From the java name, we can notice they only support dynamic PDF Forms created by Adobe designer.

btw, I have compiled FillDynamicXfa into native byte code, so they can run without jre installed, and only 1.72M, and will release lately.

P.S.

Adobe LiveCycle Forms
Livecycle forms are XML-based and can be either static or dynamic. They are deployed securely to a user’s browser over any platform and are viewed using Adobe Reader (version 7.0.5 is the minimum version for full functionality). The quality of submitted information is improved through instant data validation and calculations. Captured data can also be transferred directly into an organisation’s core systems, streamlining form-driven business processes as well as improving data accuracy.

More info about XFA from wikipedia

XFA (also known as XFA forms) stands for XML Forms Architecture, a family of XML specifications that was suggested and developed by JetForm to enhance the processing of web forms.
XFA’s main extension to XML are computationally active tags. In addition, all instances created from a given XFA form template keep the specification of data capture, rendering, and manipulation rules from the original. Another major advantage of XFA is that its data format allows compatibility with other systems, and with changes to other technology, applications and technology standards.
According to JetForm’s submission to the World Wide Web Consortium, “XFA addresses the needs of organizations to securely capture, present, move, process, output and print information associated with electronic forms.”[1] The XFA proposal was submitted to the W3C in May 1999.
In 2002, the JetForm Corporation was acquired by Adobe Systems, and the latter introduced XFA forms with PDF 1.5 and the subsequent Acrobat releases (6 and 7) in 2003.[2]
XFA forms are saved internally in PDF files or as .XDP files which can be opened in Adobe’s LiveCycle Designer software.
XFA forms are synonymous with SmartForms in the Australian government.

Be Sociable, Share!

Parsing XFDF in PHP

A handy snippet of PHP code that can be used to parse XFDF data.
This past week at work I have been working on using Adobe Acrobat to submit form data. The value of this is that the form data can be reimported into the PDF form then printed all purty-lookin’. Anyway, Acrobat allows you to submit your form data in several different formats. One, FDF, is usable in PHP provided you load this module thingy. Unfortunately, the server I want to run the PHP script on uses Irix and the module is unavailable for Irix. Poor.

I then turned to XFDF, which is essentially FDF data all XML-ified. PHP has an XML parser built in, so I don’t have to load any crazy modules to parse the data. Unfortunately, PHP’s parser is SAX-based rather than DOM-based, so it took me a rather long time to figure out how to get it working right. Anyway, here’s the PHP code that essentially takes XFDF data (declare $file as a string pointing to the location of your XFDF file) and parses it into an associative array ($values). The array is indexed by the XFDF field names. The code below is not entirely complete since I snipped it out of a larger file, but if you look at it, I think you’ll get the idea. It’s pretty simple once you figure out the way PHP does XML processing.

View Code

Contributed by: Tyler Butler

Be Sociable, Share!