Modifying the general dialog XML file

You can modify the general dialog XML file to respond to dialog boxes that are generated by the system or to respond to dialog boxes that are common to multiple applications.

Adding a filetype entry in the XML configuration file

This procedure explains how to update the Generate PDF service configuration file to associate file types with native applications. To update this configuration file, you must use Administration Console to export the configuration data to a file. The default file name for the configuration data is native2pdfconfig.xml.

Update the Generate PDF service configuration file

  1. Select Home > Services > Adobe LiveCycle PDF Generator ES3 > Configuration Files, and then select Export Configuration.

  2. Modify the filetype-settings element in the native2pdfconfig.xml file, as needed.

  3. Select Home > Services > Adobe LiveCycle PDF Generator ES3 > Configuration Files, and then select Import Configuration. The configuration data is imported into the Generate PDF service, replacing previous settings.

Note: The name of the application is specified as the value of the GenericApp element’s name attribute. This value must exactly match the corresponding name specified in the script that you develop for that application. Likewise, the GenericApp element’s displayName attribute should exactly match the corresponding script’s expectedWindow window caption. Such equivalency is evaluated after resolving any regular expressions that appear in the displayName or caption attributes.

In this example, the default configuration data supplied with the Generate PDF service was modified to specify that Notepad (not Microsoft Word) should be used to process files with the file name extension .txt. Before this modification, Microsoft Word was specified as the native application that should process such files.

Modifications for directing text files to Notepad (native2pdfconfig.xml)

<filetype-settings> 
 
<!-- Some native app file types were omitted for brevity. --> 
<!-- The following GenericApp element specifies Notepad as the native application that should be used to process files that have a txt file name extension. --> 
            <GenericApp 
                extensions="txt" 
                name="Notepad" displayName=".*Notepad"/> 
            <GenericApp  
                extensions="wpd"  
                name="WordPerfect" displayName="Corel WordPerfect"/> 
            <GenericApp extensions="pmd,pm6,p65,pm"  
                name="PageMaker" displayName="Adobe PageMaker"/> 
            <GenericApp extensions="fm"  
                name="FrameMaker" displayName="Adobe FrameMaker"/> 
            <GenericApp extensions="psd"  
                name="Photoshop" displayName="Adobe Photoshop"/> 
        </settings> 
    </filetype-settings>

Creating an environment variable to locate the native application

Create an environment variable that specifies the location of the native application executable. The variable must use the format [applicationname]_PATH, where applicationname must exactly match the application name used in the XML configuration file and in the script, and where the path contains the path to the executable in double quotation marks. An example of such an environment variable is Photoshop_PATH.

After creating the new environment variable, you must restart the server on which the Generate PDF service is deployed.

Create a system variable in the Windows XP environment

  1. Select Control Panel > System.

  2. In the System Properties dialog box, click the Advanced tab and then click Environment Variables.

  3. Under System Variables in the Environment Variables dialog box, click New.

  4. In the New System Variable dialog box, in the Variable name box, type a name that uses the format [applicationname]_PATH.

  5. In the Variable value box, type the full path and file name of the application's executable file and then click OK. For example, type: c:\windows\Notepad.exe

  6. In the Environment Variables dialog box, click OK.

Create a system variable from the command line

  1. In a command line window, type the variable definition, using this format:

            [applicationname]_PATH=[Full path name]

    For example, type: NotePad_PATH=C:\WINDOWS\NOTEPAD.EXE

  2. Start a fresh command line prompt for the system variable to take effect.

XML files

LiveCycle includes sample XML files that cause the Generate PDF service to use Notepad to process any files with the file name extension .txt. This code is included in this section. In addition, you must make the other modifications described in this section.

Additional dialog XML file

This example contains the additional dialog boxes for the Notepad application. These dialog boxes can be in addition to the ones specified by the Generate PDF service.

Notepad dialog boxes(appmon.notepad.addition.en_US.xml)

<dialogs app="Notepad" locale="en_US" version="7.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="dialogs.xsd"> 
    <window caption="Caption Title"> 
        <windowList> 
            <window className="Button" caption="OK" action="press"/> 
        </windowList> 
    </window> 
</dialogs>

Script XML file

This example specifies how the Generate PDF service should interact with Notepad to print files by using the Adobe PDF printer.

Notepad script XML file (appmon.notepad.script.en_US.xml)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> 
<!-- 
* 
* ADOBE CONFIDENTIAL 
* ___________________ 
* Copyright 2004 - 2005 Adobe Systems Incorporated 
* All Rights Reserved. 
* 
* NOTICE:  All information contained herein is, and remains 
* the property of Adobe Systems Incorporated and its suppliers, 
* if any. The intellectual and technical concepts contained 
* herein are proprietary to Adobe Systems Incorporated and its 
* suppliers and may be covered by U.S. and Foreign Patents, 
* patents in process, and are protected by trade secret or copyright law. 
* Dissemination of this information or reproduction of this material 
* is strictly forbidden unless prior written permission is obtained 
* from Adobe Systems Incorporated. 
*--> 
 
<!-- This file automates the printing of text files by using Notepad with the Adobe PDF printer. To see the complete hierarchy, it is recommended that you use Microsoft Spy++, which details the properties of windows necessary to write scripts. In this sample there are a total of eight steps--> 
 
<application name="Notepad" version="7.0" locale="en_US" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="scripts.xsd"> 
 
<!-- In this step, wait for the application window to appear. Notice the use of the regular expression ".*", which means any number of non-terminating characters. --> 
    <step> 
        <expectedWindow> 
            <window caption=".*Notepad"/> 
        </expectedWindow> 
    </step> 
     
