Hi all,
I was doing some trials with the "PDF Generator Web - Demo" and I have to say it is working great!! :)
Can you tell me, if it is possible to store the generated PDF into an oracle database
table instead of downloading it?
There is a function called "PDFGetData" - is it possible to get the data from the
"generated PDF" for to store this output as data in a relational database like oracle (as bfile or blob)?
Explanation for my question:
I want to generate the pdf in the app with "PDF Generator" without giving the user the possibility to
download and save the PDF on the client.
Instead I want to store it in oracle - behind the scenes- and only give the user a BUTTON
for to send it as a file (via machine file transfer) to another application (interface) with an automation.
Thank you in advance
Christine
Hi Christine C ,
The output as you said is text ( Base64Data) in the sample there is an action Base64toBinary to convert Textbase64 to binary as you can see
use this Base64toBinary.Binary which is binary output to save in your entity , with a binary field.
Hope that it helps you
Hi Alexandre,
THANK YOU VERY MUCH :)
This is exactly what I meant - I definitely have overseen these provided dataconversion-functions!
I just looked for functions - but since they are client actions I did not recognize them
But know that I had the name from you hint - I found them.
Thank you again! You made my day :)
regards
Hi Christine C,
Thanks for your feedback and if helped you set the post as solved
Regards,
Instead of downloading the binary retrieved by the PDF generator you can save this binary instead directly into the database.
Are you using Outsystems with Oracle? If so just save the binary content into a table entity
thank you very much for your reply!
Yes - I am using OutSystems with a separate oracle instance for to store the data
for and from the application.
Can you give me please a hint how to store the generated PDF into the database?
The function "PDFGetData" has an output - but this is Datatype TEXT.
What I need is datatype "Binary Data" for to store it into the database table.
For example: In parallel I tested with MsWordUtils (another forge component) for to generate a
word document - this component has a function "MSWord_GenerateDocument" with an
output as datatype binary data which could be stored via the in outsystems automatically created
CRUD-Method easily.
Maybe you have an idea for me how to get the (generated) PDF as storable data?
Thank you very much in advance :)
regards, Christine