generatePrintedOutput operation

Generates a PCL, PostScript, ZPL, IPL, TPCL, or DPL output given a form design and data file. The data file is merged with the form design and formatted for printing. The output generated by this operation can be sent directly to a printer or saved as file. It is recommended that you use this operation when you want to use form designs or data from an application. If your form designs or form designs are located on the network, local file system, or HTTP location, use the generatePrintedOutput operation.

The benefits of using this operation instead of the generatePDFOutput (deprecated) operation are as follows:

  • Maximizes application portability because all assets are contained in a single application.

  • Simplifies the process design because the form design or data files can be assessed as a document variable.

For example, your application requires that you merge a form design with a data file. The data contains hundreds of records. In addition, it requires the output is sent to a printer that supports ZPL. The form design and your input data are located in an application. Use the generatePrintedOutput operation to merge each record with a form design and send the output to a printer that supports ZPL.

For information about the General and Route Evaluation property groups, see Common operation properties .

Input properties

Properties to specify a form design, data file, and print format.

Form

A document value that represents the form design. You create form designs in Designer.

If you provide a literal value, clicking the ellipsis button  opens the Select Asset dialog box. (See About Select Asset .)

Input Data

(Optional) A document value that specifies the data file that is merged with the form design. The data file that you provide is an XML file.

If you provide a literal value, clicking the ellipsis button opens the Select Asset dialog box. (See About Select Asset .)

Print Format

A PrintFormat value that specifies the page description language to use, when an XDC file is not provided, to generate the output stream.

If you provide a literal value, select one of these values:

Custom PCL:
Use the default XDC file for PCL or specify a custom XDC file for PCL. The default XDC file is hppc5e.xdc.

Custom PostScript:
Use the default XDC file for PostScript or specify a custom XDC for PostScript. The default XDC file is ps_plain.xdc.

Custom ZPL:
Use the default XDC file for ZPL or specify a custom XDC file for ZPL. The default XDC file is zpl203.xdc.

Generic Color PCL (5c):
Use a generic color PCL (5c). The hppcl5c.xdc file is used.

Generic PostScript Level3:
Use generic PostScript Level 3. The ps_plain_level3.xdc file is used.

ZPL 300 DPI:
Use ZPL 300 DPI. The zpl300.xdc is used.

ZPL 600 DPI:
Use ZPL 600 DPI. The zpl600.xdc file is used.

Custom IPL:
Use a custom IPL. The default XDC file is ipl203.xdc.

IPL 300 DPI:
Use IPL 300 DPI. The ipl300.xdc is used.

IPL 400 DPI:
Use IPL 400 DPI. The ipl400.xdc file is used.

Custom TPCL:
Use the default XDC file for TPCL or specify a custom XDC file for TPCL. The default XDC file is tpcl203.xdc.

TPCL 305 DPI:
Use TPCL 300 DPI. The tpcl305.xdc file is used.

TPCL 600 DPI:
Use TPCL 600 DPI. The tpcl600.xdc file is used.

Custom DPL:
Use the default XDC file for DPL or specify a custom XDC file DPL. The default XDC file is dpl203.xdc.

DPL300DPI:
Use DPL 300 DPI. The dpl300.xdc file is used.

DPL406DPI:
Use DPL 400 DPI. The dpl406.xdc is used.

DPL600DPI:
Use DPL 600 DPI. The dpl600.xdc is used.

Template Options properties

Properties to specify the location to retrieve the XDC file

Content Root

(Optional) A string value that specifies the URI, absolute reference, or location in the repository to retrieve relative assets used by the form design. For example, if the form design references an image relatively, such as ../myImage.gif, myImage.gif must be located at repository://. The default value is repository://, which points to the root level of the repository. The default value is repository:// .

When you pick an asset from your application, the Content Root URI path must have the correct structure. For example, if a form is picked from an application named SampleApp, and is placed at SampleApp/1.0/forms/Test.xdp, the Content Root URI must be specified as repository://administrator@password/Applications/SampleApp/1.0/forms/ , or repository:/Applications/SampleApp/1.0/forms/ (when authority is null). When the Content Root URI is specified this way, the paths of all of the referenced assets in the form will be resolved against this URI.

