Showing results for 
Search instead for 
Did you mean: 

Problems when opening a PDF in my SAPUI5 app

0 Kudos

Hello Experts, good day.

I have the following doubt.

We are using PDFViewer to be able to view a PDF document in a fiori app.

The problem is that when we call it, PDFViewer does not show the PDF and immediately afterward, it opens a window to download the file.



Do you know why this is happening?

This is the code I use for the PDFViewer.



                var sServiceURL = ".../ZFI_LIBRO_INV_PDF_SRV";
                var sSource = sServiceURL + "/pdfSet('" + sociedad + "," +  ejercicio + "," + perContable + "," + ledger + "," + A4Digitos +"')/$value";

                    var opdfViewer = new PDFViewer({
                        loaded: function (oEvent) {
                     }, error: function (oError) {                            
                     }, sourceValidationFailed: function (oEvent) {
                     } });
                     opdfViewer.setTitle("Libro Inventario");



Could it be how the PDF was created in Odata that is causing this? Or is it some particular issue about how my call was made?

Any help is welcome.

And I can't tell you how the Odata was made or so, since I don't have access to that part of the Project due to permissions issues.

Thanks so much for reading



View Entire Topic
0 Kudos

Hi Edson,
Please check the below note. 

PDFViewer Note