| 开发者 | saumya010 |
|---|---|
| 更新时间 | 2026年9月25日 23:43 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPL v2 or later |
| 版权网址: | 版权信息 |
.newsletter-signup or #related-posts) to identify additional elements to remove from the PDF.[pdf_snapshot]), a Gutenberg block, and optional automatic injection into all posts and/or pages.pdf-snapshot folder to /wp-content/plugins/, or install it through the Plugins screen directly.composer install inside the plugin directory to fetch the Dompdf library.[pdf_snapshot] shortcode to a page, insert the "PDF Snapshot Button" block, or enable automatic injection in the settings.Yes — that's the plugin's whole purpose. Once the "Download PDF" button is added (via shortcode, block, or automatic injection), any visitor can click it to save the page as a PDF or download it immediately, without needing an account or leaving the site.
Yes. Version 1.0 uses a pure-PHP PDF library (Dompdf) with no external dependencies beyond what Composer installs — no Node.js, no headless browser, no server configuration needed.
Not reliably. The PDF engine does not execute JavaScript, so content that depends on it (some embeds, live widgets) may appear blank or be omitted. Ordinary content — text, images, tables, links — converts well.
Yes. Settings → PDF Snapshot lets you exclude the header, navigation, footer, sidebars, and comments, plus specify additional CSS selectors (e.g. .newsletter-signup) to identify any other elements that should be removed from the generated PDF. These selectors only pick which elements to strip — no CSS, JavaScript, or PHP code is ever saved or executed.
In wp-content/uploads/pdf-snapshot-cache/, if caching is enabled. Cached PDFs are automatically cleared when the source post is updated.
& or quote characters appeared in the PDF as raw HTML entity codes (e.g. & instead of &). Affected the PDF heading, the document title, and the page running header.<script> block into a properly registered/enqueued admin script, per WordPress.org plugin guidelines.