Skip to content

[FR] PDF Preview #1646

Open

Description

@AlexAndBear

Initial Checklist

  • I understand this is a feature request and questions should be posted in the Community Discussions
  • 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.

Activity

  1. rhafer commented on Oct 14, 2025

    @rhafer
    Member

    PDFs can also embed Javascript code, so basically #1465 (comment) does apply here as well.

    cc @db-ot @tbsbdr

  2. changed the title [-]PDF previews[/-] [+][FR] PDF previews[/+] on Oct 14, 2025
  3. db-ot commented on Oct 14, 2025

    @db-ot

    needs backend support

  4. moved this from Unqualified to Blocked in Roadmapon Oct 14, 2025
  5. moved this from Qualification to Todo in OpenCloud Team Boardon Oct 14, 2025
  6. moved this from Todo to Backlog in OpenCloud Team Boardon Oct 14, 2025
  7. micbar commented on Oct 14, 2025

    @micbar
    Member

    Needs security concept.

  8. dragotin commented on Oct 14, 2025

    @dragotin
    Member

    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.

  9. rhafer commented on Oct 14, 2025

    @rhafer
    Member

    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.

  10. added theissue type on Oct 16, 2025
  11. changed the title [-][FR] PDF previews[/-] [+][FR] PDF Preview[/+] on Nov 3, 2025
  12. removed this from Roadmapon Mar 3, 2026
  13. tbsbdr commented on Jun 30, 2026

    @tbsbdr
    Member

    PB

  14. kulmann commented on Jun 30, 2026

    @kulmann
    Member

    PB

    Yes, please include me, we should discuss this again.

  15. micbar commented on Jul 20, 2026

    @micbar
    Member

    Technical additions

    Libvips supports two pdf rendering backends

    Poppler (via poppler-glib) — the most common backend in distro packages. GPL-licensed, which is why some binary distributions avoid it. Loaded via vips pdfload, and you can pick pages (page, n parameters) and set render DPI or scale.

    PDFium — Google's PDF engine from Chromium. Faster and generally considered more robust against malformed input, but it's not in most distro builds because PDFium doesn't ship as a normal system library; you typically have to build libvips against a prebuilt PDFium yourself. If both are present at build time, libvips prefers PDFium.

    In some cases, where imagemagic is installed, it cann fall back to that via ghostscript.

    Security

    • Poppler has a long CVE history: heap overflows, use-after-free, infinite loops, and OOM conditions from crafted PDFs. Most are DoS-grade, but memory-corruption bugs with code-execution potential appear regularly. You're only as safe as your distro's patch cadence.
    • PDFium also gets CVEs, but it's fuzzed continuously by Google as part of Chrome and is generally hardened faster.
    • The Ghostscript fallback path is the worst case. Ghostscript has had multiple sandbox-escape RCEs (e.g., the -dSAFER bypasses, CVE-2023-36664, the 2024 format-string RCE CVE-2024-29510). If your libvips is routing PDFs through ImageMagick→Ghostscript without your knowledge, that's worth fixing explicitly. Check ImageMagick's policy.xml — many distros now disable PDF coders there for exactly this reason.
    • Resource exhaustion is the everyday risk even without a code-exec bug: decompression bombs, pathological page geometries, or PDFs that render at huge dimensions. libvips lets you cap this (VIPS_MAX_MEM, checking page dimensions before rendering, limiting dpi).
  16. tbsbdr commented on Jul 21, 2026

    @tbsbdr
    Member

    PDF preview: using a dedicated imagor container could be an option as described here by @butonic #1128

  17. guruz commented on Oct 15, 2026

    @guruz

    Just a wild idea, please don't take it too serious: What if users/clientds crowdsource the preview images?
    When they open it inside client app or browser, a snapshot of first page is taken and somehow associated (uploaded) then server side with the file and can be re-downloaded by other clients/browsers?

  18. dschmidt commented on Oct 15, 2026

    @dschmidt
    Contributor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions