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 ExtensionsTo 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=””><PDF result=”outDoc”><PDF source=”doc1”/><PDF source=”doc2”/><ReaderRightscredentialAlias=”LCESCred”digitalSignatures=”true”/></PDF></DDX>FormsTo 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=""><PDF result=”outDoc”><PDF source=”inXDP”><XFAData source=”inXML”/></PDF></PDF></DDX>

OutputSimilar 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=""><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=""><PDF result="outDoc" pdfa="pdfa1"><PDF source="doc1"/></PDF><PDFAProfile name="pdfa1"/><DocumentInformation result=infoXML source=pdfa1"><PDFAValidationallowCertificationSignatures="true"compliance="PDF/A-1b"ignoreUnusedResources="true"/></DocumentInformation></DDX>

Generate PDFWhen 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=""><PDF result="outDoc"><PDF source="inJPG"/></PDF></DDX>

Further ReadingFor 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.

VN:F [1.9.22_1171]
Was this helpful? Please rate the content.
Rating: 0.0/10 (0 votes cast)

Comments are closed.