PostScript and PDF Printing

 < Day Day Up > 



PostScript is the name of a page description language that was originally created by Adobe Systems, the one that brings you Portable Document Format (PDF) now. PostScript is used when high graphics and character resolution are required within a display or printed document. It allows you to employ multiple fonts and character types within a single document as well as the placement of higher quality pictures than PDF within the same document. The drawback? PostScript requires a printer that is capable of understanding the PostScript language.

Oracle Applications' reports are delivered by a wide assortment of preseeded report producing programs including Oracle Reports, SQL*Plus scripts, and PL/SQL stored procedures among others. The vast majority of these are provided via the Oracle Reports and Reports Server interface and the report is generated when it gets served up via Reports. Any Oracle Reports report can be called from a form or scheduled via the Concurrent Manager queues to run on command or on a predefined schedule. Oracle Reports provides an extensive toolset for developing and processing bitmapped (PostScript) or character mode (flat ASCII text file) reports. Although by far the majority of all reports are created to generate output files in a flat text file format, the outputs can be transformed into several other formats (e.g., HTML, PDF, and PostScript) each meeting a particular need or business requirement.

Many of these steps are important to note when defining printers in general, the steps that are format specific will be designated as such.

PostScript Setup

While the print sequence is embedded within the PostScript document, Oracle Applications requires a registered PostScript printer and registered PostScript Reports files, particular environment variables, and, on certain platforms, a custom printer configuration file. In all cases, regardless of the configuration, printing will be handled on the platform (be that the middle tier or the database tier, UNIX or Windows) where the Concurrent Managers are defined and are running from.

Before you ever attempt to print from Oracle E-Business Suite, you need to determine that you can print successfully from the OS's command line. Do not just assume that because a command appears to go away and complete successfully that the end product was also successful. Submit the print command, then go find the printout. If the printout never shows up, the print command was not successful. Some configurations, particularly mixed platform or networked environments, need additional software tools introduced to the configuration to allow the routing of requests to either a networked or local printer. If this is the case, you will need to work closely with your networking people to get the entire setup working properly from the command line before attempting to define anything to the application (otherwise you will be defining and redefining without knowing what might or might not be working).

UNIX

On UNIX, there needs to be a printer and print queue defined as a PostScript printer at the OS level. This means that printer type needs to be set as PS when adding the printer definition to lpadmin.

Windows

On Windows, you will need to make sure that the PostScript printer drivers that were supplied by the printer manufacturer are installed on the server where the Internal Concurrent Manager resides and that the defined PostScript printer is the default printer at the OS level. Remember that even remote printers need to be locally managed on the server where the Concurrent Manager resides. If it is not, you will receive Invalid Printer errors.

Regardless of the OS, make sure that not only can you print from the command line, but also that you can print a PostScript document from the command line.

UNIX

 lp  -d  <printer_name> -T postscript  <file_name> 

Windows NT

 print/d:\\<server_name>\<printer_name> <file_name> 

The configuration file that needs to be updated on UNIX with the information on the PostScript printer is the uiprint.txt file. The uiprint.txt file is a printer resource file that lists every available printer and its associated PostScript Printer Description (PPD) file. These PPD files are located in the $ORACLE_HOME/guicommon2/tk23/admin/ directory. The uiprint.txt file contains a line for each printer in a format similar to the entry that follows and Table 7.3 provides a description of the parameters in the printer definition line:

 Printer_Name:Driver_Type:Driver_Version: Description:PPD_Name 

Table 7.3: Printer Parameters

Parameter

Description

Printer_name

Name used at the OS level

Driver_type

One of the three types (PostScript, ASCII, and PCL) that is supported by Oracle Reports toolkit

Driver_Version

This is one of three different driver versions

1 for ASCII text or PostScript level 1

2 for PostScript level 2

5 for Hewlett Packard PCL (Hewlett Packard not being necessarily the printer manufacturer, but rather the maker of the PCL language)

Description

Any helpful description in free-form format

PPD_Name

Any PPD filename found in the $ORACLE_HOME/guicommon2/tk23/admin/ directory. Although you can examine all PPD files and select a suitable one, the default should be applicable for most printers.

Define Environment Variables

