How to pop up a PDF?
ChrisLaffra 060000KCEQ Comments (3) Visits (4120)
Many business applications rely on advanced reporting tools such as BIRT to create things like a business report, a receipt, or a barcode. For practical purposes the output often is in PDF. Now, how to download the PDF and show it to your customer? It appears to be quite easy with EGL Rich UI.
Observe the following RUIHandler:
It has a button, and a hidden iframe. When the button is pressed, we set the "src" attribute of the hidden iframe to the URL of the PDF document we prepared using BIRT. When the browser fills the document inside the iframe with the PDF, its default behavior is to download the document, as its document type is not equal to "text/html".
When the user presses the button, the following dialog shows in the browser: