[FR] PDF Preview
Initial Checklist
- [x] I understand this is a feature request and questions should be posted in the Community Discussions
- [x] I searched issues and couldn’t find anything (or linked relevant results below)
User Story
As a user, I want the Web UI to support rich previews of PDF files so that I can easily view documents and reports directly without downloading them.
User Value
- Quickly preview PDF documents directly in the browser
- Enhance overall usability for teams working with reports, invoices, and multi-page documents
Acceptance Criteria
- Web UI shows an inline preview (thumbnail) of PDF files
- Clicking a PDF opens a full-size, scrollable and zoomable preview viewer
original request
It would be great to have PDF previews, especially now that we have tiles view on every page. Seeing a quick preview without opening the file would make browsing much faster and more convenient.
PDFs can also embed Javascript code, so basically https://github.com/opencloud-eu/opencloud/issues/1465#issuecomment-3265268120 does apply here as well.
cc @db-ot @tbsbdr
needs backend support
Needs security concept.
We need to check how the libvips is built within our image. It can be built with different PDF readers, which can be configured to not load Javascript.
Example: If our libvips is built with pdfium, it needs to be verified that the version of pdfium is built with option pdf_enable_v8 = false # Set false to remove Javascript support..
If somebody points me to the build instructions for our libvips that we use, I am happy to check that.
Back in the days, distributions were making sure that dependencies were secure. That was great.
Our images are alpine based currently. I don't know much about alpine package building, but I suppose this is spec file equivalent for libvips on alpine: https://gitlab.alpinelinux.org/alpine/aports/-/blob/master/community/vips/APKBUILD
IIUC it's using poppler for PDF support.