There are certain environment variables that need to be set that specify which printer and which particular executables need to be used for printing the PostScript output. LPDEST and PRINTER specify which is the default printer available to be used by Oracle Reports. APPLORC needs to be set to the executable program used for printing documents in bitmap mode (PostScript is considered to be bitmap mode printing). In UNIX, the executable responsible for PostScript printing is the ar25runb executable, which resides within the $FND_TOP/bin directory. If you determine that this executable is not present in your setup, you can create it manually using ADRELINK. On Windows, the executable responsible for PostScript printing is the r25run32.exe and is also located in the %FND_TOP%\bin directory. The Windows executable is responsible for not only PostScript printing, but for flat ASCII text printing as well.

Table 7.4 provides the environment variables, where they need to be set, and the command that needs to be entered in that location.

Table 7.4: Environment Variables

Environment Variables

Location

Command to Add

APPLROB

UNIX APPLSYS.env file

APPLORB=ar25runb; export APPLORB

APPLORC

UNIX APPLSYS.env file

APPLORC=ar25run; export APPLORC

LPDEST

UNIX APPLSYS.env file

LPDEST= <Actual Printer Name> ; export LPDEST

PRINTER

UNIX APPLSYS.env file

PRINTER= <Actual Printer Name> ; export PRINTER

APPLORB

Windows Registry HKEY_LOCAL_MACHINE SOFTWARE ORACLE APPLICATIONS

APPLORB = r25run32

PRINTER

Windows Registry HKEY_LOCAL_MACHINE SOFTWARE ORACLE APPLICATIONS

PRINTER = default

Create or Locate a SRW Printer Definition File (UNIX Platforms Only)

Remember, the SRW driver is not a printer driver, but acts instead as a translator, telling the printer how to understand bolding, underlining, and the graphical characters that make up lines and boxes. There are SRW driver files that define both PostScript format translation and regular character printing. These drivers are used exclusively by Oracle Reports for formatting the report output file that is created initially as a flat ASCII text file, but that can be copied and edited as needed. The PostScript SRW driver needs to be defined for PostScript printing on UNIX because UNIX is still, X-Windows aside, a character mode platform. On Windows, oddly enough, the SRW driver is used for understanding the flat ASCII text reports.

The SRW driver files can usually be located in the $FND_TOP/reports directory. You can look for psport.prt for portrait, pls132.prt for landscape, and psl180.prt for landwide formatting. Notice that, with the exception of portrait, which is typically default format in most printing anyway, the number in the middle of the SRW driver name reflects the number of characters per line in the end print. Select the SRW driver that is compatible with both your printer and your specific report and make sure that you copy the driver into the appropriate $FND_TOP subdirectory.

Define a New Print Style

The next thing that you need to do when setting up a PostScript print report is to describe to the application the new way that this kind of job should print. The print style defines the SRW driver that is to be used and the layout area that defines the report's columns, rows, orientation (truly the orientation this time), and if the header information should be included or suppressed. The style defined should be very similar to the layout of the report as defined within the report.

The print style (as well as the print driver) contains a field for the respective SRW driver. The SRW driver that gets listed in the print style is the one that gets used when the report is not printing but only being created as an output file (copies=0). The SRW driver that gets used when the report is actually being created and sent directly to the printer (copies > 0) is the SRW driver that is listed in the print driver. Unless there is a pressing need for these two drivers to be different, they should be the same SRW driver in both places.

The steps required to define the print style are as follows:

  1. Navigate to Install/Printers/Styles form to create a new print style record definition in the database.

  2. Enter a new name for the new style and a user style name (the name that will appear in the LOV).

  3. Enter a sequence number for the new print style that allows for the organization of the displayed styles when a query for the styles is performed.

  4. Select a PostScript SRW driver appropriate for the printing style that you are choosing (portrait, landscape, or landwide). This step only needs to be performed on a UNIX platform.

  5. Complete the rest of the layout block with the same properties that are defined within the report.

A hint in defining custom driver names or custom styles, in the style or driver name, if you include the letters PS, your company name or company initials, and the paper orientation that you will be printing on, you will be better able to quickly identify the new style or the new driver. For example, you could define the new style as PS_MYCO_landwide.

Define (or Select) a Printer Type

If a printer driver defines how the job prints and the print style defines many other particular aspects of how the print job gets created and sent, what does a printer type define? A printer type is used to list every matched combination set of printer style and printer driver for a specific printer hardware type. Any single printer can only be registered as associated with exactly one type; however, there can be several printers that are defined as a particular type. If, after looking at the existing predefined types, you cannot find one that seems to be appropriate, you can define your own.

  1. Navigate to the Install/Printers/Type form

  2. Query the defined types to determine if one exists that will suffice and select any supporting style or drivers.

