SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.51k stars 263 forks source link

[Feature Request]: Fiori PDF Viewer #7770

Open gitgdako opened 11 months ago

gitgdako commented 11 months ago

Feature Request Description

Fiori defines a PDF Viewer https://experience.sap.com/fiori-design-web/pdf-viewer/ which is also implemented in the reference implementation https://ui5.sap.com//#/entity/sap.m.PDFViewer

We would like to use this component in UI5 React as we had to implement quite some styling hacks to use an IFrame in an object page

Proposed Solution

Implement as per Fiori Spec

Proposed Alternatives

No response

Organization

No response

Additional Context

No response

Priority

Medium

Privacy Policy

TeodorTaushanov commented 11 months ago

Hello @SAP/ui5-webcomponents-topic-core, take a look of this feature request.

nnaydenow commented 8 months ago

Hi @gitgdako,

Could you please share what kind of hacks you had to use and what problems you've faced?

I prepared a snippix and doesn't look hard to be achieved. https://codesandbox.io/s/interesting-sun-46tkkz?file=/src/App.js

We would like to hear your what problems you've faces so we can determine how to with the processing of the issue.

Thanks in advance!

github-actions[bot] commented 2 months ago

Hello, everyone! The issue has been inactive for 21 days. If there are still questions or comments, please feel free to continue the discussion. Inactive issues will be closed after 7 days!

gitgdako commented 2 months ago

Hi. We are rendering an IFrame with position: 'absolute', top: '0', left: '0', width: '99%', height: '99%',

wrapped in a div with height: '100%', overflow: 'hidden', position: 'relative'"

The ObjectPage itself is wrapped in a div with height: 'calc(100vh - var(--fdShellbar_Height))'

I am sure that this is the sum of things we needed to do to have the pdf viewer of the browser render all the way to the bottom without having a second scrollbar, which, as you can see, was a bit tricky to achieve