Registration

Dear SAP Community Member,
In order to fully benefit from what the SAP Community has to offer, please register at:
http://scn.sap.com
Thank you,
The SAP Community team.
Skip to end of metadata
Go to start of metadata

Introduction

Specifying different Paper Trays of the Printer for different pages of the print output can be done by the 'Resource' options on SAP Scripts and Smartforms. But we do not have a straight forward solution for the same requirement while working on Adobe Forms.

This article describes how to configure Adobe Document Services to specify a paper tray of the postscript printer to a print output page in Adobe Forms.

1.   Why do we require Multiple Tray Option?

Business may require using multiple paper types (like Letter, Plain, Preprinted etc.) for the same print document. In such a case, we need each tray to be loaded with papers of specific paper type, and the printer can select corresponding tray as needed, while printing the document.

SAP Adobe Forms achieves many document handling capabilities by deploying Adobe document services (ADS) to SAP NetWeaver AS. Adobe document services allow SAP applications to take advantage of the full range of Adobe Acrobat capabilities.

2. Configuring Adobe Document Services

SAP Interactive Forms by Adobe can render different formats (PDF, PCL, PostScript, ZPL) by using a special print driver and an XML based configuration file called an XDC. These XDC files reside on the ADS server. XDP is the file with the XML code of the print layout/template. It is generated when the layout is designed. When a template (XDP) and data (XML) are rendered, part of the configuration specifies which XDC to use.

In order to direct printed output to a specific input tray on a printer, modifications to the appropriate XDC configuration file residing on the SAP server must be made. These changes can be made using the Adobe XDC Editor. In order to make these changes, certain information about the printer will first have to be acquired.

Detailed procedure is explained in the below steps.

2.1. Assigning paper Types in Adobe Forms

The pages are assigned with different Paper Types in Adobe Forms using the LifeCycle Designer, as below.

 !Form_trayassignment.jpg!

This results in the following syntax in the XDP file (the 'XML Source' tab on the layout seen above). The Paper Type is termed as 'stock' in the <medium/> element of XDP file.

id=Page1
initialNumber=1
name=Page1
h=257.182mm
id=CA1_ID
name=CA1
w=190.092mm
x=8.108mm
y=4.926mm
long=279.4mm
short=215.9mm
stock='letterPlain'

2.2 Modifying XDC file and Job Profiles

The Form Paper Type mentioned in the form layout can be used to determine the Printer Tray to be selected. This is achieved by modifying XDC file and Job Profiles that reside on the ADS server. By modifying the XDC files and job profiles, we can customize the way we handle the trays to print documents.

If the Form Paper Type is not supported by the printer, the Form Paper Type as to be mapped to Printer Paper Type (Printer Paper size) in Job Profiles.

When you deploy Adobe document services to SAP NetWeaver AS, the XDC files are located in the <GLOBAL_DIR>/AdobeDocumentServices/lib directory, and the Job Profiles are located in the <GLOBAL_DIR>/AdobeDocumentServices/lib/JobProfiles/Adobe/Print directory.

The mapping of Form Paper Type to the Printer Tray is specified in the XDC files.

Following are the steps to be followed to map specific Printer Tray to the Form Paper Type.

2.2.1. Determining the XDC file for the Device Type



Note: Report

2.2.2. Changing the XDC file

The XDC files are modified with the Adobe XDC editor. The Adobe XDC Editor is an Eclipse based editor and can be downloaded from the following link:

https://www.sdn.sap.com/irj/sdn/nw-appserver-tools

To access the XDC files, follow the instructions in the XDC editor documentation.

XDC files contain data that instructs a printer to create the final representation of a form so that it can be printed or displayed in Adobe Reader.

It is in the XDC files, that the Printer trays are assigned to the Paper Types, as shown in the below screen of the XDC editor. For this, the tray information and the Paper Types (identified as 'stocks' in the XDC file) are required. The stock names must match the names of the stock specified by the <medium/>element in the XDP file. The table shown below is known as the 'Tray Mapping Table'.

  The changes to be made to the XDC file vary with the printer driver, which can be known from the printer configuration. The Printer configuration is known from the Printer Manual, or can be examined by printing out the details via menu items on the front panel of the printer.

Tray information mainly includes 'Tray Number' which is available in the reference manual. In addition to the tray number, PostScript printers can accept a 'Tray Type' value. Tray Type is the PostScript media type, which can be either a predefined printer value or a value defined by using the front panel of the printer. Examples of Media Type include PLAIN, COATED and GLOSSY.

PostScript level 3 printers support both 'Tray Number' and 'Tray Type'. Older PostScript level 2 printers do not support 'Tray Number'. If both 'Tray Number' and 'Tray Type' are specified in the XDC file, then 'Tray Number' will take precedence.

In the XDC editor, modify the 'Language Level' field in the 'Printer Capabilities' tab based on the Printer level.

The process for entering the tray number and tray type for PostScript printers would be as follows:

For a PostScript level 3 printer:

  • Set the Language Level to '3' in the 'Printer Capabilities' tab.
  • Set the Tray Number value and leave the Tray Type blank in the 'Medium and Tray Mappings' Tab.

When the options are set as described above, following code is added in the XDC file.

<option name="language">ps</option>
<option name="languageLevel">3</option>

<inputTrays>
  <inputTrayDefinition medium="letterPlain" name="letterPlain" trayNumber="0"/>
  <inputTrayDefinition medium="letterLetterhead" name="letterLetterhead" trayNumber="3"/>
</inputTrays>

For a PostScript level 2 printer:

  • Ensure that the Language Level is set to '2' in the 'Printer Capabilities' tab.
  • Leave the Tray Number field blank and set the Tray Type value.

When the options are set as described above, following code is added in the XDC file.

<option name="language">ps</option>
<option name="languageLevel">2</option>

<inputTrays>
  <inputTrayDefinition medium="letterPlain" name="letterPlain" trayType="Plain"/>
  <inputTrayDefinition medium="letterLetterhead" name="letterLetterhead" trayType="Letterhead"/>
</inputTrays>

2.2.3. Changing the Job Profiles

Job profiles are mainly used to map the Form Paper Type to Printer-specific Paper Type (or Paper Size), when the Form Paper Types are not supported by the Printer.

Job profiles contain job-specific configuration settings in XML format. When your application calls Adobe document services, you can optionally specify a job profile. If you do, the profile is found and used to modify the way Adobe document services process that job.

Once the input trays are defined, you specify the type of paper you want to print on in a job profile. Adobe document services use the tray mapping table to determine which input tray contains that type of paper.

Following is the screen shot of the Printer properties, which displays the Size as 'Letter' and Paper Type as 'Letterhead'. (The term 'Size' implies the 'Paper Type' in SAP) The Job Profiles are XML files, with the mapping mentioned in the<map/> element, as below.

  • No labels

1 Comment

  1. Former Member

    The newest download location is http://www.sdn.sap.com/irj/sdn/softwaredownload?download=https://www.sdn.sap.com/downloads/netweaver/AdobeXDCEd_2282011111725PM_v1.zip

    Also, don't trust the README in the ZIP file, the JDK you need to install is the 1.6 version, NOT the 1.5 version as mentionned. Then it works like a charm. Don't waste almost a day like we did, trying to figure out why this crazy editor doesn't want to work in Eclipse. It seems the class files were upgraded over time but the README file not adjusted accordingly.