If an existing type is selected for your newly registered printer, do not ever alter the existing styles or driver entries. Other printers may be using these and making an alteration may cause something else to not function correctly. It is a much wiser choice to make additional styles and drivers that mimic these and use the newly defined ones.

Register the New Printer with Oracle Applications

The printer name that you register with Oracle Applications needs to be the same as the name that would be used if you were entering the print command at the command line prompt. On Windows platform, the network printer gets registered with the shared name making use of the Universal Naming Convention with the format \\ServerName\PrinterShareName. Further, the printer on Windows needs to be administrable by the owner of the Financials software.

To register the printer with Oracle E-Business Suite, follow these steps:

  1. Navigate to Install/Printers/Register form within the application.

  2. Enter a new database record in the form.

Register a Custom PostScript Report

This is another of the steps that are pretty much specific to the PostScript print format. Any custom report that is created for your applications installation should be placed under a custom top, built especially for this purpose.

Once you have registered the custom top, you will need to make a copy of the PostScript report definition (the report file that gets called into the application via the Reports Server). This reports definition needs to be placed into the %CUSTOM_TOP%\reports directory.

Define a Concurrent Program Executable

Chapter 12 — Concurrent Managers will explain how you can define the reports program within the Concurrent Programs forms within the application. The minimal explanation follows: Navigate to Concurrent/Program/Executable form and create a new Concurrent Program executable program for each custom report program that you have created. It is important that the report program be present within the custom top that you specify in the Application Field.

Define a Concurrent Program

For the Concurrent Manager to run the concurrent job, you will next have to create a Concurrent Program to perform the running of the report and the sending of the print job. For a PostScript job, the executable Options field needs to be defined with the value Version=2.0b and one of your PostScript printers and your PostScript style needs to be specified. The output format has to be PostScript for a PostScript job. Any time that you make changes to printers or to defined Concurrent Program records, the Internal Concurrent Manager will only recognize the changes after it has been verified on the Administer Concurrent Managers form and the Concurrent Manager has been cycled.

Add Custom Reports to a Report Group

Before you can get a custom report to print, before it can even be selected for printing, the new Concurrent Program has to be listed as a member of a report group. You can select the report group that is associated with the responsibility that will be permitted to submit the custom report and add the newly defined Concurrent Program. To do this, navigate to the Security/Responsibility/Request form, query up the correct request group, and add your new PostScript program to the request list.

Associate Custom Application with a Data Group

Have you decided yet why this creature that you are involved with is so complex and so large (in terms of disk space and number of components)? Before you can get a custom report to run to a successful completion, any schemas whose information will be accessed by the custom report must be listed within a data group. To do this, select the data group that is associated with the responsibility that will be permitted to submit the custom report and add any data groups whose elements will be included in the report output. To do this, navigate to the Security/Oracle/Data group form and query up the correct data group and add the application that is associated with your new PostScript report. This will have to be done with any custom report that you create, not just PostScript. Further, you have to make sure that the proper privileges have been granted to allow the report to run. The privileges need to be provided to the report through the data groups associated with the responsibility.

Things to Remember

There are several things to keep in mind when you are working through the process of defining printers. Checking these things a couple times will probably save significant time later on in your process. They are also things to recheck if you run into problems:

  • Defined printer does not support print style (particularly Post-Script).

  • Printer has not been configured at the OS level and is therefore not accessible from the command line. There could also have been changes at the OS level causing the printer to no longer be accessible from the command line.

  • If you are on UNIX, the print queue has to be defined as PostScript.

  • Environment variables are not set for printers.

  • Printer server drivers have to be accessible to the Concurrent Managers on Windows.

  • Remember, you have to select a PostScript SRW driver and that driver (or a copy of it) has to be located under the FND_TOP subdirectory.

  • If you are on UNIX, the uiprint.txt has to be updated and include the PPD required.

  • Use the same name for the printer when you register it with the application as it has at the OS level.

  • Someone accidentally modified the existing style and drivers (particularly something to make note of if the drivers or style have been defined for other printers as well).

  • PCL initialization and reset string have to be specified in the printer driver.

  • Concurrent Managers have to be bounced after any change to the printer settings.

  • The report has to be registered with the application.



 < Day Day Up > 



Oracle 11i E-Business Suite from the front lines
Oracle 11i E-Business Suite from the Front Lines
ISBN: 0849318610
EAN: 2147483647
Year: 2004
Pages: 122

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net