Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Open PDF retrieved via odata service in SAPUI5

Hi all,

How can I show a PDF file retrieved via an ODATA service in to my SAPUI5 application?  I have looked for some controls or api's but I can not find one in the SAPUI5 labrary. Also can not find any good information on the internet.

Can someone tell me a solution?

Kind regards,


Former Member
Former Member replied

For our solution we had to display a PDF from the ADS, and therefore got this directly from a URL.

Therefore we used a HTML Object from the Core library, sorry did not ask with part of SAPUI5 you were using.

We then created a OBJECT or IFRAME tag inside this to display the PDF, and had that point at URL end point that returned just the PDF Object itself.

A quick example of this would be something like this, and then just add the oHTML Content to a Control like an Overlay or something like this.

//Create Place holder for the iFrame using a HTML Object
var oHTML = new sap.ui.core.HTML();

//Set the iFrame up to call the Form Controller passing in the Form Data so the
var oContent = '<iframe id="iframeContentPanel" ' + 'src="' + formData + '"width="100%" height=600px'"></iframe>';


It's not the complete answer, but hopefully will help.


1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question