Hi Augusto,
the examples you are refering to concern loading files from the file system. That was not the question. How can we load stream content into the PdfViewer contro from sapui5?
Thanks
Hi,
I got the same issue and, in my case, it was because I didn't specify any HTTP Header parameters in my backend method GET_STREAM.
So the default behaviour was to download directly the file rather than display it in sap.m.PDFViewer.
It was solved by adding this ABAP code in method GET_STREAM:
DATA http_header TYPE ihttpnvp.
http_header-name = 'Content-Disposition'.
http_header-value = 'inline; filename="MyPDF.pdf";'.
set_header( is_header = http_header ).
Max
Hi Juan
You can find 3 examples of PDF Viewer on this link: https://sapui5.hana.ondemand.com/#/entity/sap.m.PDFViewer
For all the examples, you can see and download the code. Just click on the example and then there will be a button on the top right "show source code for this example".
Regards,
Auguso
Add comment