
內容簡介
總結:
PDF Gallery Viewer 是一個 WordPress 外掛,能夠在您的網站上建立美觀且具有回應性的 PDF 圖庫。這個外掛能夠將 PDF 文件以吸引人的縮略圖形式展示,並利用 Imagick(若可用)自動生成每個 PDF 的第一頁預覽。每個圖庫中的文件都包括一個「查看」連結和可自訂的標題。當使用較大屏幕時,圖庫布局完全回應,以格子形式顯示;而在移動設備上,則轉為單列布局,以達到最佳的瀏覽體驗。這個外掛非常適合展示目錄、作品集、報告等下載內容,以有組織且專業的方式呈現。
特色:
- 顯示每個 PDF 文件的第一頁縮略圖預覽。
- 回應性圖庫布局:在桌面上以格子形式顯示,在手機上以垂直堆疊方式呈現。
- 可輕易自訂每個文件的標題和「查看」連結。
- 使用 Flexbox 和 CSS Grid,維持乾淨且現代化的設計風格。
- 使用 Imagick 自動生成圖像縮略圖,如果 Imagick 無法使用,將回退至預設的 PDF 圖示。
使用方法:
要將 PDF 文件新增至您的圖庫中,請使用以下短代碼:[pdf_gallery url="PDF_URL" title="文件標題"]。將多個短代碼包含在 pdf-gallery-container 內,以建立完整的圖庫。
這個外掛非常適合任何需要在其網站上分享多個 PDF 文件,同時保持版面一致且具備移動設備友好性的人士。
外掛標籤
開發者團隊
原文外掛簡介
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
Sorting UI (Title / Filename / Manual drag & drop)
Manual ordering with FIFO/LIFO behavior for newly added items
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]
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”]
