Plugins

PDF Quick Viewer

Previews PDF documents.

Version 1.0.4 Official plugin Released 48 downloads

Install it from Commander: Plugins → Manage, or drop the signed bundle into the plugins/ directory.

What this bundle provides

One download, 1 plugin.

PDF Quick Viewer

dev.nuclr.plugin.core.quickviewer.pdf

A quick viewer for PDF files.

QuickView Apache-2.0

About

📄 PDF Quick Viewer

A Nuclr Commander plugin that renders PDF files directly in the quick-view panel. Press Ctrl+Q on any .pdf file to preview it without leaving the file manager.


🖼️ Preview

PDF Quick Viewer screenshot


✨ Features

  • Page-accurate rendering — every page is rasterized to a crisp RGB image via Apache PDFBox
  • Page navigation — move between pages with on-screen buttons, keyboard shortcuts, or a direct page-number jump
  • Zoom & pan — Ctrl+scroll zooms with the page point under the cursor anchored; drag to pan when zoomed. Zoom and pan reset on every page change
  • Info overlay — semi-transparent HUD showing title, author, page count, PDF version, and render DPI
  • LRU page cache — recently viewed pages are kept in memory so navigation feels instant
  • Cancellation-aware — switching files mid-render immediately aborts the in-flight job; no stale frames ever reach the UI
  • Encrypted PDF handling — password-protected files display a clear message instead of crashing
  • JBIG2 support — bundled jbig2-imageio allows PDFBox to render scanned PDFs that use JBIG2-compressed images
  • Optional CLI backends — can delegate rendering to MuPDF, Poppler, or Ghostscript when installed; falls back to PDFBox automatically on any failure
  • Persistent settings — DPI, overlay toggle, and backend choice survive restarts

⌨️ Keyboard Shortcuts

KeyAction
← / ↑ / Page UpPrevious page
→ / ↓ / Page DownNext page
HomeFirst page
EndLast page
Ctrl+GPrompt for a page number and jump within the valid range
Ctrl + scrollZoom in / out
Mouse dragPan (only when zoomed in)

The quick-view panel must have focus for keyboard shortcuts to work. Click the panel or press Ctrl+Q to focus it.


⚙️ Settings

Settings are stored as a plain .properties file in the platform config directory:

PlatformPath
Windows%APPDATA%\nuclr\pdf-quick-viewer.properties
macOS~/Library/Application Support/nuclr/pdf-quick-viewer.properties
Linux$XDG_CONFIG_HOME/nuclr/pdf-quick-viewer.properties (or ~/.config/nuclr/)
KeyDefaultDescription
pdf.quickView.dpi144Render resolution. Range: 36–200.
pdf.quickView.cachePages10Maximum rendered pages in the LRU cache.
pdf.quickView.showInfoOverlaytrueShow the semi-transparent info panel.
pdf.quickView.backendPDFBOXRendering backend (see table below).

🔌 Backends

ValueDescription
PDFBOXApache PDFBox — pure Java, always available. Recommended.
AUTOTry CLI tools in order (MuPDF → Poppler → Ghostscript); fall back to PDFBox.
CLI_MuToolMuPDF mutool draw. Requires mutool on PATH.
CLI_POPPLERPoppler pdftocairo or pdftoppm. Requires Poppler on PATH.
CLI_GSGhostscript gs. Requires Ghostscript on PATH.

🖼️ Thumbnail

The first page, rendered by PDFBox at the scale that fits the box, honouring page rotation. It is always PDFBox, whichever backend the panel uses, and a document of its own, so a thumbnail never touches the PDF on screen. An encrypted PDF has no thumbnail.

It implements the platform SDK 6.0.0 thumbnail methods, so plugins that want a picture of a file - attachment chips in AI Projects, for one - get it through Commander.

📥 Installation

Copy the signed plugin archive and detached signature into the Nuclr Commander plugins/ directory:

quick-view-pdf-<version>.zip
quick-view-pdf-<version>.zip.sig

Nuclr Commander verifies the RSA-SHA256 signature against nuclr-cert.pem on load. The plugin becomes available immediately without a restart.


🧱 Architecture

PdfQuickViewProvider          implements QuickViewNuclrPlugin
└── PdfQuickViewPanel         Swing JPanel — all state is EDT-only
    └── PdfRenderService      virtual-thread orchestrator
        ├── PdfPageCache      thread-safe LRU (LinkedHashMap, access-order)
        ├── PdfSettings       singleton — java.util.Properties persistence
        └── backend/
            ├── PdfRenderBackend   strategy interface
            ├── PdfboxBackend      Apache PDFBox 3.x (default)
            └── CliBackend         MuPDF / Poppler / Ghostscript

🧵 Threading model

  • EDT — UI state reads/writes, Swing repaints, button callbacks
  • Virtual threads (Thread.ofVirtual()) — byte reading, document opening, page rendering
  • Cancellation — a monotonic AtomicLong epoch is incremented on every new request; stale results are silently discarded
  • Backend lock — a ReentrantLock serializes openDocument and renderPage to prevent concurrent access to a non-thread-safe PDFRenderer

📚 Dependencies

LibraryVersionPurpose
dev.nuclr:platform-sdk6.0.0Nuclr platform interfaces
pdfbox3.0.7PDF rendering (Apache PDFBox)
pdfbox-io3.0.7PDFBox I/O utilities
fontbox3.0.7Font handling for PDFBox
commons-logging1.3.5Logging bridge
jbig2-imageio3.0.4JBIG2-compressed image support

📜 License

Apache 2.0 — see LICENSE.

Releases

Version Released Size Download
1.0.4 3.6 MB Download
1.0.3 3.6 MB Download
1.0.2 3.6 MB Download
1.0.1 3.6 MB Download
1.0.0 3.6 MB Download

Details

Plugin ID
dev.nuclr.plugin.core.quickviewer.pdf
Repository
nuclrdev/plugin-quick-viewer-pdf
Platform SDK
6.0.0
SHA-256
031d5a7511c056f00149c60792a9cafa338caec610f70ca2ce6ce11f5f31114f