Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

SAPUI5 Print PDF

$
0
0

Hello Experts,

 

I am trying to do the print functionality in sapui5  through OData Service.

 

My service is giving the result , but in my screen its showing only Loading for a long time and not displaying anything.

 

Please check the below code and help me out.

 

var oButton = new sap.ui.commons.Button({

  id : 'B-Create',

  text : 'Display PDF',

  width : '10em',

  press : function(){

      var sRead = "/zpdfset('" + oTF.getValue() + "')" + "/$value" ;

    

      oModel.read( sRead, null, null, true, function(oData, oResponse){

  var pdfURL = oResponse.requestUri;

            

             html.setContent("<iframe src=" + pdfURL + " width='700' height='700'></iframe>");

  

             oPanel.addContent(html);

             oPanel.placeAt("content");

            

    

         },function(){

             alert("Read failed");});

 

  }

  });

 

Regards,

Vikash


Viewing all articles
Browse latest Browse all 6178

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>