Adobe PDF LiveCycle Forms Integration - Calling LiveCycle Dialog Action

There are two ways to call the Adobe PDF export action from a view:

Calling PDF export action using a view command

Add a command to the form panel in AXVW:

<action id="PDF_LiveCycle">
<title>PDF LiveCycle Export</title>
<command type="openLiveCycleDialog"
viewName="view_name"
dataSourceId="ds_1[;ds_2]"
restrictions="restriction_for_ds_1[;restriction_for_ds2]"
fieldNames="tablename.fieldname1;tablename.fieldname2; …"
pdfFieldNames="full_pdf_fieldname1;full_pdf_fieldname2; …"
pdfControlTypes="ControlType_For_Fieldname1;ControlType_for_Fieldname2;"
pdfTemplate="pdf_template_name"/>
</action>

The command parameters are:

 

Calling PDF export action from JavaScript

Your Java script code can also call the comment with parameters described above:

var parameters = {};
parameters.target = 'opener';
parameters.type ='openLiveCycleDialog';
parameters.parentPanelId = this.id;
parameters.viewName = ‘test-view.axvw';
parameters.dataSourceId = 'your ds';
parameters.restrictions = ' your_restriction';
// add other args here

var command = new Ab.command.openLiveCycleDialog (args);
// call the dialog
command.handle();

Tips and Tricks

  1. For PDF template file, you must define a default value for radio button. Otherwise, the radio button group will not be activated for setting the value.

  2. For CheckBox type of PDF template, the fields in database are usually not enumeration type, but a “,” separated string. You will need to specify each value for the checkbox field in order. The value has to match the “field name” of the check box defined in PDF template.

  3. For PDF field, when you enter the binding name according to the enumeration values in database for PDF object using Adobe Designer, you will notice many special characters, i.e. \, -, :, “ etc are automatically escaped. This is to meet Adobe PDF field name binding convention. You can continue typing other characters.There are two special characters that are allowed in Designer but you need to escape manually:
     Empty space
     Character Dot “.”
    For example, the field with enumeration value of “New Const.” will be named as “NewConst” in PDF field binding name. The field name is case-insensitive.

  4. To specify the restrictions for different data sources in Javascript, you can: