# PDF Helper

<figure><img src="https://291121471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McrRFZHYH27bqKzOVDd%2Fuploads%2FxbtuqdWnMaJy0C3ZWEpX%2Fimage.png?alt=media&#x26;token=f86729a3-5caa-4444-b472-47381e4cd5cc" alt="" width="150"><figcaption></figcaption></figure>

## Overview

Using the **PDF Helper**, you can easily create PDF documents from HTML and CSS content.

## Actions

The PDF Helper has only one default action - Convert HTML To PDF.

Simply include your HTML CSS code in the input field, including any kind of variables and the helper renders DIN-A4 PDF pages. If the content exceeds a regular DIN-A4 page, it is easy to create multiple pages.

All variables can be used in regular Jinja2 syntax e.g.

```markup
<!DOCTYPE HTML>
<html lang="en-US">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
    </head>
    <body>
        <p>First Name: {{ zendeskContact.first_name }}</p>
    </body>

</html>
```

{% hint style="info" %}
You need to follow the above template in order to ensure **UTF-8 encoding**.
{% endhint %}

<figure><img src="https://291121471-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-McrRFZHYH27bqKzOVDd%2Fuploads%2FlkJIUE2c0NzRtbjFvsG1%2Fimage.png?alt=media&#x26;token=c1495a96-753d-430b-aa95-b487114c06ad" alt=""><figcaption></figcaption></figure>

## Page Sizes

If you like to change the paper size you can add

<pre class="language-html"><code class="lang-html"><strong>&#x3C;meta name="pdfkit-page-size" content="LETTER"/>
</strong></code></pre>

or

<pre class="language-html"><code class="lang-html"><strong>&#x3C;meta name="pdfkit-page-size" content="A4"/>
</strong></code></pre>

to your HTML header.

A list of paper sizes can be found [here](https://pdfkit.org/docs/paper_sizes.html).

## Landscape Orientation

If you like to receive a document in landscape orientation, you can add the following to your HTML header:

```html
<meta name="pdfkit-orientation" content="Landscape"/>
```
