Linux 软件免费装

PostPDFButton - Add PDF Button to posts and pages

开发者 onodev77
更新时间 2026年9月10日 18:18
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

posts to pdf print page pdf button pages to pdf save as pdf

下载

1.0.15

详情介绍:

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: 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.

安装:

  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.

屏幕截图:

  • The "Save as PDF" button displayed inside a WordPress post.

常见问题:

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.

更新日志:

1.0.14 1.0.13 1.0.12 1.0.11 1.0.10 1.0.9 1.0.8 1.0.7 1.0.4 1.0.3 1.0.2 1.0.1 1.0.0