SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.94k stars 1.23k forks source link

PDFViewer does not show PDF content anymore #3974

Closed pietromodi closed 6 months ago

pietromodi commented 6 months ago

OpenUI5 version: latest 1.84 (1.84.42) / latest 120 (on DemoKit)

Browser/version (+device/version): Tested on Chrome 121 (121.0.6167.161)

Any other tested browsers/devices(OK/FAIL): No other tests done

Steps to reproduce the problem:

  1. Open a view with a PDFViewer linked to a valid PDF from a Desktop/Tablet browser

What is the expected result? The PDF content is shown in the viewer content area

What happens instead? No PDF content is shown

Any other information? (attach screenshot if possible) https://sapui5.hana.ondemand.com/sdk/#/entity/sap.m.PDFViewer/sample/sap.m.sample.PDFViewerEmbedded

Istantanea 2024-02-15_17-06

Custom application with 1.84.31 (works OK, shows an invalid PDF message)

Istantanea 2024-02-15_17-09

Custom application with 1.84 evergreen alias 1.84.42 (does not work, content area not shown)

Istantanea 2024-02-15_17-10
edemuck4timbuktu commented 6 months ago

Hi, I face the same issue. Also happend with OpenUI5 Version 1.108.25. With the version 1.108.24 there is no problem. With the newest version of 1.114 there is also no problem.

edemuck4timbuktu commented 6 months ago

@pietromodi With the value true of the sap.m.PDFViewer property "isTrustedSource" the issue is fixed. Tested with SAPUI5 Version 1.108.28 (newest).

k-shalini commented 6 months ago

In case you do not see the PDF in embedded mode, you may use the Download button on the right to download the PDF and display it.

If you are using a custom built app, it needs to be adapted accordingly:

You must update the application and set property isTrustedSource = true in order to display the PDF’s. If you leave it as is (false), then you can use the Download button on the right to open the PDF.

Best regards, Shalini (PO - Suite controls)