cancel
Showing results for 
Search instead for 
Did you mean: 

Display PDF in My Inbox from DMS

andreeavoicu
Discoverer

I am trying to display a PDF from Document Management System using PDFViewer.

The PDF file is succesfully retrieved from DMS, but it cannot be previewed in the app and I get "PDF file could not be displayed."

  • I get "Error: Underlying iframe was not found in DOM. - " and the following :

  • I tried adding in index.html :
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; frame-src * blob:;">
  • The domain is added in "iframeDomains" and in Trusted Domain in BTP.

  • Also used URLWhitelist :

What could be causing this issue?

View Entire Topic
VoJu
Participant

Please look at SAP Note: https://me.sap.com/notes/0003429273 

I had the same issue and by setting isTrustedSource = true it was resolved.

The behavior of sap.m.PDFviewer has been enhanced by adding the property isTrustedSource. It can be used by the app developers to set the desired display behaviour for the PDFViewer.

The behaviour of the property is as follows:

  • If isTrustedSource is set to true, the PDFViewer opens with the displayType set to "Embedded" on desktop devices, which means that the PDF content is directly shown within the PDFViewer. (Recommended: Set this property to true only when the PDF is generated by the application or the PDF is scanned for viruses.)
  • If isTrustedSource is set to false, the PDFViewer opens with the displayType set to "Link" on desktop devices, which overrides any configuration that has been provided by the application for the property displayType. This means that the PDFViewer appears as a toolbar with a download button.


 

bopana
Explorer
0 Kudos
Thank you for showing me this note !