Hello,
I am using the block PrintLayout\ScreenToPDF to create an invoice. How can I get the binary data of the generated PDF file? I want to save the file in the DB when I download the file.
Hello @Jeffrey Lai
You have to use PrintToPDF or PrintToPDF_Advanced actions they both give you the binary output you just need to give your invoice screen URL.
Thanks
Regards Gourav Shrivastava
Hi @Jeffrey Lai ,
I hope this below-mentioned forum reply will help you.
NOTE : Try to add the download widget in the action.
LINK : https://www.outsystems.com/forums/discussion/80466/download-binarydata-stored-in-db/
Hi @Dinesh murugan,
Thank you for reply. I know how to download a binary date as file from DB. My Question is how to get the PDF file (in Binary Data format) when I call the block PrintLayout\ScreenToPDF in Ultimate PDF.
The following is how I use the ScreenToPDF Block:
1. I Add the ScreenToPDF Block to a Screen.
2. When I redirect to that Screen, the ScreenToPDF block help me format the Screen and generate the PDF by some kind of API.
3. The PDF is generated by the API, and the file is downloaded automatically.
The output of the API is the binary data of the PDF file, but I don't know how to get it as output parameter.