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.

3 Responses to Document Printing Using Adobe LiveCycle Output

  1. Jarl says:

    A simple question, but difficult to find a direct answer for it it:

    Does the LC Output sendToPrinter support an lpdUri with username? Take for example lpd://server/queue would be desired written as lpd://user@server/queue.

    Alas, the LC Output service does not support this uri format, and returns a faulstring with “Unable to connect to LPDURI (….)”. Is this intended?

    It would be great to be able to append username to the lpd uri sent to the LC Output service.

    • Raga says:

      That is not the intended response. We will fix this in this release. If you want that fix, can you please log a case so that I get the platform you are running.

      • Jarl says:

        thanks for quick answer.

        It seems actually that we are using an older version and that I was not absolutely clear about what method I was calling in soapUI. It was actually LPRPrint, that is now deprecated. My next question is therefore:

        does this remote method support an lpdUri format with username? (user@host) or do we have to wait until we have installed the newer version of LC? Or is it some other way to pass username to the LPD print request? e.g some other element?

        Since I am not using the latest version I find it unneccessary to post a case, since this should be a quick yes or no answer.

Leave a Reply

Your email address will not be published. Required fields are marked *