[WordPress] 外掛分享: PostPDFButton – Add PDF Button to posts and pages

首頁外掛目錄 › PostPDFButton – Add PDF Button to posts and pages
全新外掛
安裝啟用
尚無評分
4 天前
最後更新
問題解決
WordPress 6.5+ PHP 7.4+ v1.0.15 上架:2026-09-09

內容簡介

PostPDFButton 外掛可為文章和頁面新增可配置的 PDF 按鈕,讓訪客能夠直接從前端生成 PDF 文件。此外掛利用瀏覽器的原生列印引擎,確保在列印時保留已經在客戶端修改的文本。

【主要功能】
• 列印當前渲染的前端 DOM
• 保留客戶端翻譯的文本
• 支援多種頁面大小與方向
• 可配置的邊距與頁碼
• 自動生成的按鈕位置選擇
• 無需追蹤或外部 API 呼叫

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.15) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「PostPDFButton – Add PDF Button to posts and pages」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

PostPDFButton – Add PDF Button to posts and pages adds a configurable PDF button to frontend posts and pages.
Unlike plugins that rebuild a document from stored post content, this plugin prepares the DOM that is already rendered in the visitor’s browser. This means text changed by client-side translation or JavaScript before the button is clicked remains part of the printable output.
The plugin uses the browser’s native print engine. After the visitor clicks the button, a short “Preparing your PDF…” overlay is shown and the browser print dialog opens. The visitor can then choose “Save as PDF”.
Features:

Prints the currently rendered frontend DOM.
Preserves text already changed in the browser, including client-side translated text.
Waits for fonts, images, image decoding and DOM changes to settle before printing.
Supports lazy-loaded images.
Uses native browser multi-page pagination instead of creating one giant screenshot.
Supports A4, A5, A3, Letter, Legal and custom page sizes.
Supports portrait and landscape orientation.
Configurable margins.
Optional header/footer text and page numbers where supported by the browser.
Site header can be included or excluded.
Can remove common advertising blocks and comment sections from print output.
Configurable selectors for print target, exclusions and page-break avoidance.
Optional full-width content mode.
Automatic button before or after content.
Optional floating button.
Multiple built-in button styles.
Gutenberg block.
Shortcode: [onodev_pdf_button].
Visibility controls by post type and post/page ID.
Per-post visibility override.
No tracking, telemetry, remote API calls or CDN JavaScript.

Because the output is produced by the visitor’s browser, support for CSS features such as flexbox, grid, web fonts, SVG, backgrounds and border radius depends on that browser’s print implementation and the site’s own print CSS.
Client-side translation
The plugin does not fetch the original WordPress post again when preparing the page for print. It works with the DOM that exists at the moment the visitor clicks the button. If a client-side translation tool has already changed visible text in the DOM, the translated text is used for printing.
Privacy
The plugin does not send page content, visitor information, analytics or telemetry to the developer or to any external service. PDF preparation happens locally in the visitor’s browser.

延伸相關外掛

文章
Filter
Mastodon