Hi,
I have created the SAP UI 5 which is pulling the data from XSEngine. I have done 'Export To Excel' from SAP UI to export the data which is loading from XSEngine Service. I have been trying to 'Export To PDF' like the way I did for 'Export To Excel', it is not working. I am getting the below when It is opened as a PDF.
Export To Excel - SAP UI 5 code - This is working fine
function createDownloadLink(b64text) { var oLink = new sap.ui.commons.Link("linkExportCsv", { text: 'Export To Excel', href: 'data:application/csv;charset=utf-8;base64,' + (Base64.encode(b64text)) }); initDownloadAttr('FileName-Example.csv'); return oLink;}
Export To PDF: This is not working
function createDownloadLinkPdf(b64text) {
var oLink = new sap.ui.commons.Link("linkExportPdf", {
text: 'Export To Pdf',
href: 'data:application/pdf;base64,' + (Base64.encode(b64text))
});
initDownloadAttrPdf('FileName-Example.pdf');
return oLink;
}