<!--In this step, acquire the application window and send File->Open menu bar and menu item commands with the expectation that this is the Windows Open dialog box-->         
    <step> 
        <acquiredWindow> 
            <window caption=".*Notepad"> 
                <virtualInput> 
                    <menuBar> 
                        <selection> 
                            <name>File</name> 
                        </selection> 
                        <selection> 
                            <name>Open...</name> 
                        </selection> 
                    </menuBar> 
                </virtualInput> 
            </window> 
        </acquiredWindow> 
        <expectedWindow> 
            <window caption="Open"/> 
        </expectedWindow> 
    </step> 
     
    <!-- In this step, acquire the Open window, select the Edit submenu and input the source path. Then click the Open button. The expectation of this action is that the Open dialog box will disappear --> 
    <step> 
        <acquiredWindow> 
            <window caption="Open"> 
                <windowList> 
                    <window className="ComboBoxEx32"> 
                        <windowList> 
                            <window className="ComboBox"> 
                                <windowList> 
                                    <window className="Edit" action="inputSourcePath"/> 
                                </windowList> 
                            </window> 
                        </windowList> 
                    </window> 
                </windowList> 
                <windowList> 
                    <window className="Button" caption="Open" action="press"/> 
                </windowList> 
            </window> 
        </acquiredWindow> 
        <expectedWindow> 
            <window caption="Open" action="disappear"/> 
        </expectedWindow> 
        <pause value="30"/> 
    </step> 
     
    <!-- In this step, acquire the application window and send the File > Print menu bar and menu item commands, with the expectation that this is the Windows Print dialog box--> 
    <step> 
        <acquiredWindow> 
            <window caption=".*Notepad"> 
                <virtualInput> 
                    <menuBar> 
                        <selection> 
                            <name>File</name> 
                        </selection> 
                        <selection> 
                            <name>Print...</name> 
                        </selection> 
                    </menuBar> 
                </virtualInput> 
            </window> 
        </acquiredWindow> 
        <expectedWindow> 
            <window caption="Print"> 
        </window> 
        </expectedWindow> 
    </step> 
     
    <!-- In this step, acquire the Print dialog box and click the Preferences button. The expected window in this case is the Printing Preferences dialog box--> 
    <step> 
        <acquiredWindow> 
            <window caption="Print"> 
                <windowList> 
                    <window caption="General"> 
                        <windowList> 
                            <window className="Button" caption="Preferences" 
                                action="press"/> 
                        </windowList> 
                    </window> 
                </windowList> 
            </window> 
        </acquiredWindow> 
        <expectedWindow> 
            <window caption="Printing Preferences"/> 
        </expectedWindow> 
    </step> 
     
    <!-- In this step, acquire the Printing Preferences dialog box and select the combo box, which is the 10th child of the window with the caption "Adobe PDF Settings" and select the first index. (Note: All indexes start with 0. Also, deselect the box that has the caption "View Adobe PDF results" and click OK. The expectation is that the Printing Preferences dialog box disappears. --> 
    <step> 
        <acquiredWindow> 
            <window caption="Printing Preferences"> 
                <windowList> 
                    <window caption="Adobe PDF Settings"> 
                        <windowList> 
                            <window className="ComboBox" childIndex="10"> 
                                <virtualInput> 
                                    <index value="1"/> 
                                </virtualInput> 
                            </window> 
                        </windowList> 
                        <windowList> 
                            <window className="Button" caption="View Adobe PDF results" 
                                action="uncheck"/> 
                        </windowList> 
                    </window> 
                </windowList> 
                <windowList> 
                    <window className="Button" caption="OK" action="press"/> 
                </windowList> 
            </window> 
        </acquiredWindow> 
        <expectedWindow> 
            <window caption="Printing Preferences" action="disappear"/> 
        </expectedWindow> 
    </step> 
     
    <!-- In this step, acquire the Print dialog box and click the Print button. The expectation is that the dialog box with the caption "Print" disappears. In this case use the regular expression ^Print$ for specifying the caption, given that there can be multiple dialog boxes with captions that include the word "Print". --> 
    <step> 
        <acquiredWindow> 
            <window caption="Print"> 
                <windowList> 
                    <window caption="General"/> 
                    <window className="Button" caption="^Print$" action="press"/> 
                </windowList> 
            </window> 
        </acquiredWindow> 
        <expectedWindow> 
            <window caption="Print" action="disappear"/> 
        </expectedWindow> 
    </step> 
     
    <!-- Finally, in this step acquire the dialog box with the caption "Save PDF File As". In the Edit window type the destination path for the output PDF file and click the Save button. The expectation is that the Save PDF File As dialog box disappears--> 
    <step> 
        <acquiredWindow> 
            <window caption="Save PDF File As"> 
                <windowList> 
                    <window className="ComboBoxEx32"> 
                        <windowList> 
                            <window className="ComboBox"> 
                                <windowList> 
                                    <window className="Edit" 
                                        action="inputDestinationPath"/> 
                                </windowList> 
                            </window> 
                        </windowList> 
                    </window> 
                </windowList> 
                <windowList> 
                    <window className="Button" caption="Save" action="press"/> 
                </windowList> 
            </window> 
        </acquiredWindow> 
        <expectedWindow> 
            <window caption="Save PDF File As" action="disappear"/> 
        </expectedWindow> 
    </step> 
     
    <!-- We can always set a retry count or a maximum time for a step. In case we surpass these limitations, the Generate PDF service generates this abort message and terminates processing. --> 
    <abortMessage msg="15078"/> 
</application>

// Ethnio survey code removed