Posts tagged "LiveCycle"

Simplifying the Input tray set-up

We have observed and also received feedbacks from the users (whoever dared to do it) that setting up input trays has been quite a complex task. After designing the form, one needs to add the medium names used in the form to the xdc file
This blog post aims at simplifying this task and also clarify the steps that one needs to follow in order to set-up the input trays.

Input tray selection.

Basically, the input tray set-up problem can be defined as selection of paper from different input trays of the printer while printing the document. Without loss of generality, let’s take up the case of selection of two different trays (T1 and T2) for a template which has two different master pages (M1 and M2) and the user wants to select paper from tray T1 for master page M1 and similarly for master page M2, the user wants to select paper from tray T2.
We can categorize this requirement into two main sub-categories based on the paper sizes used in the master page. Before going ahead, I should mention that master page is basically a logical page which serves as a template for a set of pages in the xdp. The designer user can specify the page properties like page size at the master page level.

M1 and M2 represent two different page sizes.

In this case,

  1. Make sure that the medium name used in M1 and M2 is present in the printer xdc file.
  2. Configure printer trays T1 and T2 for paper sizes of M1 and M2 respectively.

M1 and M2 represent same paper size.

This is a bit tricky case and one has to make a heck of changes in printer XDC file. The sequence of steps can be as following:

  1. Add the mediums present in M1 and M2 to printer xdc file. To do this one may need the following information.

medium name (copy from template), short edge size, long edge size and in case of PCL one also need to give pcl sequence for this medium.

Please note that one has copy the medium names from template as the designer shows different UI name for any medium. For example it shows “Letter Plain” for “letterPlain” medium.

  1. Specify the tray sequences for T1 and T2 to map it to corresponding mediums M1 and M2. Please note that one has to specify tray sequence for a tray every single time whenever one maps a medium to this tray. This is because the UI table representing xdc schema is not properly normalized.

Basic Idea

One would have realized that input tray set-up is not an easy task esp. for second category use cases. There are lot of duplicate information one asks from user that can be easily determined from previous values given in the xdc file. And also there is no sync between the UI strings shown by designer and XDC Editor.

Separate Medium and Input Tray tables

Currently the medium table allows one to add and modify both mediums and the input trays they are mapped to. This table will be separated into two tables for medium and input trays. By giving a separate table to input trays, redundancy in input tray data can be avoided and better visibility is given to the user into what input trays are available.

Add a separate mapping tale

The mapping information is currently embedding in the medium table. Once medium and input tray tables are separated, a mapping table can better manage the mapping of mediums to trays.

Changes in UI

  • The tab page ‘Medium and Trays’ will be split into two pages, ‘Trays’ and ‘Mediums’, in order of appearance.
  • ‘Trays’ page will have the Input, Output trays specifications and input-tray-medium mapping tables. User will mostly be dealing with ‘Trays’ page.
  • ‘Mediums’ page will only have a Medium table with buttons to add/modify/delete mediums. Mediums page will be the last page as user will add/delete mediums rarely.
  • Sample screenshots are shown below.

Input Trays table

The current input trays table is merged with the medium table and looks like as follows:

The new input tray table will not have any mention of medium, and will look like as follows:

Please note that ‘Tray type’ column will be shown only for Postscript.

All columns in the table have unique values individually. An input tray cannot share its tray name, number or type with another input tray.

Addition of a new tray

Addition of new input tray is separated from adding a new medium. The new dialog looks like:

Medium table

The current medium table is the same as the current input trays table, and shown above .
The new medium table will be moved to its own ‘Mediums’ page. A sample screenshot follows:

The ‘PCL Sequence’ column will be shown only for PCL printers.
The Stock name in Medium table will be unique. Rest of the columns may not have unique values.

Addition of new medium

The current ‘add new medium’ dialog mixes adding a new medium with adding a input tray and input-tray-medium mapping. It looks like as follows,

The new ‘Add new medium’ dialog looks like,

Input tray and medium mappings table

This is a new table proposed to be located in ‘Trays’ page.

Modification of a mapping after addition is not intuitive, so user will have to remove and then re-add a mapping to modify its medium or input tray.
The medium name column will have unique values.

Specify a new medium mapping

‘Map medium to tray’ is a new dialog.

The medium and input tray will be available as drop downs. Mediums already mapped to a tray will not be available.

Document Printing Using Adobe LiveCycle Output

Adobe LiveCycle Output generates printer ready document in various formats like ps, pcl etc from a form design (xdp) or pdf. The form design here refers to the combination of a template and the data associated with it. These printer ready documents can be directly streamed to the printer for printing. I will start start with the types of printers first and then examine the Output API to access them.

Printers can be broadly classified into two categories based on the way to access them.

Directly accessible printer

If a printer is installed on the same machine from where it is being accessed (means on the same machine where LiveCycle is installed), it is called directly accessible printer and the machine is called printer host (or print server) machine. These type of printers can be a local printer connected to the machine directly or a remote network printer installed on that machine.

Indirectly Accessible Printer

Now-a-days, there are technologies like LPR/LPD, CUPS etc. available to obviate the need of the printer being installed on the same machine, to use that.
In this model, the printer installed on a machine (print server) is accessed from another machine. This is called indirect access. In this type of access we need to know the print server IP or hostname and the printer’s name.

One Solution to all problem

LC Output has following single API to access all kinds of printers. The user needs to pass the access mechanism, described later in this blog in the API.

void sendToPrinter(Document document, Enum accessMechanism, String printServerUri, String printerName)

where document being the document to be printed, printerName being the printer on which the document to be printed, printServerUri being the print server on which the printerName is installed and accessMechanism being the method to use to direct the document on the printerName.

The LPD service might be listening to the ports different than the standard ports. In that case the caller needs to pass the ip address and port number in x.x.x.x:portNo format.

Enumeration Description
This is used for direct access of the printer. In this case, the user needs to specify only the printerName, The printServerUri argument will be ignored in this case.
LPD If specified, LC will use indirect method to access the printerName via the printServerUri using LPR/LPD technology.
CUPS If specified, LC will use indirect method to access the printServerUri using IPP 1.1 technology.
If specified, LC will use the direct ip mechanism to access the printServerUri. The printerName argument, in this case, will be ignored by the API.


The following table describes the expected results in case of each accessMechanism that the user can expect:

accessMechanism value of sPrintServerUri value of sPrinterName Expected result
Any null Exception : Required Argument sPrinterName cannot be null
Any Invalid Exception : Printer not found
Any Valid Printed Output
LPD null Any Exception : Required Argument sPrintServerUri cannot be null
LPD Invalid null Exception : Required Argument sPrinterName cannot be null
LPD Invalid non-null Exception : sPrintServerUri not found
LPD Valid Invalid Exception : Printer Not Found
LPD Valid Valid Printed Output
CUPS null Any Exception : Required Argument sPrintServerUri cannot be null
CUPS Invalid Any Exception : Printer Not Found
CUPS Valid Any Printed Output
null Any Exception : Required Argument sPrintServerUri cannot be null
Invalid Any Exception : Printer Not Found
Valid Any Printed Output

The sPrintServerUri parameter, in case of CUPS will be something like http://<server>:<port>/<path>/<printerName>. If the user wants to use a port other than the default port in case of LPD and DirectIP, he can pass <server>:<port> in the sPrintServerUri argument. Here <port> is strictly a positive integer and <server> is either a valid IP address or a valid hostname. If one passes anything other than the integer in place of <port>, one will get Malformed URI exception.