1.0 KiB
1.0 KiB
49. View one-by-one PDF in Dart side in only Web app
Date: 2024-05-17
Status
Accepted
Context
- In EmailView when the user clicks on an attachment, we should display a PDF viewer for the user.
- In PDF Viewer users can view full pages of the PDF file and can download or print it.
Decision
- Create PDF Viewer with pdf_render
- Viewer will stay overlay in web app tab
- Actions supported:
Download,Print,Zoom In/Out,Show current/total pagesin viewer
Consequences
- PDF viewer works well on all browsers (Chrome/Firefox/Edge/Safari/Opera)
Improvement
Print name: Some browsers (Firefox/Safari/Edge) use a random name to name the file when printing.Jump to page: When using the standard size of PDF pages to display in the viewer, thejumpToPagemethod ofpdf_renderdoes not work correctly. So we will temporarily disable it.Drag the scrollbar: Currently the pdf page is displayed in anInteractive viewerso does not interact with theScrollbar