Adding or modifying support for a native file format

This section describes the tasks you must perform to support other native file formats or to modify support for an already supported native file format.

Before you can add or modify support, you must complete the following tasks.

Choosing a tool for identifying window elements

The dialog and script XML files require you to identify the window element (dialog box, field, or other dialog component) to which your dialog or script element is responding. For example, after a script invokes a menu for a native application, the script must identify the window element on that menu to which keystrokes or an action are to be applied.

You can easily identify a dialog box by the caption it displays in its title bar. However, you must use a tool such as Microsoft Spy++ to identify lower-level window elements. The lower-level window elements can be identified through a variety of attributes, which are not obvious. Additionally, each native application may identify its window element differently. As a result, there are multiple ways of identifying a window element. Here is the suggested order for considering window element identification:

  1. Caption itself if it is unique

  2. Control ID, which may or may not be unique for a given dialog box

  3. Class name, which may or may not be unique

Any one or a combination of these three attributes can be used to identify a window.

If the attributes fail to identify a caption, you can instead identify a window element by using its index with respect to its parent. An index specifies the position of the window element relative to its sibling window elements. Frequently, indexes are the only way to identify combo boxes.

Be aware of these issues:

  • Microsoft Spy++ displays captions by using an ampersand (&) to identify the caption’s hot key. For example, Spy++ shows the caption for one Print dialog box as Pri&nt , which indicates that the hotkey is n . Caption titles in script and dialog XML files must omit ampersands.

  • Some captions include line breaks. the Generate PDF service cannot identify line breaks. If a caption includes a line break, include enough of the caption to differentiate it from the other menu items and then use regular expressions for the omitted part. An example is ( ^Long caption title$ ).]. (See Using regular expressions in caption attributes .)

  • Use character entities (also called escape sequences) for reserved XML characters. For example, use & for ampersands, < and > for less than and greater than symbols, ' for apostrophes, and " for quotation marks.

If you plan to work on dialog or script XML files, you should install the application Microsoft Spy++.

Unpackaging the dialog and script files

The dialog and script files reside in the appmondata.jar file. Before you can modify any of these files or add new script or dialog files, you must unpackage this JAR file. For example, assume that you want to add support for the EditPlus application. You create two XML files, named appmon.editplus.script.en_US.xml and appmon.editplus.script.addition.en_US.xml. These XML scripts must be added to the adobe-appmondata.jar file in two locations, as specified below:

  • adobe-livecycle-native-jboss-x86_win32.ear > adobe-Native2PDFSvc.war\WEB-INF\lib > adobe-native.jar > Native2PDFSvc-native.jar\bin > adobe-appmondata.jar\com\adobe\appmon. The adobe-livecycle-native-jboss-x86_win32.ear file is in the export folder at [AEM forms install directory]\ configurationManager. (if LiveCycle is deployed on another J2EE application server, replace the adobe-livecycle-native-jboss-x86_win32.ear file with the EAR file that corresponds to your J2EE application server.)

  • adobe-generatepdf-dsc.jar > adobe-appmondata.jar\com\adobe\appmon (the adobe-appmondata.jar file is within the adobe-generatepdf-dsc.jar file). The adobe-generatepdf-dsc.jar file is in the [AEM forms install directory] \deploy folder.

After you add these XML files to the adobe-appmondata.jar file, you must redeploy the GeneratePDF component. To add dialog and script XML files to the adobe-appmondata.jar file, perform these tasks:

  1. Using a tool such as WinZip or WinRAR, open the adobe-livecycle-native-jboss-x86_win32.earfile > adobe-Native2PDFSvc.war\WEB-INF\lib > adobe-native.jar > Native2PDFSvc-native.jar\bin > adobe-appmondata.jar file.

  2. Add the dialog and script XML files to the appmondata.jar file or modify existing XML files in this file. (See Creating or modifying a script XML file for a native application and Creating or modifying an additional dialog XML file for a native application .)

  3. Using a tool such as WinZip or WinRAR, open adobe-generatepdf-dsc.jar > adobe-appmondata.jar.

  4. Add the dialog and script XML files to the appmondata.jar file or modify existing XML files in this file. (See Creating or modifying a script XML file for a native application and Creating or modifying an additional dialog XML file for a native application .) After you add the XML files to the adobe-appmondata.jar file, place the new adobe-appmondata.jar file into the adobe-generatepdf-dsc.jar file.

  5. If you added support for an additional native file format, create a system environment variable that provides the path of the application (See Creating an environment variable to locate the native application .)

To redeploy the GeneratePDF component

  1. Log in to LiveCycle Workbench.

  2. Select Window > Show Views > Components . This action adds the Components view to Workbench.

  3. Right-click the GeneratePDF component, and then select Stop Component .

  4. When the component has stopped, right-click and select Uninstall Component to remove it.

  5. Right-click the Components icon and select Install Component .

  6. Browse for and select the modified adobe-generatepdf-dsc.jar file and then click Open. Notice that a red square appears next to the GeneratePDF component.

  7. Expand the GeneratePDF component, select Service Descriptors, and then right-click GeneratePDFService and select Activate Service.

  8. In the configuration dialog box that appears, enter applicable configuration values. If you leave these values blank, default configuration values are used.

  9. Right-click GeneratePDF and select Start Component.

  10. Expand Active Services. A green arrow appears next to the service name if it is running. Otherwise, the service is in a stopped state.

  11. If the service is in a stopped state, right-click the service name and select Start Service.

// Ethnio survey code removed