Directory / plugin

PDFGate – HTML to PDF

v1.0.2 · by PDFGate

Add a "Download as PDF" button to any post or page. Rendered by a real browser engine, so your theme, fonts and images come out right.

View on WordPress.org

About this plugin

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_KEY constant in wp-config.php.
  • Filters for developers to change the request, the template, the filename and the button markup.

Requirements

A PDFGate account and API key from pdfgate.com. Every plan starts with a 14-day free trial, no credit card required. Test keys use the sandbox and are free; live keys count against your plan’s monthly quota.

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.

Plugin tags