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.