Use the following sources for a URI or absolute reference:

Repository:
The repository contains assets that you upload to the AEM forms Server. The value repository:/// references the root of the repository. The first two forward slashes are part of the protocol ( repository:// ) and the third forward slash represents the root of the repository. For example, if the form design references an image relatively, such as ../myImage.gif, myImage.gif must be located at repository://. The default value is repository://, which points to the root level of the repository.

Directory in the file system of the AEM forms Server:
You can specify a location on the AEM forms Server, such as C:\ [folder name] . Using a location on the server is not recommended when maximizing the portability of an application.

Network directory:
You can specify a location on the network, such as \\[folder name.]

Web location that is accessible by using HTTP:
After you upload a file to a location on a web server, you can specify the location by using a URL. For example, type http:// [server name] : [port number] / [folder name] . The value [server name] is the name of the web server, [port number] is the port number, and [ folder name] is the name of the folder.

XDC URI

(Optional) A string value that specifies the XDC file to use. XDC files are printer description files in XML format. The Output service uses XDC files to output documents to formats such as, PostScript, PCL, DPL, TPCL, and ZPL. You can specify custom XDC files that you create using the XDC Editor. (See AEM forms XDC Editor Help ).

If you provide a literal value, you type the name of the XDC file. The property is only editable when you select one of these values in the Print Form property in this operation:

  • Custom PCL

  • Custom PostScript

  • Custom ZPL

  • Custom IPL

  • Custom TPCL

  • Custom DPL

Output Options properties

Properties to specify the options to use when generating the output.

XCI URI

(Optional) A string value that specifies the XCI file to use. XCI files are used to describe fonts that are used for form design elements. XDC files are also used to specify print options such as number of copies, whether duplex printer is used, or stapler options.

Character Set

(Optional) A string value that specifies the character set used to encode the rendered form.

If you provide a literal value, select the character set to use or select one of these values:

<Use Server Default>:
(Default) Select to use the Character Set setting configured on the AEM forms Server. The Character Set setting is configured using administration console. (See Designer Help.)

<Use Custom Value>:
Select and type the canonical name (Java.nio API) of the encoding set that is not in the list. For a complete list of character sets, see http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html.

Locale

(Optional) A string value that specifies the language used for generating the PDF document.

If you provide a literal value, select a language from the list or select one of these values:

<Use Server Default>:
(Default) Use the Locale setting configured on the AEM forms Server. The Locale setting is configured using administration console. (See Designer Help.)

<Use Custom Value>:
After selecting this option, type the Locale ID of the locale code that is not in the list. For a complete list of supported locale codes, see http://java.sun.com/j2se/1.5.0/docs/guide/intl/locale.doc.html.

Copies

(Optional) An int value that specifies the number of copies to generate for the output. The default value is 1.

Batch Options properties

Properties to specify the records name, record levels, and whether to generate multiple outputs for each record in the data file.

Record Name

(Optional) A string value that specifies element name that identifies the beginning of a batch of records.

Record Level

(Optional) An int value that specifies the XML element level that contains the record data.

If you provide a literal value, the default is 1, which represents the first level in the record specified by the Record Name property.

Generate Multiple Streams

(Optional) A boolean value that specifies whether the operation creates a single or multiple outputs.

If you provide a literal value, the Generate Multiple Streams check box is deselected by default. Select the check box to create multiple outputs. Multiple outputs are useful when you send an output after each record is completed processing. Deselect the check box to create a single output. Single output is useful when you want to send all the processed records at once.

Enable Lazy Loading

(Optional) A boolean value that specifies whether incremental (lazy) loading is used when processing multi-record data sets. When incremental loading is used, it helps to reduce the amount of memory used on the AEM forms Server. The use of incremental loading limits XLST options specified in the XCI file because transformations can only be applied to one record at a time.

If you provide a literal value, select the Enable Lazy Loading check box to load and merge one record of data. Deselect the check box to load and merge the entire data file, or all data at one time.

Rule Options properties

Properties to specify the rules for pattern matching. Pattern matching is used for applying a form design to a specific record that matches a string.

