Skip to Main Content

Application Development Software

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!

How to convert file stream fetched using GET_FILE to downloadable PDF

Dinesh BJun 12 2018 — edited Jun 15 2018

Hello Experts ,

We are using WCC 11g in our solution and RIDC API's to store & retrieve files from WCC DB. We have a use case where we need to fetch an encrypted file using GET_FILE service, perform decryption and present it to end user on one click.

In order to achieve the same, we have created a custom wrapper service which on execution will fetch encrypted file from WCC using GET_FILE, decrypt it and generate file stream in java.The problem we are facing is with conversion of file stream into downloable PDF. I know this is not purely a WCC question but based on experience or past work if anyone can guide on conversion of file stream to downloadable PDF ?

We saw few threads with below option -

   response.setContentType("application/zip");

    response.setHeader("Content-Disposition", "attachment; filename=\"File.zip\"");

    ServletOutputStream outStream = response.getOutputStream();

    outStream.write(decodedBytes);

But we are not able to set header in our service response object.

Note: TDE option for encryption has been tried already and ruled out.

Thanks in advance

Regards,

DInesh

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 13 2018
Added on Jun 12 2018
5 comments
376 views