2024 Sep 13 8:33 AM - edited 2024 Sep 13 8:37 AM
Hi all,
I'm currently working on a SAPUI5 application that needs to display a PDF from the ABAP backend.
The OData Service is OK. Tests with Gateway Client are positive.
Just one point : I had to adapt the content-disposition to pass ‘inline’ instead of 'attachment' on ABAP system (SEGW)
>>> In order to display my PDF in the SAPUI5 application and no longer download it.
Now, I'm encountering another error in my SAPUI5 application
>>> FYI My SAPUI5 Version is "1.120.0"
The PDFViewer say "The PDF file could not be loaded."
And in the console I see the error message "Underlying iframe was not found in DOM."
My OData request is OK. The problem seems to be with my SAPUI5 application.
The code is relatively basic.
A PDFViewer on a view with setSource and setVisible, I also tried with Open method but same error.
I found the SAP Note https://me.sap.com/notes/3429273/E but the properties "isTrustedSource" does not seem to be available with my version of SAPUI5 ("1.120.0").
I also tested my application with SAPUI5 version"1.120.20" on SAP BAS, In this case, I receive the message "Download the file to view it".
>>> Downloading works well, but that's not the purpose of the application.
How can I display the PDF content directly in the application?
In my case, downloading is not an option ...
Thanks in advance for your help.
YouriC
Edge and Chrome are based on the same engine, in most cases it works in chrome and not in edge 🙂 . Nevertheless, how do you set the url for OData request in the pdfviewer? Do you use binding or do you set it via the controller?
I would also recommend to use the latest patch as you already tried.
Have you tried with another pdf?
Can you share a code snippet?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @WouterLemaire,
In the end, I tested on another computer with CHROME and there was no problem.
So the problem seemed to come from my own CHROME.
However, in my CHROME my settings were OK.
I've reset the "chrome://settings/content/pdfDocuments" and after that the problem was solved.
For the point with the IFrame I tried and it was OK but I wanted to do it with the PDFViewer.
I wanted to stay with something standard.
Thanks for your feedback 😉
YouriC
User | Count |
---|---|
66 | |
11 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.