" /> LiveCycle Doc team: November 2008 Archives

« October 2008 | Main | December 2008 »

November 28, 2008

Using DDX and the Assembler service to invoke other LiveCycle ES services

LiveCycle ES Update 1 introduced the ability to use DDX files and the Assembler service to invoke the following LiveCycle ES services:

  • Reader Extensions
  • Forms
  • Output
  • DocConverter
  • Generate PDF

Typically, these services would be invoked using a process (via LiveCycle Workbench ES) or custom client application (via the LiveCycle ES Java API or web services). Consider using the DDX file and Assembler instead to simplify your process diagram. Or maybe you’re a power DDX user but not so good with Java or another programming language needed to create web service clients.

Note: Information about all of the DDX elements that are discussed in this posting can be found in DDX Reference.

Reader Extensions
To invoke the Reader Extensions service, include a ReaderRights element inside the PDF result element. The following example DDX assembles two PDF documents, and enables Adobe Reader users to digitally sign the resulting PDF document:
<?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
<PDF result=”outDoc”>
<PDF source=”doc1”/>
<PDF source=”doc2”/>
<ReaderRights
credentialAlias="LCESCred"
digitalSignatures=”true”/>
</PDF>
</DDX>

Forms
To use the Forms service to render a PDF form, set the value of the source attribute of the PDF element equal to an XDP file. Also, inside the PDF element, include an XMLData element that points to an XML document to use as the form data to merge with the XDP file. The Forms service will automatically be used to render the form. In the following example, inXDP is an XDP file, and inXML is the XML data to merge with the file:


<?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
<PDF result=”outDoc”>
<PDF source=”inXDP”>
<XFAData source=”inXML”/>
</PDF>
</PDF>
</DDX>

Output
Similar to invoking the Forms service, you need to set the source attribute of the PDF element equal to an XDP file, and include an XMLData element. You also need to include either an empty NoXFA element or an empty NoForms element so that the Output service is invoked to render and then "flatten" the form, instead of using the Forms service (in which case the form remains fillable).


<?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
<PDF result="outDoc">
<PDF source="inXDP">
<XFAData source="inXML"/>
<NoForms/>
</PDF>
</PDF>
</DDX>

DocConverter
To convert a PDF document to a PDF/A document, include a PDFAProfile element in the DDX element. You then need to use a pdfa attribute of the PDF result element to point to the PDFAProfile element. To verify PDF/A conformance, you include a PDFAConformance element inside a DocumentInformation element.

The following example converts a PDF document to a PDF/A document using the PDF/A 1b compliance level. It also verifies PDF/A conformance.


<?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
<PDF result="outDoc" pdfa="pdfa1">
<PDF source="doc1"/>
</PDF>
<PDFAProfile name="pdfa1"/>
<DocumentInformation result=infoXML source=pdfa1">
<PDFAValidation
allowCertificationSignatures="true"
compliance="PDF/A-1b"
ignoreUnusedResources="true"/>
</DocumentInformation>
</DDX>

Generate PDF
When you specify a non-PDF file as the source document of a PDF element, the Generate PDF service is automatically used to create a PDF document from the file. Of course, only supported file formats can be used. Optionally, to specify the PDF conversion settings, you can add a PDFGenerationSettings element inside the PDF result element. The following example converts a JPG file to a PDF document:

<?xml version="1.0" encoding="UTF-8"?>
<DDX xmlns="http://ns.adobe.com/DDX/1.0/">
<PDF result="outDoc">
<PDF source="inJPG"/>
</PDF>
</DDX>

Further Reading
For information about using DDX files and Assembler in LiveCycle Workbench ES processes, see Assembler in LIveCycle Workbench ES Help.
For information about invoking Assembler using the LiveCycle ES SDK, see Assembler Service API Quick Starts in Programming for LiveCycle ES.

November 21, 2008

Tips for maximizing Output service performance

Here are a few easy ways to improve performance when using the Output service with forms.

Use explicit data binding on the form

The Output service merges the form data with the form design before rendering the form. If the form uses a data connection to retrieve the form data, you should explicitly bind the form fields and subforms to data items explicitly. Explicit data binding causes the Output service to immediately match data nodes with form fields. If you use Normal binding, the Output service follows a set of rules to determine data node and form field associations. Normal binding requires more processing time than explicit binding. To learn how to bind data explicitly, see To bind a node to an existing field in Adobe LiveCycle Designer ES Help.

