Asynchronous Delivery Requests Oracle Fusion Middleware Online Documentation Library

8-32 Developers Guide for Oracle Business Intelligence Publisher This is useful especially if you are trying to call IPP printers directly or IPP printers on Microsoft Internet Information Service IIS because those printers usually do not accept PDF documents, but only limited document formats. With this functionality, you can call any of the native operating system OS commands to transform the document to the format that the target printer can understand. For example, if you need to call the HP LaserJet printer setup on the Microsoft IIS from Linux, you can set Ghostscript as a filter to transform the PDF document into the format that the HP LaserJet can understand. Example 8–32 Sample Code for Setting Document Filter through OS Commands specify filter req.addPropertyDeliveryPropertyDefinitions.FILTER, gs -q -dNOPAUSE -dBATCH -sDEVICE=laserjet -sOutputFile={outfile} {infile}; Note that to use this functionality you must set the buffering mode must be enabled and a temporary directory must be specified. See Section 8.21, Configuration File Support.

8.16.1 PDF-to-PostScript Conversion Filter

In addition, BI Publisher provides a PDF-to-Postscript Level 2 conversion filter. You do not need to set {infile} and {outfile} place holders to use this internal filter, instead, directly specify the filter class as shown below: Example 8–33 Sample for Setting the PDF-to-Postscript Level 2 Conversion Filter req.addPropertyDeliveryPropertyDefinitions.FILTER, oracle.xdo.delivery.filter.PDF2PSFilterImpl; server name=printer1 type=ipp_printer default=true ipp:myserver:80printersMyPrinter1.printer filteroracle.xdo.delivery.filter.PDF2PSFilterImplfilter server

8.17 Date Expression Support

BI Publisher provides properties that support date expressions. Use date expressions if you want to name a file by the date, and have the date automatically set at run time. The following properties support date expressions: ■ SMTP_CONTENT_FILENAME ■ FTP_REMOTE_FILENAME ■ WEBDAV_REMOTE_FILENAME The supported date expressions are: ■ y : 4 digit year ex, 1972, 2005 ■ m : 2 digit month 00 - 12 ■ d : 2 digit date 00 - 31 ■ H : 24h based 2 digit hour 00 - 24 ■ M : 2 digit minute 00 - 59 Using the Delivery Manager Java APIs 8-33 ■ S : 2 digit sec 00 - 59 ■ l : 3 digit millisec 000 - 999 For example, if you specify my_file_ymd.txt for the filename, the actual filename will would be my_file_20051108.txt for November 8, 2005. All undefined expressions will be translated into 0 length string, for example, if you specify my_file_abc.txt, it would generate my_file_.txt. You can escape the character by passing .

8.18 Internationalization Support

The Delivery Server API supports following internationalization features for the listed delivery channels:

8.18.1 SMTP

■ Specify character encoding for the main document with SMTP_CONTENT_TYPE. ■ Specify character encoding for the attachments by passing content type when you call addAttachment method. ■ Specify the character encoding for email ToFromCCSubject with SMTP_ CHARACTER_ENCODING property. The default value is UTF-8.

8.18.2 IPP

■ Specify character encoding for the IPP attributes by using IPP_ATTRIBUTE_ CHARSET property. The default value is UTF-8. ■ Specify IPP_URL_CHARACTER_ENCODING property for encoding non-ASCII letters in a URL.

8.18.3 WebDAV

■ Specify WEBDAV_URL_CHARACTER_ENCODING property for encoding non-ASCII letters in a URL.

8.18.4 FTP

■ The FTP delivery channel automatically detects the internationalization support in the target FTP server. You can specify a non-ASCII directory name and file name only if the FTP server supports internationalization see RFC 2640 for more detail. In that case, the UTF-8 encoding will be used automatically. If the server does not support internationalization and you specify a non-ASCII value, an exception will be thrown during the delivery process.

8.18.5 HTTP

■ You can specify HTTP_CHARACTER_ENCODING property for encoding non-ASCII letters in a URL.

8.19 Setting Global Properties

You can define the global properties to the DeliveryManager so that all the delivery requests inherit the global properties automatically. The following global properties are supported: