Edit D:\app\Administrator\product\11.2.0\dbhome_1\apex\images\doc\AEAPI\apex_util049.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=us-ascii" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <title>GET_PRINT_DOCUMENT Function Signature 4</title> <meta name="generator" content="Oracle DARB XHTML Converter (Mode = ohj/ohw) - Version 5.1" /> <meta name="date" content="2009-04-14T17:32:16Z" /> <meta name="robots" content="noarchive" /> <meta name="doctitle" content="GET_PRINT_DOCUMENT Function Signature 4" /> <meta name="relnum" content="Release 3.2" /> <meta name="partnum" content="E12510-01" /> <link rel="copyright" href="../dcommon/html/cpyr.htm" title="Copyright" type="text/html" /> <link rel="stylesheet" href="../dcommon/css/blafdoc.css" title="Oracle BLAFDoc" type="text/css" /> <link rel="contents" href="toc.htm" title="Contents" type="text/html" /> <link rel="up" href="preface" title="Home" type="text/html" /> <link rel="up" href="apex_util.htm" title="APEX_UTIL" type="text/html" /> <link rel="up" href="apex_util049.htm" title="GET_PRINT_DOC..." type="text/html" /> <link rel="prev" href="apex_util048.htm" title="Previous" type="text/html" /> <link rel="next" href="apex_util050.htm" title="Next" type="text/html" /> </head> <body> <p id="BREADCRUMBING"><a href="preface" title="Home">Home</a> > <a href="apex_util.htm" title="APEX_UTIL">APEX_UTIL</a> > GET_PRINT_DOC...</p> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr valign="bottom"> <td align="left"></td> <td align="center"><a href="apex_util048.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_util050.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> <p><a id="CHDCABJF" name="CHDCABJF"></a></p> <hr /> <div class="refsect1"> <h1><a name="AEAPI146" id="AEAPI146"></a>GET_PRINT_DOCUMENT <a id="sthref261" name="sthref261"></a>Function Signature 4</h1> <p>This function returns a document as <code>BLOB</code> using XML based report data and RTF or XSL-FO based report layout.</p> <a id="sthref262" name="sthref262"></a> <p class="subhead2">Syntax</p> <pre xml:space="preserve" class="oac_no_warn"> APEX_UTIL.GET_PRINT_DOCUMENT ( p_report_data IN CLOB, p_report_layout IN CLOB, p_report_layout_type IN VARCHAR2 default 'xsl-fo', p_document_format IN VARCHAR2 default 'pdf', p_print_server IN VARCHAR2 default NULL) RETURN BLOB; </pre> <a id="sthref263" name="sthref263"></a> <p class="subhead2">Parameters</p> <p><a href="#CHDEFFAD">Table: GET_PRINT_DOCUMENT Parameters</a> describes the parameters available in the <code>GET_PRINT_DOCUMENT</code> function. for Signature 4</p> <div class="tblformal"><a id="sthref264" name="sthref264"></a><a id="CHDEFFAD" name="CHDEFFAD"></a> <p class="titleintable">GET_PRINT_DOCUMENT Parameters</p> <table class="Formal" title="GET_PRINT_DOCUMENT Parameters" summary="This table describes the parameters available in the GET_PRINT_DOCUMENT." dir="ltr" border="1" width="100%" frame="hsides" rules="groups" cellpadding="3" cellspacing="0"> <col width="31%" /> <col width="*" /> <thead> <tr align="left" valign="top"> <th align="left" valign="bottom" id="r1c1-t73">Parameter</th> <th align="left" valign="bottom" id="r1c2-t73">Description</th> </tr> </thead> <tbody> <tr align="left" valign="top"> <td align="left" id="r2c1-t73" headers="r1c1-t73"> <p><code>p_report_data</code></p> </td> <td align="left" headers="r2c1-t73 r1c2-t73"> <p>XML based report data, must be encoded in UTF-8</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r3c1-t73" headers="r1c1-t73"> <p><code>p_report_layout</code></p> </td> <td align="left" headers="r3c1-t73 r1c2-t73"> <p>Report layout in XSL-FO or RTF format</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r4c1-t73" headers="r1c1-t73"> <p><code>p_report_layout_type</code></p> </td> <td align="left" headers="r4c1-t73 r1c2-t73"> <p>Defines the report layout type, that is "xsl-fo" or "rtf"</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r5c1-t73" headers="r1c1-t73"> <p><code>p_document_format</code></p> </td> <td align="left" headers="r5c1-t73 r1c2-t73"> <p>Defines the document format, that is "pdf", "rtf", "xls", "htm", or "xml"</p> </td> </tr> <tr align="left" valign="top"> <td align="left" id="r6c1-t73" headers="r1c1-t73"> <p><code>p_print_server</code></p> </td> <td align="left" headers="r6c1-t73 r1c2-t73"> <p>URL of the print server. If not specified, the print server will be derived from preferences</p> </td> </tr> </tbody> </table> <br /></div> <!-- class="tblformal" --> <a id="sthref265" name="sthref265"></a> <p class="subhead2">Example for Signature 4</p> <p>The following example shows how to use the <code>GET_PRINT_DOCUMENT</code> using Signature 4 (Document returns as a BLOB using XML based report data and RTF or XSL-FO based report layout). In this example, <code>GET_PRINT_DOCUMENT</code> is used in conjunction with <code>APEX_MAIL</code>.<code>SEND</code> and <code>APEX_MAIL.ADD_ATTACHMENT</code> to send an email with an attachment of the file returned by <code>GET_PRINT_DOCUMENT</code>. Both the report data and layout are taken from values stored in page items (<code>P1_XML</code> and <code>P1_XSL</code>).</p> <pre xml:space="preserve" class="oac_no_warn"> DECLARE l_id number; l_document BLOB; BEGIN l_document := APEX_UTIL.GET_PRINT_DOCUMENT ( p_report_data => :P1_XML, p_report_layout => :P1_XSL, p_report_layout_type => 'xsl-fo', p_document_format => 'pdf'); l_id := APEX_MAIL.SEND( p_to => :P35_MAIL_TO, p_from => 'noreplies@somewhere.com', p_subj => 'sending PDF via print API', p_body => 'Please review the attachment.', p_body_html => 'Please review the attachment'); APEX_MAIL.ADD_ATTACHMENT ( p_mail_id => l_id, p_attachment => l_document, p_filename => 'mydocument.pdf', p_mime_type => 'application/pdf'); END; </pre></div> <!-- class="refsect1" --> <!-- Start Footer --> <div class="footer"> <table class="simple oac_no_warn" summary="" cellspacing="0" cellpadding="0" width="100%"> <col width="86%" /> <col width="*" /> <tr> <td align="left"><span class="copyrightlogo">Copyright © 2003, 2009, Oracle and/or its affiliates. All rights reserved.</span><br /> <a href="../dcommon/html/cpyr.htm"><span class="copyrightlogo">Legal Notices</span></a></td> <td align="center"><a href="apex_util048.htm"><img src="../dcommon/gifs/leftnav.gif" alt="Previous" /><br /> <span class="icon">Previous</span></a> </td> <td align="center"><a href="apex_util050.htm"><img src="../dcommon/gifs/rightnav.gif" alt="Next" /><br /> <span class="icon">Next</span></a></td> </tr> </table> </div> <!-- class="footer" --> </body> </html>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de