Title: PostPDFButton &#8211; Add PDF Button to posts and pages
Author: onodev77
Published: <strong>2026 年 9 月 10 日</strong>
Last modified: 2026 年 9 月 10 日

---

搜尋外掛

![](https://ps.w.org/onodev77-pdf-print-button-posts-pages/assets/icon-128x128.png?
rev=3689560)

# PostPDFButton – Add PDF Button to posts and pages

 由 [onodev77](https://profiles.wordpress.org/onodev77/) 開發

[下載](https://downloads.wordpress.org/plugin/onodev77-pdf-print-button-posts-pages.1.0.15.zip)

 * [詳細資料](https://tw.wordpress.org/plugins/onodev77-pdf-print-button-posts-pages/#description)
 * [使用者評論](https://tw.wordpress.org/plugins/onodev77-pdf-print-button-posts-pages/#reviews)
 *  [安裝方式](https://tw.wordpress.org/plugins/onodev77-pdf-print-button-posts-pages/#installation)
 * [開發資訊](https://tw.wordpress.org/plugins/onodev77-pdf-print-button-posts-pages/#developers)

 [技術支援](https://wordpress.org/support/plugin/onodev77-pdf-print-button-posts-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.

## 螢幕擷圖

[⌊Configure the PDF button style and placement.⌉⌊Configure the PDF button style 
and placement.⌉[

Configure the PDF button style and placement.

[⌊The "Save as PDF" button displayed inside a WordPress post.⌉⌊The "Save as PDF"
button displayed inside a WordPress post.⌉[

The “Save as PDF” button displayed inside a WordPress post.

## 適用於區塊編輯器

這個外掛提供 1 個可供區塊編輯器使用的區塊。

 *   PostPDFButton – Add PDF Button to posts and pages Adds a button that prints
   the currently rendered frontend DOM so visitors can save it as PDF.

## 安裝方式

 1. Install and activate the plugin.
 2. Open Settings > PostPDFButton – Add PDF Button to posts and pages.
 3. The automatic “Download As PDF” button is shown before post/page content by default.
 4. Adjust placement, print layout and visibility settings if needed.
 5. You can also insert `[onodev_pdf_button]` or use the Gutenberg block.

## 常見問題集

### Does the plugin generate the PDF on an external server?

No. It uses the DOM already rendered in the visitor’s browser and invokes the browser’s
native print system.

### Why does the browser print dialog open?

Ordinary page JavaScript cannot silently select the browser’s native “Save as PDF”
printer or bypass the print dialog. Using the normal print dialog preserves native
browser rendering and multi-page pagination.

### Does it work after client-side translation?

Yes, when the translated text is present in the current DOM before the visitor clicks
the PDF button.

### Can I print only the main article area?

Yes. Use the “Print target selector” setting and enter a selector that matches the
desired content wrapper on your site.

### Can I exclude elements from the PDF?

Yes. Add comma-separated CSS selectors to the exclusion setting. The plugin button
itself is always excluded.

### Does it contact external services?

No.

## 使用者評論

這個外掛目前沒有任何使用者評論。

## 參與者及開發者

以下人員參與了開源軟體〈PostPDFButton – Add PDF Button to posts and pages〉的開發
相關工作。

參與者

 *   [ onodev77 ](https://profiles.wordpress.org/onodev77/)

[將〈PostPDFButton – Add PDF Button to posts and pages〉外掛本地化為台灣繁體中文版](https://translate.wordpress.org/projects/wp-plugins/onodev77-pdf-print-button-posts-pages)

### 對開發相關資訊感興趣？

任何人均可[瀏覽程式碼](https://plugins.trac.wordpress.org/browser/onodev77-pdf-print-button-posts-pages/)、
查看 [SVN 存放庫](https://plugins.svn.wordpress.org/onodev77-pdf-print-button-posts-pages/)，
或透過 [RSS](https://plugins.trac.wordpress.org/log/onodev77-pdf-print-button-posts-pages/?limit=100&mode=stop_on_copy&format=rss)
訂閱[開發記錄](https://plugins.trac.wordpress.org/log/onodev77-pdf-print-button-posts-pages/)。

## 變更記錄

#### 1.0.14

 * Renamed the plugin with a distinctive OnoDev77 identifier.
 * Updated plugin slug/text domain and block namespace for the new directory name.
 * Improved readme wording and setup instructions.
 * Removed unsupported “Tested up to” metadata from the PHP plugin header.

#### 1.0.13

 * Developer/author metadata updated to OnoDev77.
 * Readme wording generalized for compatibility with WordPress themes and page builders.

#### 1.0.12

 * Fix: remove print-only borders, outlines and shadows from desktop navigation 
   links while preserving menu typography and spacing.

#### 1.0.11

 * Fix: normalize masthead/header wrapper geometry to the printable page instead
   of retaining desktop offsets.
 * Fix: keep logo and navigation inside the printable area while preserving their
   original visual styling.
 * Changed default button label to “Download As PDF” and migrates the old untouched
   default label.

#### 1.0.10

 * Fix: protect #masthead and all ancestors from print-scope hiding.
 * Fix: force desktop navigation structures to remain visible during printing while
   hiding mobile toggles.
 * Improved compatibility with themes that reuse modal/mobile menu markup for desktop
   navigation.

#### 1.0.9

 * Keep the site header visible when printing only the article/content target.
 * Broaden header and primary navigation detection for more themes.
 * Preserve content image sizes using the actual rendered width, with A4-safe max-
   width clamping.
 * Unify scaling for screenshots, inline download badges, and linked images.

#### 1.0.8

 * Fixed small inline images, download badges and image buttons becoming oversized
   in PDF output.
 * Preserves the rendered pixel size of small linked graphics while keeping large
   content images responsive.
 * Prevents inline image buttons from being forced onto separate PDF pages by generic
   break-avoid rules.

#### 1.0.7

 * Reworked Preserve page styles to use a selective, chunked pass instead of processing
   every DOM element, preventing long browser freezes on complex pages.
 * Reworked header/navigation preservation to keep the original DOM in place and
   freeze only screen-visible styling, improving logo and menu alignment in PDF 
   output.
 * Added a redesigned professional settings screen with grouped cards, clearer hierarchy,
   sticky save action, and live button-style preview.

#### 1.0.4

 * Improved site-header printing by creating a frozen desktop header/navigation 
   snapshot before print.
 * Added direct print-time removal for dynamically injected Google AdSense/DoubleClick
   ad elements.
 * Rechecks excluded dynamic elements immediately before printing.
 * Improved button style visibility and added green, red, purple, and orange styles.

#### 1.0.3

 * Preserve the visible desktop site header/navigation when theme print CSS switches
   to a print/mobile menu.
 * Remove common Google advertising blocks from PDF by default, with a setting to
   disable this behavior.
 * Remove comments and comment forms from PDF by default, with a setting to disable
   this behavior.

#### 1.0.2

 * Improved full-width printing by expanding the runtime wrapper path for narrow
   flex/grid layouts.
 * Site header is now included by default, with a dedicated setting to disable it.
 * Automatic button defaults to Before content.
 * Added Classic, Dark, Outline, Minimal, Pill and Soft button styles.
 * Migrates the development 1.0.1 defaults when upgrading.

#### 1.0.1

 * Renamed to OnoDev77 PDF Print Button for Posts and Pages.
 * Added full-width print mode for narrow theme layouts and common WordPress themes/
   WordPress wrappers.

#### 1.0.0

 * Initial release.
 * Render current frontend DOM using native browser print.
 * Added font/image/dynamic-content waiting.
 * Added shortcode, Gutenberg block, automatic and floating buttons.
 * Added WordPress themes-oriented break avoidance defaults.
 * Added page format, orientation, margins, optional paged-media header/footer/page
   numbers.
 * Added visibility rules and per-post override.

## 中繼資料

 *  版本 **1.0.15**
 *  最後更新 **19 小時前**
 *  啟用安裝數 **少於 10 次**
 *  WordPress 版本需求 ** 6.5 或更新版本 **
 *  已測試相容的 WordPress 版本 **7.1**
 *  PHP 版本需求 ** 7.4 或更新版本 **
 *  語言
 * [English (US)](https://wordpress.org/plugins/onodev77-pdf-print-button-posts-pages/)
 * 標籤:
 * [pages to pdf](https://tw.wordpress.org/plugins/tags/pages-to-pdf/)[pdf button](https://tw.wordpress.org/plugins/tags/pdf-button/)
   [posts to pdf](https://tw.wordpress.org/plugins/tags/posts-to-pdf/)[print page](https://tw.wordpress.org/plugins/tags/print-page/)
   [Save as PDF](https://tw.wordpress.org/plugins/tags/save-as-pdf/)
 *  [進階檢視](https://tw.wordpress.org/plugins/onodev77-pdf-print-button-posts-pages/advanced/)

## 評分

這個項目尚無任何評論記錄。

[撰寫評分](https://wordpress.org/support/plugin/onodev77-pdf-print-button-posts-pages/reviews/#new-post)

[查看全部使用者評論](https://wordpress.org/support/plugin/onodev77-pdf-print-button-posts-pages/reviews/)

## 參與者

 *   [ onodev77 ](https://profiles.wordpress.org/onodev77/)

## 技術支援

使用者可在技術支援論壇提出意見反應或使用問題。

 [檢視技術支援論壇](https://wordpress.org/support/plugin/onodev77-pdf-print-button-posts-pages/)