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!

Dynamic loading of PDFs from a database table

Robin_SAug 3 2018 — edited Aug 3 2018

Hello everybody,

I hope that someone can help me with my problem, because I'm out of ideas.

In short, I've a customer who want to store PDFs in a database table and if he clicks on a button in an interactiv report, apex should show him the associated PDF.

The table where I'm storing the PDFs looks like this:

DOCUMENTS

DOCU_ID                      NUMBER(PK),

DOCU_ZEBE_ID           NUMBER(FK),

DOCU_NAME               VARCHAR2(2000),

DOCU_MIMETYPE       CLOB,

DOCU_BLOB                BLOB,

DOCU_CREATED_ON  DATE

To upload the files I'm using the plug-in DropZone: https://github.com/Dani3lSun/apex-plugin-dropzone

Up to this point everything works and now my problem starts.

My customer wants two pages: one normal page and one modal dialog.

On the normal page he wants, beside a lot of other stuff, two regions:

One interactive report: SELECT DOCU_ID       as Button,

                                                   DOCU_NAME as Filename

                                       FROM DOCUMENTS

                                     WHERE DOCU_ZEBE_ID = :P4_ZEBE_ID;

And another region where a small preview of the PDF shows up, if he clicks on the associated button. (The PDF should change every time he clicks on another button.)

In conclusion if he clicks on the preview the modal dialog should open, where he can see the the PDF in big.

And my problem is, that I have no idea, how to get the PDFs out of the table in the region and that the PDF will change if I click on a button.

I've found the plug-in PDFRenderer: https://github.com/java4less/ApexPDFRenderer, but I didn't manage that it works.

So if someone has an idea, how I can solve my problem, I'm thankful for everything.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 31 2018
Added on Aug 3 2018
0 comments
257 views