
PDF Gallery Viewer
by Sergio Comella on WordPress.org
A simple plugin that creates a responsive PDF gallery with live thumbnail previews and a modal PDF viewer.

Responsive gallery grid layout
PDF Gallery Viewer allows you to easily embed PDF galleries with live previews. It uses PDF.js to render the first page of each PDF directly in the browser, without relying on server-side libraries like Imagick. Each item includes a customizable title and a “View” button that opens the PDF in a modal viewer.
The layout is responsive and adapts from a multi-column grid to a single-column stack on smaller screens.
Key Features:
- Live thumbnail of first PDF page (via PDF.js)
- Responsive layouts (Grid, List, or Slider)
- Modal viewer with zoom, navigation, and download
- Gutenberg block with layout selector and drag-and-drop file integration
- Tooltip + truncation for long titles
- Dynamic shortcode generation by category, tag, or post
Usage
Basic usage:
[pdf_gallery url=”https://example.com/doc.pdf” title=”Document Title”]
Multiple items in a container:
[pdf_gallery_container layout=”grid”]
[pdf_gallery url=”…” title=”…”]
[pdf_gallery url=”…” title=”…”]
[/pdf_gallery_container]
Dynamic by category:
[pdf_gallery_container category=”brochures” layout=”slider”]