Title: HTML to PDF Converter
Author: html2pdf.app
Published: <strong>22 Settembre 2023</strong>
Last modified: 16 Giugno 2026

---

Ricerca i plugin

![](https://ps.w.org/html-to-pdf-converter/assets/icon-128x128.png?rev=3157463)

# HTML to PDF Converter

 Di [html2pdf.app](https://profiles.wordpress.org/html2pdfapp/)

[Scarica](https://downloads.wordpress.org/plugin/html-to-pdf-converter.1.1.0.zip)

 * [Dettagli](https://it.wordpress.org/plugins/html-to-pdf-converter/#description)
 * [Recensioni](https://it.wordpress.org/plugins/html-to-pdf-converter/#reviews)
 *  [Installazione](https://it.wordpress.org/plugins/html-to-pdf-converter/#installation)
 * [Sviluppo](https://it.wordpress.org/plugins/html-to-pdf-converter/#developers)

 [Supporto](https://wordpress.org/support/plugin/html-to-pdf-converter/)

## Descrizione

The “HTML to PDF Converter” plugin, created by [html2pdf.app](https://html2pdf.app),
lets your visitors save any WordPress page or post as a PDF. Install the plugin,
add your API key, and either drop a shortcode where you want the download link —
or switch on the automatic button to add a “Save as PDF” link to every post and 
page with no shortcode at all.

Conversions are handled by the html2pdf.app cloud API, the same engine used by the
standalone service, so PDFs render with full CSS, web fonts, and images.

#### Features

 * **One shortcode** — add a download button anywhere with `[html2pdf text="Save
   as PDF"]`.
 * **Automatic button** — show a “Save as PDF” button on chosen post types automatically,
   with no shortcode. Choose the position (before, after, or both) and the button
   text.
 * **Print-ready output** — set the CSS media type to `screen` or `print` (globally
   or per shortcode) to use your theme’s `@media print` styles and hide unwanted
   sections.
 * **Full conversion control** — page format (A4, Letter, Legal, and more), portrait/
   landscape orientation, custom margins, and custom width/height.
 * **Test your connection** — validate your API key from the settings page in one
   click before you go live.
 * **Styled, theme-friendly button** — ships with a clean default style that your
   theme can override, and is hidden automatically in the PDF when converting with
   print media.

#### Why a PDF plugin?

PDF downloads are useful for invoices, receipts, documentation, recipes, event tickets,
knowledge-base articles, and any content your visitors want to save or print. This
plugin gives them a one-click way to do it.

### External services

This plugin relies on the third-party html2pdf.app API to generate PDFs. When a 
visitor clicks a conversion link, the URL of the page being converted (together 
with your conversion settings) is sent to `https://api.html2pdf.app/v1/generate`,
which fetches that public URL, renders it, and returns the PDF. Your API key is 
sent with the request for authentication.

Because the API fetches the page itself, the page being converted must be publicly
accessible on the internet.

 * Service: html2pdf.app — https://html2pdf.app
 * Terms of Service: https://html2pdf.app/terms-of-service/
 * Privacy Policy: https://html2pdf.app/privacy-policy/

### Plugin Settings

Go to **Settings  HTML to PDF** to configure:

 * **API Key** — your html2pdf.app key (with a “Test connection” button to verify
   it).
 * **Page Format** — Letter, Legal, Tabloid, Ledger, or A0–A6.
 * **Landscape** — switch orientation to landscape.
 * **Media** — `screen` or `print`. Choose “print” to apply your theme’s `@media
   print` styles. This is the default for every button and can be overridden per
   shortcode.
 * **Margins** — top, right, bottom, and left margins in pixels.
 * **Width / Height** — optional custom page size in pixels.
 * **Automatic button** — enable it, choose which post types it appears on, its 
   position, and the button text.

### Usage

**Shortcode**

Add the shortcode to any page or post:

    ```
    [html2pdf text="Save as PDF"]
    ```

Supported attributes:

 * `text` — the button label (default: “Generate PDF”).
 * `media` — `screen` or `print` (defaults to the Media setting).

Example: `[html2pdf text="Download PDF" media="print"]`

**Automatic button (no shortcode)**

Under **Settings  HTML to PDF  Automatic Save as PDF button**, enable the button
and pick the post types, position, and label. The button is then added to that content
automatically.

### Examples

**Hide parts of the page from the PDF.** Add the `html2pdf_hide` class to any element(
header, footer, sidebar, etc.) and it will be excluded from the generated PDF, while
still showing normally to your visitors:

    ```
    <div class="html2pdf_hide"> ... not included in the PDF ... </div>
    ```

No extra CSS or print media is required — the conversion button is hidden automatically
too.

**For full control**, the page `<body>` receives a `html2pdf-rendering` class while
it is being converted, so you can target anything from your theme’s stylesheet:

    ```
    .html2pdf-rendering .site-header,
    .html2pdf-rendering .site-footer {
        display: none !important;
    }
    ```

You can also use the “media” parameter (or the Media setting) to activate your theme’s
print styles: `[html2pdf text="Save as PDF" media="print"]`.

## Screenshot

[⌊Plugin settings page: API key with "Test connection", conversion options, and 
the automatic button settings.⌉⌊Plugin settings page: API key with "Test connection",
conversion options, and the automatic button settings.⌉[

Plugin settings page: API key with “Test connection”, conversion options, and the
automatic button settings.

[⌊A "Save as PDF" button rendered on a page.⌉⌊A "Save as PDF" button rendered on
a page.⌉[

A “Save as PDF” button rendered on a page.

[⌊Example of a generated PDF.⌉⌊Example of a generated PDF.⌉[

Example of a generated PDF.

## Installazione

 1. Upload the plugin files to `/wp-content/plugins/html-to-pdf-converter`, or install
    the plugin through the WordPress “Plugins” screen directly.
 2. Activate the plugin through the “Plugins” screen in WordPress.
 3. Go to **Settings  HTML to PDF** and enter your html2pdf.app API key. You can register
    for a free API key at https://dash.html2pdf.app/registration.
 4. Click **Test connection** to confirm your key works.
 5. Add the `[html2pdf text="Save as PDF"]` shortcode to a page or post — or enable
    the automatic button under “Automatic Save as PDF button”.

## FAQ

### Do I need an API key?

Yes. The plugin uses the html2pdf.app API to render PDFs. Register for a free API
key at https://dash.html2pdf.app/registration and paste it into the plugin settings.

### My page won’t convert or the PDF is empty. Why?

The html2pdf.app API fetches your page over the internet, so the page must be publicly
accessible. Conversions will not work on local development sites (e.g. `localhost`),
staging behind HTTP authentication, or password-protected/private posts. Use a publicly
reachable URL.

### How do I check that my API key is correct?

On the settings page, click **Test connection** next to the API Key field. You’ll
get an immediate success or error message.

### Can I add the button without using a shortcode?

Yes. Enable the automatic button under **Settings  HTML to PDF**, choose the post
types and position, and the “Save as PDF” button is added to your content automatically.

### How do I hide the header, footer, or other parts of the page in the PDF?

Add the `html2pdf_hide` class to any element you want to exclude — it stays visible
to visitors but is removed from the PDF. For custom rules, the `<body>` gets a `
html2pdf-rendering` class during conversion. See the Examples section.

### Can I change the page size, margins, or orientation?

Yes — all of these are configurable on the settings page, including A4/Letter/Legal
and other formats, landscape mode, custom margins, and a custom width/height.

### Where is my content sent?

The URL of the page being converted and your conversion settings are sent to the
html2pdf.app API. See the “External services” section above for details.

## Recensioni

![](https://secure.gravatar.com/avatar/e88c703033e1819a4ffb781746ce36325411cc3ece71b27b6d112ecfa2bcc5f8?
s=60&d=retro&r=g)

### 󠀁[Does Exactly What I Needed](https://wordpress.org/support/topic/does-exactly-what-i-needed-51/)󠁿

 [norkus256](https://profiles.wordpress.org/norkus256/) 16 Giugno 2026

I’ve been using this plugin to add PDF downloads to a WordPress site and it has 
worked well so far. Setup was straightforward and I had it running within a few 
minutes. What I appreciate most is that it doesn’t try to do too much. You can simply
add a shortcode and let visitors download pages as PDF files. The PDF output looks
good and there are enough options to adjust page size, orientation, and margins 
when needed.

![](https://secure.gravatar.com/avatar/90bd42e5ffb1b299c2ca946eb2570d632924ab0edc248aef771d5e17fc2c210c?
s=60&d=retro&r=g)

### 󠀁[Not for dynamic pages!](https://wordpress.org/support/topic/not-for-dynamic-pages/)󠁿

 [eka23](https://profiles.wordpress.org/eka23/) 12 Giugno 2024 2 risposte

Good try!But!The website is not taken over directly, but probably rebuilt by html2pdf
on their server. This means that only static pages can be transferred. But I have
a website where a query runs on the posts. These variables are lost and the PDF 
page second only scrap. Too bad, two hours invested for nothing. Zero Star!

 [ Leggi tutte le recensioni di 2 ](https://wordpress.org/support/plugin/html-to-pdf-converter/reviews/)

## Contributi e sviluppo

“HTML to PDF Converter” è un software open source. Le persone che hanno contribuito
allo sviluppo di questo plugin sono indicate di seguito.

Collaboratori

 *   [ html2pdf.app ](https://profiles.wordpress.org/html2pdfapp/)

[Traduci “HTML to PDF Converter” nella tua lingua.](https://translate.wordpress.org/projects/wp-plugins/html-to-pdf-converter)

### Ti interessa lo sviluppo?

[Esplora il codice](https://plugins.trac.wordpress.org/browser/html-to-pdf-converter/)
segui il [repository SVN](https://plugins.svn.wordpress.org/html-to-pdf-converter/),
segui il [log delle modifiche](https://plugins.trac.wordpress.org/log/html-to-pdf-converter/)
tramite [RSS](https://plugins.trac.wordpress.org/log/html-to-pdf-converter/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.1.0

 * Confirm compatibility with WordPress 7.0
 * Add automatic “Save as PDF” button insertion on selected post types (no shortcode
   required), with position and button text options
 * Add a default Media (screen/print) setting, overridable per shortcode
 * Add a “Test connection” button on the settings page to validate the API key
 * Mask the API key field with a Show/Hide toggle
 * Add usage examples directly in the plugin settings page
 * Ship default button styling, and hide the conversion button in the generated 
   PDF automatically (any media type)
 * Add an html2pdf_hide class and an html2pdf-rendering body class to exclude any
   element from the generated PDF
 * Redesign the settings page with grouped, card-style sections for clearer separation
 * Restrict conversions to pages on the same site to prevent misuse of the API key
 * Send API key via the X-API-Key header instead of a request body parameter
 * Identify plugin requests for monitoring with an X-Source header
 * Sanitize server-provided URL values

#### 1.0.8

 * Use page URL instead of persisted one, add settings link in a plugins page

#### 1.0.7

 * Update icon, increase compatibility with the latest wordpress version

#### 1.0.6

 * Update readme file with examples

#### 1.0.5

 * Add possibility to pass media parameter through the shortcode

#### 1.0.4

 * Improve error reporting

#### 1.0.3

 * Icon, author URI and support email added

#### 1.0.2

 * Initial version

## Meta

 *  Versione **1.1.0**
 *  Ultimo aggiornamento **4 settimane fa**
 *  Installazioni attive **60+**
 *  Versione WordPress ** 5.0 o superiore **
 *  Testato fino alla versione **7.0.1**
 *  Versione PHP ** 7.0 o superiore **
 *  Lingua
 * [English (US)](https://wordpress.org/plugins/html-to-pdf-converter/)
 * Tag
 * [convert to pdf](https://it.wordpress.org/plugins/tags/convert-to-pdf/)[html2pdf](https://it.wordpress.org/plugins/tags/html2pdf/)
   [page to pdf](https://it.wordpress.org/plugins/tags/page-to-pdf/)[pdf](https://it.wordpress.org/plugins/tags/pdf/)
 *  [Visualizzazione avanzata](https://it.wordpress.org/plugins/html-to-pdf-converter/advanced/)

## Valutazioni

 3 su 5 stelle.

 *  [  1 5- recensioni a stelle     ](https://wordpress.org/support/plugin/html-to-pdf-converter/reviews/?filter=5)
 *  [  0 recensioni a 4-stelle     ](https://wordpress.org/support/plugin/html-to-pdf-converter/reviews/?filter=4)
 *  [  0 recensioni a 3-stelle     ](https://wordpress.org/support/plugin/html-to-pdf-converter/reviews/?filter=3)
 *  [  0 recensioni a 2-stelle     ](https://wordpress.org/support/plugin/html-to-pdf-converter/reviews/?filter=2)
 *  [  1 1- recensioni a stelle     ](https://wordpress.org/support/plugin/html-to-pdf-converter/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/html-to-pdf-converter/reviews/#new-post)

[Vedi tutte le recensioni](https://wordpress.org/support/plugin/html-to-pdf-converter/reviews/)

## Collaboratori

 *   [ html2pdf.app ](https://profiles.wordpress.org/html2pdfapp/)

## Supporto

Hai qualcosa da dire? Ti serve aiuto?

 [Chiedi nel forum di supporto](https://wordpress.org/support/plugin/html-to-pdf-converter/)