Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Please ask technical questions in the appropriate category. Thank you!

APEX_UTIL.GET_PRINT_DOCUMENT generate an XML output instead of PDF

Alexis B2 days ago

Hi everyone

I have an APEX Report Query based on a XSL-FO layout
When calling the URL it works well and I get a PDF as expected
Now I would like to store this PDF into a BLOB in DB
I tried to use APEX_UTIL.GET_PRINT_DOCUMENT function :

l_report := apex_util.get_print_document (
p_application_id => :APP_ID,
p_report_query_name => 'edition_commande',
p_report_layout_name => 'Edition_Cde',
p_report_layout_type => 'xsl-fo',
p_document_format => 'pdf' );

insert into table_blob(report_blob)
values(l_report);

But my result is a corrupted PDF
When opening the PDF with notepad, I get an XML file (looks like an xsl-fo file I think)

I tried to change the below line
p_report_layout_type => 'xsl-fo',
to
p_report_layout_type => 'pdf',
But I still get same result

Does anyone get an idea why I didn't get a PDF, like when I call the URL ?
Thanks

Best regards,

Comments
Post Details
Added 2 days ago
22 comments
143 views