Note: When a form field is not bound to an item in the data source, set the Default Binding property of the field to None so that the Output service doesn’t attempt to find an associated data node. See To remove a binding.

Embed fonts only when necessary

Embedding fonts in PDF forms increases the file size, and so, increases the time required to process the form. You do not need to embed fonts if the fonts reside on the target printer that the Output service sends the form to. When possible, use fonts that reside on the target printer in your form designs so that you don’t have to embed them.

If you need to embed fonts, avoid using OpenType fonts when the target printer uses PCL as the print stream. PCL printers rasterize OpenType fonts, resulting in large print files and longer print times.

Use Incremental Loading

Merging very large amounts of data with a form design can cause the LiveCycle ES server to run out of memory. If you are using multi-record data sets, you can configure the Output service to load and merge one record of data at a time. This incremental (lazy) loading of data avoids running out of memory because only one record is stored in memory at one time.

Both the generatePDFOutput and generatePrintedOutput operations can perform incremental loading. On the process diagram, you configure the Batch properties (in the PDF Output Options property group) of either operation to define the data items that comprise a record of data. You can use the Record Name property or the Record Level property to define the record. (See generatePDFOutput and generatePrintedOutput in LiveCycle Workbench ES Help. On both of those pages, click the Input heading to see the information.)

To enable incremental loading, you also need to configure the form to enable incremental loading. Form designs that include the <xfa:datasets> element prevent the Output service from performing incremental loading. You need to remove the datasets element and all of its child elements from the form design. Use the XML Source view in Designer to remove the datasets element. For more information about the datasets element, and for more form design tips for the Output service, see Designing Forms for LiveCycle Output ES.

November 17, 2008

How to exclude objects on a master page from the tabbing order sequence

When customizing the tabbing order sequence between objects on a form, you may sometimes want to exclude certain objects on the master page from the sequence, but without using the Protected option on the Value tab to do so.

You can do this by applying a setFocus method on the objects you want to exclude. The script excludes an object by changing the focus to the next object in the sequence. That is, when you tab to an object on which the setFocus script is applied, the script automatically executes and moves the focus to the next object.

For example if you have a Button object on the master page that is not protected, you can apply the following JavaScript on the onEnter method.

xfa.host.setFocus(this.parent.nextButtonInTabSq);

Keep in mind that the setFocus method configures the object to always jump to the scripted target; the object will no longer be included in the tabbing order displayed on the Tab Order palette.

To learn more about Scripting, go to the LiveCycle Designer ES Help and search for Scripting.

November 14, 2008

How to exclude objects on a master page from the tabbing order sequence

When customizing the tabbing order sequence between objects on a form, you may sometimes want to exclude certain objects on the master page from the sequence, but without using the Protected option on the Value tab to do so.

You can do this by applying a setFocus method on the objects you want to exclude. The script excludes an object by changing the focus to the next object in the sequence. That is, when you tab to an object on which the setFocus script is applied, the script automatically executes and moves the focus to the next object.

For example if you have a Button object on the master page that is not protected, you can apply the following JavaScript on the onEnter method.

xfa.host.setFocus(this.parent.nextButtonInTabSq);

Keep in mind that the setFocus method configures the object to always jump to the scripted target; the object will no longer be included in the tabbing order displayed on the Tab Order palette.

To learn more about Scripting, go to the LiveCycle Designer ES Help and search for Scripting.

November 7, 2008

Tech Notes: October 6, 2008 – November 7, 2008

Here is a list of Knowledge Base tech notes that the LiveCycle ES documentation team has published within the last month or so:

- Correction to Process Management Administration Help regarding customizing the content of notifications (kb407226)
- Running LiveCycle PDF Generator ES with an evaluation version of Acrobat Professional (kb407228)
- LiveCycle Rights Management ES 8.2 exception when older clients request policy updates (kb406577)
- LiveCycle Policy Server policy and license migration fails after upgrade to Rights Management ES (kb406469)
- Data loss if PDF size = the size of the LiveCycle ES setting: Default document max inline (kb405476)
- Date information not displayed correctly in form guides if Date/Time fields are displayed using a Text Input Mask (kb406125)

Other LiveCycle ES teams (like Adobe Support) also publish tech notes. You can search the Knowledge Base for a complete list of tech notes that were published within the last 30 days.