Disgrifiad
PDFGate turns any post, page or custom post type into a PDF with one click. The rendering happens on the PDFGate API using a headless Chromium engine, so what your visitors download matches what they see on screen: web fonts, CSS grid, background images, embedded charts and all.
Features
- “Download as PDF” block for the block editor, with a custom label and alignment.
[pdfgate_download]shortcode for classic themes and page builders.- Optionally add the button automatically below every post, page or custom post type.
- Two render modes: the public page as your theme shows it, or the post content alone with a clean print template.
- Page size, orientation, margins, print media emulation, background printing and image loading settings.
- Global header and footer HTML with page numbers, date, title and URL placeholders.
- Optional fillable form fields: HTML inputs on the page become interactive PDF fields.
- Generated PDFs are cached and reused until the post changes, so your API quota is spent once per edit, not once per visitor.
- Per-visitor rate limiting protects your quota from bots.
- API key stored encrypted. It can also be defined as the
PDFGATE_API_KEYconstant inwp-config.php. - Filters for developers to change the request, the template, the filename and the button markup.
Requirements
A free PDFGate account and API key from pdfgate.com. The free plan includes a monthly allowance of PDF generations; paid plans increase it.
External service
This plugin sends content to the PDFGate API (https://api.pdfgate.com, or https://api-sandbox.pdfgate.com for test keys) to render PDFs. Nothing is sent until a visitor requests a PDF or an administrator runs the connection test.
Depending on the render mode, the request contains either the public URL of the post or the rendered HTML of the post content, together with your API key and the site URL. PDFGate processes the request to produce the PDF and keeps a request log for billing and abuse prevention. Documents are only stored on PDFGate servers if storage is enabled in your PDFGate account settings.
Lluniau Sgrin



Blocks
This plugin provides 1 block.
- Download as PDF A button that downloads the current post or page as a PDF rendered by PDFGate.
Gosod
- Install and activate the plugin.
- Create an API key at https://dashboard.pdfgate.com/settings/api-keys.
- Go to Settings PDFGate, paste the key and click “Test connection”.
- Add the “Download as PDF” block to a post, use the
[pdfgate_download]shortcode, or enable “Add automatically” for your post types.
Cwestiynau Cyffredin
-
Does this work on a local or password-protected site?
-
The “Public page URL” render mode needs PDFGate to fetch your page, so the site must be reachable from the internet and the post must be public. Switch to “Post content” mode for local development, staging sites behind a login, or drafts.
-
How do I hide an element from the PDF?
-
In URL mode, add the CSS class
pdfgate-hideto any element, or target thepdfgate-renderbody class in your stylesheet. The download button itself is always hidden. -
How many API requests does a download use?
-
One per post per edit. The generated file is cached in
wp-content/uploads/pdfgateand served from there until the post is updated, the settings change, or a day passes. Visitors are also limited to ten fresh generations per minute. Developers can change both with thepdfgate_cache_ttlandpdfgate_rate_limitfilters. -
Yes. Use the
pdfgate_generate_payloadfilter to set any option documented at https://pdfgate.com/documentation/generate-pdf, for exampleheader,footer,cssorjavascript. -
Where is the API key stored?
-
Encrypted in the WordPress options table, using a key derived from your site’s authentication salts. You can instead define
PDFGATE_API_KEYinwp-config.php, in which case the settings page becomes read-only for the key.
Adolygiadau
There are no reviews for this plugin.
Contributors & Developers
“PDFGate – HTML to PDF” is open source software. The following people have contributed to this plugin.
CyfranwyrTranslate “PDFGate – HTML to PDF” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Cofnod Newid
1.0.0
- Initial release: block, shortcode, automatic button, URL and content render modes, caching and rate limiting.
