Previous  Next          Contents  Index  Navigation  Glossary  Library

Creating Custom Printer Drivers

If necessary, edit the Initialization string and the Reset string for the printer type you are using. Refer to your printer's user guide for instructions. The Initialization and Reset fields appear on the Printer Drivers form.

Edit your Initialization string or Reset string if:

Printer Driver Methods

There are three methods to invoke a printer driver:

Command The concurrent manager can issue an operating system print command and its arguments.
An operating system print command, along with all its arguments, is entered in the Arguments field of the Printer Drivers form.
Program The concurrent manager can call a custom print program and pass arguments to the program.
The name of a custom print program is entered in the Name field, and any arguments to be passed to the program are entered in the Arguments field, of the Printer Drivers form.
Subroutine The concurrent manager can call a predefined Oracle Applications subroutine that passes a print command and arguments to the printer via the operating system.
A subroutine is predefined by Oracle Applications, and the name is entered in the Name field of the Printer Drivers form.
The arguments field is disregarded when the driver method is Subroutine. However, the concurrent manager reads the Initialization and Reset escape sequences.
On UNIX systems, the subroutine method, unlike the command method, does not start an operating system shell along with the print command.

Example - Using the Program Driver Method

The Program driver method allows customers to define their own custom print programs. For example, your company might want to write a custom program that opens a file, allows the file to be edited and saved under a second filename, then sends the second (edited) file on to the printer by issuing the print command. This method of issuing print commands is called a filter.

Location for Custom Print Programs

To call a custom print program using the Printer Drivers form, the program name, including the full path to the program, should be entered in the Program Name field.

The path to the program name is not necessary if the program's location can be identified by the operating system's PATH environment variable (i.e., is in the $PATH variable name).

For platforms where the equivalent of a $PATH variable doesn't exist, then use the full path name. A path can be up to 255 characters.

Custom print programs are not registered as concurrent programs with Oracle Application Object Library, but are called after the concurrent process has completed.

Using Operating System Shell Scripts

For operating system shell scripts, the printer driver method can be either command or program, as long as you populate the argument field correctly.

The script for a command shell procedure, for example, a UNIX shell or a VMS dcl, should reside in:

Arguments That a Concurrent Manager Can Supply Values For

The concurrent manager can supply four different values as arguments to the operating system print command it issues, or a custom print program that it calls. An example of using these values as arguments is presented in Figure 1 - 24 and Table 1 - 22.

Example - Entering a Print Command and Arguments

In this example, the UNIX print command lp is entered along with the arguments that a concurrent manager can supply values for. While print commands vary, the tokens for which values are retrieved are always the same.

Since print commands are operating system dependent, please refer to your Oracle Applications Installation Guide.

Figure 1 - 24.

Passing Arguments to UNIX lp Print Command

Argument Syntax Token and Value Retrieved
-d$PROFILES$.PRINTER -d calls out the destination printer. $PROFILES$.PRINTER retrieves the operating system name of the printer associated with the request.
-n$PROFILES$.CONC_COPIES -n calls out the number of copies to print. $PROFILES$.CONC_COPIES retrieves the value of the profile option Concurrent:Report Copies, unless this value is updated at runtime.
-t"$PROFILES$.TITLE" -t calls out the report title to print on a banner or header page. "$PROFILES$.TITLE" retrieves the title of the output file, typically titled as Application username.Request ID. For example, if user John Smith ran a report whose concurrent request ID was 64225, the title would be JSMITH.64225. This is operating system dependent.
$PROFILES$.FILENAME $PROFILES$.FILENAME calls out the filename of the report to be printed. The value retrieved is the output file name, including the path to the file.

Using Standard Input

When Standard Input is set to Yes, the printer driver accepts standard input, so you can feed a report's output directly to the printer from standard input. Two examples of using standard input are:

The Standard Input field should be set to No when the Driver Method is set to Program, or Subroutine. Unless the program accepts standard input, the Standard Input field should always be set to No.

Attention: When Standard Input is set to No, the print command issued by the concurrent manager runs asynchronously. That is, the concurrent manager issues the command, and does not wait for an operating system response.

See Also

Overview of Printers and Printing

Customizing Printing Support in Oracle Applications

Using Initialization and Reset Strings

Using a Spool File

Printer Drivers field help


         Previous  Next          Contents  Index  Navigation  Glossary  Library