I’ve been doing some internal training on the ins and outs of BI Publisher to the folks here at STR Software and we’ve covered BIP Enterprise in some depth and have moved on to how BIP works in E-Business Suite with Bursting Control Files.
So in this process, we’ve talked about printing from BIP Enterprise and because all of our printers in the office are PostScript/PCL based printers, I’ve insisted that we need to convert the data from PDF to PostScript prior to printing. Luckily, BI Publisher Enterprise has a built in conversion utility to ensure that non-native PDF printers can print the document. To be honest, I had never really tried printing without it…
So, in preparation for some discussion on using the Bursting Control File in Oracle EBS to output to a printer, I mocked up a bursting control file to send the formatted data to a printer. The gotcha is that the syntax available in the bursting control file does not allow you to specify a filter to convert the PDF output to PostScript. An example bursting control file that goes to a printer is as follows:
Thinking that the print job would fail, I uploaded the bursting control file to my data definition and let it rip. To my surprise, the print job came out fine…
Knowing that we do not have PDF printers in house, I started doing some digging to figure out how it actually printed. In this case it was CUPS to the rescue. BI Publisher utilizes CUPS for all of it’s printing, or more specifically IPP which CUPS implements.
CUPS will auto-detect the ‘type’ of data being passed to it and if setup correctly will convert the data to a type that the printer can handle (in this case it detected that the data was PDF and it converted it to PostScript). To achieve this functionality, CUPS uses two configuration files:
/etc/cups/mime.types
/etc/cups/mime.conv
The mime.types file helps CUPS figure out the type of the incoming file using syntax that looks like the following:
application/pdf pdf string(0,%PDF)
This line essentially says, if the extension of the incoming file is “pdf” OR the first 4 letters of the data within the incoming file are “%PDF”, then the file is of type “application/pdf”
The mime.convs file tells CUPS which filtering process to use on a particular file type. For example:
application/pdf application/postscript 33 pdftops
This line says, if the incoming file is of type application/pdf and you want to convert it to application/postscript, use the filter pdftops. Note that pdftops is a common UNIX tool that comes with the Xpdf application as well as with CUPS out of the box (at least on my RedHat Linux install).
I’ll leave the specifics of these files up to the CUPS documentation.
So when printing from EBS utilizing the Bursting Control File or even printing from BI Publisher Enterprise, if you have the correct CUPS setup you do not need to worry about converting the PDF output to PostScript.
If you do run into the situation where you cannot get CUPS to work or your version of CUPS does not have this functionality, you can always still rely on BIP to do the work for you. As mentioned above, BIP Enterprise allows you to specify a filter when setting up a printer. Simply select it from the drop down list. For EBS and Bursting Control Files, while there is not a method to include the filter directly in the bursting control file, there is another way around it using the xdodelivery.cfg file.
Create a file named xdodelivery.cfg in $XDO_TOP/resource (note that this directory will not exist out of the box). An example of this file that has a conversion filter for my printer is as follows:
I can then reference this printer in my Bursting Control File by specifying the tag “server-alias” instead of the full blown ipp address. For example:
** Note that ‘pdftops’ is a binary that has actually been downloaded to my system. You may need to specify the full path.
Please see the section “Configuration File Support” in chapter 7 of the Oracle XML Publisher Administration and Developer’s Guide for more information on the xdodelivery.cfg file.
Now, the only thing I have not really covered here is printing BI Publisher PDF output directly from Oracle EBS without the use of bursting control files… i.e. print straight to an Oracle EBS defined printer. To do this, you need to utilize Oracle’s PASTA printing mechanism. I’m not going to go into too much detail here other than saying that there are TON of references on how to set this up out on the web, on Metalink and even in the Oracle EBS System Administrator’s Guide.
Hope this can help someone, I definitely learned something figuring all of this out.
Have a good New Years!