Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Convert Clob With Binary Data to Blob

Edwin TJun 2 2016 — edited Jun 3 2016

I'm using an API to generate a PDF using APEX_WEB_SERVICE.MAKE_REST_REQUEST. The response is a stream of the binary data. I've attempted to convert that to a blob since make_rest_request only returns clobs. The printed  response looks something like this:

%PDF-1.4

%äüöß

2 0 obj

<</Length 3 0 R/Filter/FlateDecode>>

stream

x�Խͮ#Irn;ϧก*E��� �H�~ � ....

When I convert the clob to a blob and save it in a table,  the pdf opens with no content, just a blank rendering.

Is there a way around this. I am on Oracle Cloud  Schema Service, so I do not have access to a local drive or any of the custom pdf generation packages generally found in APEX.  Is there a tool we can use  in pl/sql or Javascript  or even a Browser Plugin we can pass the streamed binary data  from the clob so that we can render the PDF for printing. We would prefer not to save the PDF's  in our database tables if at all possible.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 1 2016
Added on Jun 2 2016
5 comments
2,565 views