Posts in Category "Flex"

Offline Form Guides via PDF

This post describes how to take any deployed Form Guide and embed it in a PDF so that the Form Guide may be emailed or used offline. The resultant PDF looks and behaves just like any other XFA based PDF as far as LiveCycle processing or Reader/Acrobat is concerned. The Form Guide’s data is stored in the standard XFA Datasets part of the PDF.

Adobe Reader/Acrobat 9.0 is the minimal client requirement.

Here is a sample Form Guide delivered as a PDF.

The basic component is a generic base bootstrap PDF into which a Form Guide SWF is added as an Attachment. The bootstrap PDF has some XFA script and an embedded SWF Loader app that invokes the script to find and load the Form SWF. The submission process uses Readers Email option to submit back to the Server process. The target email account is defined in the XFA Script along with the format of the submission which can be the whole PDF or just the xml data.

The PDF will need to be Reader Enabled to allow Reader users to Save the PDF to their disk.

It is also possible to include a optional “document view” XFA based PDF, but requires a minimum of Reader/Acrobat 9.2. The data entered into the Form Guide can automatically update the PDF document (it is expected be a non-interactive document, as data only flows in one direction)

Attached are a White Paper describing the full process flow of generating a PDF of this flavor, sample Guides in PDFs, the basic source Bootstrap PDF and the source for the embeded SWF Loader. The Bootstrap PDF can be loaded into LiveCycle Designer in order to see/modify the XFA script. There are a few options that can be activated/deactivate by modifying a list of supported features defined at the top of the script object.

This technique can also be used to attach a Flex App instead of a Form Guide, as long as the App implements the following functions at the Application root:

function getData():String – returns XML as a string
function setData(xmlData:String):void
function validate():Boolean

The supplied BootStrap SWF Loader can be easily extended to handle many different unique requirements. Those features can include displaying buttons that allow the user to click and Print/Save/Email/ the document without actually seeing the document view or importdata/exportdata or process more than one SWF APP attachment. Note that the PDF will need to be Certified to allow the Print option to work.
Let me know if more information is desired on how to do this.

More Samples:

FormGuide with Document View PDF attached as well
Another FormGuide with Document View PDF attached as well

Source Files:

PDFBootStrap_Raw.pdf
PDFBootStrap_AutoUpdateData.mxml
xfaScriptObject.txt

The cookbook process for creating a generic PDF for delivery of RIAs is Patent Pending.

Other solutions to leverage PDF as an RIA container can be found at:

http://pdfdevjunkie.host.adobe.com/RMA1_acrossTheBridge.shtml

http://www.jamesward.com/2008/11/05/portable-rias-flex-apps-in-pdfs/

Patch to Guide Builder SDK for FlexBuilder Usage

Form Guide components need to be built using the same SDK as the core Form Guide Libraries. Flex Builder has updated its’ SDK but since the Guide Buider and the LC Server where shipped using a 3.0.1 version of the sdk, the default in Flex builder no longer works.

Guide Builder’s version of the Flex SDK is missing a file that Flex Builder needs in order for it to recognize the sdk version. Without the identifier file Flex Buidler assumes it is a 2.x sdk and does not load it correctly.

Click, download and save this flex-sdk-description.xml file into the Guide Builder flex-sdk directory.

The Default install location is:
C:\Program Files\Adobe\LiveCycle Designer ES\8.2\plugins\GuideBuilder\flexsdk

After applying the simple patch, in Flex Builder on your Project Properties, select “Flex Library Compiler”, (configure sdks if needed), and select “use a specific SDK”. Point to the Guide Builder 3.0.1 version of the SDK.