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:
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]
Sorting / ordering:
[pdf_gallery_container layout=”grid” order_by=”title” order=”asc” ui=”1″]
…
[/pdf_gallery_container]
Manual ordering (UI drag & drop) with FIFO/LIFO for newly added items:
[pdf_gallery_container id=”my-gallery” layout=”grid” order_by=”manual” manual_mode=”fifo” ui=”1″]
…
[/pdf_gallery_container]
IMPORTANT: Manual ordering is managed by admins and saved server-side (post meta) so the order is the same for all visitors.
For reliable persistence, always set a stable id=”…” on each container (the Gutenberg block does this automatically).
Dynamic by category:
[pdf_gallery_container category=”brochures” layout=”slider”]