Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 

We will learn how to display a PDF file in sap UI5 application.


We can display PDF in SAP UI5 application using "sap.m.PDFViewer".

But this control is available after UI5 version 1.48. If you are using SAP UI5 version previous to that then you have to follow below procedure.

We can display PDF in SAP UI5 application using "iframe". But “iframe” is not any control in SAP UI5 library so we have to call it from HTML tag.

Put below code as your View1.xml file.
<mvc:View controllerName="Display_PDF.controller.View1" xmlns:html="" xmlns:mvc="sap.ui.core.mvc" xmlns:core="sap.ui.core"
displayBlock="true" xmlns="sap.m">
<Page title="Display PDF">
<core:HTML id="idFrame"/>

Put below code as your View1.controller.js file.
], function(Controller) {
"use strict";

return Controller.extend("Display_PDF.controller.View1", {
onInit: function() {

var oHtml = this.getView().byId("idFrame");
oHtml.setContent("<iframe src='' height='700' width='1300'></iframe>");


Output :

Labels in this area