Print API
Application Express
also has APIs available for printing documents. These APIs are apex_util.download_print_document
and apex_util.get_print_document
. Both Print APIs have four different signatures, which they allow for programmatically downloading report queries while dynamically associating stored report layouts at runtime, downloading report queries with custom templates stored in your own tables, and generating PDF based on your own custom XML by using your own custom templates.
APEX_UTIL_DOWNLOAD_PRINT_DOCUMENT
initiates download of a print document in four ways. Each has slightly different parameters (you can read more about these parameters at http://download.oracle.com/docs/cd/E23903_01/doc/doc.41/e21676/apex_util.htm).
The first option is to use XML-based report data and an RTF- or XSL-FO-based report layout:
APEX_UTIL.DOWNLOAD_PRINT_DOCUMENT (p_file_name IN VARCHAR,p_content_disposition IN VARCHAR,p_report_data IN BLOB,p_report_layout IN CLOB,p_report_layout_type IN VARCHAR2...