Pattern Match Size

(Optional) An int value that specifies the number of bytes to use from the beginning of the input data file to scan for the pattern strings.

If you provide a literal value, the default is 500. For information about working with search rules, see Designer Help.

Pattern Matching Rules

(Optional) A list of string values for scanning the input data file for a pattern and associates the data with a specific form design. For example, to specify when the pattern matches "cover",to use the form design named CoverLetter.xdp, type pattern="cover" form="CoverLetter.xdp" .

If you provide a literal value, click one of these buttons to add or delete an entry from the list.

A green plus sign. Add A List Entry:
Adds a new rule. After you click this button, a new entry is created in the list. In the Pattern field for the new entry, type a pattern to search for. In the Form field, type the name of the form design for the matching pattern. All the form designs that you specify must be available at the location specified by the Content Root property in this operation.

A red X. Delete A Selected List Entry:
Removes the selected a rule in the list.

For example, you can specify a pattern such as car , and specify the operation to use the form design named AutoInsurance.xdp . The form AutoInsurance.xdp is used whenever the text car is in the data. For information about working with search rules, Designer Help.

Destination Options properties

Properties to specify the location where to send the output.

Output Location URI

(Optional) A string value that specifies the URI to save the output file. If you create multiple files, the filenames are suffixed with a numeric value. For example, if you specify C:\forms\Loan.pdf, the Output service creates the filenames Loan0001.pdf, Loan0002, Loan0003, and so on. Each of the files are created in the C:\forms folder on the AEM forms Server.

Printer Name

(Optional) A string value that specifies the name of the printer for sending the output to for printing. The AEM forms Server must be configured to access specified printer.

If you provide a literal value, you can specify the name of printer by formatting it as \\ [print server] \ [printer name] . The value [print server] represents a printer server and [printer name] is the name of the printer.

LPD URI

(Optional) A string value that specifies the URI of the Line Printer Daemon (LPD) running on the network.

If you provide a literal value, you can specify the name of the LPD by formatting it as lpd:// [host name] . The value [host name] is the name of the LPD host.

LPD Printer Name

(Optional) A string value that specifies the name of the printer at the specified Line Printer Daemon (LPD) URI.

If you provide a literal value, you can specify a printer name by formatting it as [printer name] . The value [printer name] is the name of the printer.

Printer Options properties

Properties to specify printer options for printing the output.

Duplex Printing

(Optional) A Pagination value that specifies whether to use two-sided or single-sided printing. Printers that support PostScript and PCL use this value.

If you provide a literal value, select one of these values:

duplexLongEdge:
Use two-sided printing and print using long-edge pagination.

duplexShortEdge:
Use two-sided printing and print using short-edge pagination.

simplex:
Use single-sided printing.

Staple

(Optional) A Staple value that specifies whether to staple the output on the printer. Printers that support PostScript and PCL use this value.

If you provide a literal value, select of these values:

Off:
Do not use the stapler on the printer.

On:
Use the stapler on the printer.

Use Printer Setting:
Use printer stapler settings.

Page Offset X

(Optional) An string value that specifies the distance of the page offsets in the horizontal direction. This value is useful when you print the job on preprinted paper and change the origin (for example, the default page offsets for that particular job). This value overrides the page offsets defined in the XDC file. The XDC file settings represent a non-printable area for any PCL device. This option is for PCL devices only.

Use in (inches), cm (centimeter), mm (millimeter) and pt (points) to specify the unit of measure. For example, use type 1 in .

Page Offset Y

(Optional) An string value that specifies the distance of the page offsets in the vertical direction. This value is set when you print the job on preprinted paper and change the origin (for example, the default page offsets for that particular job). This value overrides the page offsets defined in the XDC file. The XDC file represents non-printable area for any PCL device. This option is for PCL devices only.

Use in (inches), cm (centimeter), mm (millimeter) and pt (points) to specify the unit of measure. For example, use type 1 in.

Output Bin

(Optional) A string value that specifies the output tray on the printer. This value is used to enable the print driver to select the appropriate output bin. For example, type outputtray1 to specify the first output tray on a printer.

Output Jog

(Optional) An OutputJog value that specifies that pages that are physically shifted in the output tray.

If you provide a literal value, select one of these values:

usePrinterSetting
Use the jog option setting configured on the printer.

none:
Do not use jogging.

pageSet:
Use jogging each time a set of pages are printed.

MetaData Options properties

Properties to specify the format of the metadata files to create.

Meta Data Spec File

(Optional) A string value that specifies the URI of the metadata spec file to use. A metadata spec file is used to generate metadata from the provided data file.

For example, a metadata spec file can be created as follows:

<metadata-spec> 
<system> 
        <map xpath="$fileName" name="fName"/> 
        <map xpath="$format" name="docType"/> 
    </system> 
    <user> 
        <map xpath="header/txtOrderedByCompanyName" name="companyName"/> 
        <map xpath="header/txtOrderedByAddress" name="address"/> 
        <map xpath="header/txtOrderedByCity" name="city"/> 
        <map xpath="header/txtOrderedByStateProv" name="state"/> 
        <map xpath="header/txtOrderedByZipCode" name="zipCode"/> 
        <map xpath="header/txtOrderedByCountry" name="country"/> 
        <map xpath="header/txtOrderedByPhone" name="phone"/> 
        <map xpath="header/txtOrderedByFax" name="fax"/> 
    </user> 
</metadata-spec>

If you provide a literal value, clicking the ellipsis button  opens the Select Asset dialog box. (See About Select Asset .)

A metadata file is created with the data that is extracted from each record. The structure of the metadata file that is created is based on the metadata spec file. The resulting metadata file based on the previous metadata spec file is as follows:

<root><record id='null'> 
    <system> 
        <data name='fName'>c:\cumulativedata0001.pdf</data> 
        <data name='docType'>PDF</data> 
    </system> 
    <user> 
        <data name='companyName'>Any Company Name</data> 
        <data name='address'>555, Any Blvd.</data> 
        <data name='city'>Any City</data> 
        <data name='state'>Alabama</data> 
        <data name='zipCode'>12345</data> 
        <data name='country'>United States</data> 
        <data name='phone'>(123) 456-7890</data> 
        <data name='fax'>(123) 456-7899</data> 
    </user> 
</record>

Record ID XPath

(Optional) An int value that specifies the root level node to use for XPath expressions. The root level node specifies the starting point for XPath expressions. For example, consider a data schema as follows:

<batch_100> 
    <purchaseOrder> 
        <header> 
            <txtPONum>1of100</txtPONum>  
            <dtmDate>2004-02-08</dtmDate>  
            <txtOrderedByCompanyName>Any Company Name</txtOrderedByCompanyName>  
            <txtOrderedByAddress>555, Any Blvd.</txtOrderedByAddress>  
            <txtOrderedByCity>Any City</txtOrderedByCity>  
            <txtOrderedByStateProv>Alabama</txtOrderedByStateProv>  
        </header> 
        </detail 
            <txtPartNum>580463116</txtPartNum>  
            <txtDescription>Electric Fuel Pump</txtDescription>  
            <numQty>1</numQty>  
            <numUnitPrice>149.95</numUnitPrice>  
            <numAmount>149.95</numAmount>  
        </detail> 
    </purchaseOrder> 
</batch_100>

To reference the <purchaseOrder> tag as the first level in your XPath expression, set this property to value of 2. To set < batch_100> as the first level, set this property to value of 1.

Generate Record Level Meta Data

(Optional) A boolean value that specifies whether to generate a metadata file for each record.

If a literal value is provided, the Generate Record Level Meta Data check box is deselected. by default. Select the check box to generate a metadata file for each record that is processed. Deselect the check box to generate one metadata file for all records that are processed.

Output properties

Property to specify the location to store the generated output.

Printed Output

The location to store the PDF output. The data type is document .

Additional Output properties

Properties to specify the location to store the results of the operation.

Meta Data Document

The location to store the metadata. The data type is document .

Output Result

The location to store the results of the operation. The data type is OutputResult .

Exceptions

This operation can throw an OutputException exception.

// Ethnio survey code removed