---
title: "Introducing PDF Attachment"
date: 2023-07-17
author: "Al Mizan"
featured_image: "https://bit-form.com/wp-content/uploads/2023/07/Bit-Form-PDF-Attachment.webp"
---

# Introducing PDF Attachment

The PDF Attachment feature in Bit Form allows administrators to send emails with PDF attachments, which can be used to share form entry data or other relevant information with recipients. This feature enhances the overall user experience and enables efficient and branded communication with recipients. Administrators have the flexibility to craft their own HTML templates with styles, further enhancing the professional presentation of PDF attachments.

## **Benefits of PDF Attachment**🎁

- **Seamless sharing of form entry data:** PDF attachments can be used to share form entry data with recipients, which can help track progress, making decisions, or providing feedback.

- **Visually appealing and informative:** PDF attachments can be customized with images, logos, headers, footers, and other elements, which can make them more visually appealing and informative.

- **Efficient and branded communication:** PDF attachments can be used to communicate with recipients in a professional and branded way.

![note-icon-bit-apps](https://bit-form.com/wp-content/uploads/2023/06/info-icon.png) **Note**

**Note: To use PDF attachments, your PHP version must be at least 7.4**









## **How to use PDF Attachment**📄

### Global PDF Setting ⚙️

To access Global PDF Settings, go to `<strong>App Settings -> PDF</strong>.` In the Global Settings section, you can configure the following options:

[![Bit Form - PDF Attachment - Go to App Settings then PDF](https://bit-form.com/wp-content/uploads/2023/07/Bit-Form-PDF-Attachment-Go-to-App-Settings-then-PDF-1024x444.webp)](https://bit-form.com/wp-content/uploads/2023/07/Bit-Form-PDF-Attachment-Go-to-App-Settings-then-PDF-png.webp)1\. **Paper Size:** The admin can select the desired paper size for the generated PDFs. Common paper sizes include A4, Letter, Legal, etc.

2\. **Orientation:** This allows the admin to choose whether the PDF pages should be in portrait (vertical) or landscape (horizontal) orientation.

3\. **Font Family:** The admin can specify the font family to be used in the generated PDFs. Different font families offer various styles and designs for text.

4\. **Font Size:** This option enables the admin to set the default font size for text in the PDF documents.

5\. **Watermark:** A watermark is an image or text that appears faintly behind the main content of a page. The admin can add a watermark to the generated PDFs for branding, security, or other purposes.

[![Bit Form - PDF Attachment - PDF Global Settings](https://bit-form.com/wp-content/uploads/2023/07/Bit-Form-PDF-Attachment-PDF-Global-Settings-1024x697.webp)](https://bit-form.com/wp-content/uploads/2023/07/Bit-Form-PDF-Attachment-PDF-Global-Settings-png.webp)**Image Watermark**

- **Watermark Image:** Administrators can upload a custom image by clicking the **Upload** button that will be used as the watermark for the PDF templates. This image can be a logo, text, or any other visual element that needs to be overlaid on the document.
- **Width and Height:** Administrators have the option to specify the width and height of the watermark image. This allows for resizing the watermark to suit the document’s layout and design.
- **Position X (Units in millimeters):** Administrators can set the horizontal position of the watermark image on the PDF template using millimeters as the unit of measurement. This allows for precise placement of the watermark.
- **Position Y (Units in millimeters):** Administrators can set the vertical position of the watermark image on the PDF template using millimeters as the unit of measurement. This enables accurate alignment of the watermark.
- **Show Watermark Behind the Page Content:** Administrators can choose whether to display the watermark behind the page content or on top of it. This option provides flexibility in the appearance of the watermark.
- **Opacity (0-100):** Administrators can adjust the opacity of the watermark image, ranging from 0 (completely transparent) to 100 (completely opaque). This feature allows for controlling the visibility and blending of the watermark with the content.

[![Bit Form - PDF Attachment - Watermark Type Image](https://bit-form.com/wp-content/uploads/2023/07/Bit-Form-PDF-Attachment-Watermark-Type-Image-png.webp)](https://bit-form.com/wp-content/uploads/2023/07/Bit-Form-PDF-Attachment-Watermark-Type-Image-png.webp)



**Text Watermark**

- **Watermark Text**: In this field, enter the text you want to display as your watermark.
- **Opacity (0-100):** Administrators can adjust the opacity of the watermark text, ranging from 0 (completely transparent) to 100 (completely opaque). This feature allows for controlling the visibility and blending of the watermark with the content.

[![Bit Form - PDF Attachment - Text Watermark](https://bit-form.com/wp-content/uploads/2023/07/Bit-Form-PDF-Attachment-Text-Watermark-png.webp)](https://bit-form.com/wp-content/uploads/2023/07/Bit-Form-PDF-Attachment-Text-Watermark-png.webp)









6\. **Language Direction:** This feature allows the admin to choose the writing direction for the text in the PDFs. It can be set to left-to-right (LTR) for languages like English or right-to-left (RTL) for languages like Arabic and Hebrew.

[![Bit Form - PDF Attachment - Language Direcction](https://bit-form.com/wp-content/uploads/2023/07/Bit-Form-PDF-Attachment-Language-Direcction-png.webp)](https://bit-form.com/wp-content/uploads/2023/07/Bit-Form-PDF-Attachment-Language-Direcction-png.webp)![note-icon-bit-apps](https://bit-form.com/wp-content/uploads/2023/06/info-icon.png) **Note**

**Note:** The settings in Global PDF Settings will be applied to all PDF templates in Bit Forms. This means that any new PDF templates that you create will use the settings that you have specified.











### PDF Templates

A PDF template defines the content and file settings of one PDF. PDF templates require Bit Form Pro. After configuring the Global PDF Settings, open the form you want to use:

1. In the form builder, click the **Settings** tab, then select **PDF Templates**.
2. Click **Add new template**, or click a template name to edit it.
3. Enter a template name, then set up the PDF content and file settings described below.
4. Click **Save template**. The form is saved automatically and you return to the list.

[![Bit Form PDF Templates list showing a template with Header, Body and Footer parts and its Status toggle](https://bit-form.com/wp-content/uploads/2026/09/bitform-pdf-templates-list-1.webp)](https://bit-form.com/wp-content/uploads/2026/09/bitform-pdf-templates-list-1.webp)1. **Add new template** creates a PDF template.
2. The **PDF Settings** column shows which parts the template uses: Header, Body and Footer.
3. The **Status** toggle turns the template on or off. An inactive PDF template is not attached to emails and its download link stops working.

#### PDF content: Header, Body and Footer

The **PDF content** card has three editors. All three support **Form Fields**, **Smart Tag Fields** and **Conditional Block** from the toolbar.

- **Header:** printed at the top of every page. A new template starts with a centered “Page Header” title that you can replace, for example with your logo or document name.
- **Body:** the main content. A new template starts with `${bf_all_data}`, which lists every submitted field. **Map All Field With Table** and **Map All Field** insert all fields at once.
- **Footer:** printed at the bottom of every page. A new template starts with the date and page numbers.

[![Bit Form PDF template editor with a conditional block in the Header editor, the Conditional Block button and the Save template button](https://bit-form.com/wp-content/uploads/2026/09/bitform-pdf-template-header-1.webp)](https://bit-form.com/wp-content/uploads/2026/09/bitform-pdf-template-header-1.webp)1. The **Header** editor, here with a title and a conditional “VIP PASS” line.
2. The **Conditional Block** button.
3. The **Active** toggle and **Save template**.

The Header and Footer can use these page placeholders, which the PDF generator fills in on each page:

PlaceholderOutput`{PAGENO}`The current page number`{nbpg}`The total number of pages`{DATE j-m-Y}`The date the PDF was created, in the format after `DATE` (for example `{DATE Y-m-d}`)[![Bit Form PDF template Footer editor with the default date and page number placeholders](https://bit-form.com/wp-content/uploads/2026/09/bitform-pdf-template-footer-1.webp)](https://bit-form.com/wp-content/uploads/2026/09/bitform-pdf-template-footer-1.webp)1. The **Footer** editor with the default date and “Page {PAGENO} of {nbpg}” text.
2. The **Conditional Block** button in the Footer toolbar.

Leave the Header or Footer empty if you do not want one. The page’s top and bottom margins grow automatically so a tall header or footer never overlaps the body.

**Custom HTML in the Body:** you can use the default editor or switch to code view (**&lt;/&gt;**) and write your own HTML and CSS. You do not need a `<body>` tag.

**Example of Custom Style**

```
<style>
  h1 {
    color: blue;
  }
  p {
    color: red;
  }
</style>

<div>
  <h1>hello world</h1>
  <p>hello world</p>
</div>Copy
```

- **Add New Page or divide page**: To add a new page or divide the current page in your PDF document, you can make use of the **&lt;**pagebreak /**&gt;** tag.

Here’s an example of how you can use the `<pagebreak />` tag in your PDF template:

```
<h1 style="color:blue;text-align:center;">This is a heading</h1>
<p style="color:red;">This is a paragraph.</p>

<pagebreak />

<h1 style="color:blue;text-align:center;">This is a heading</h1>
<p style="color:red;">This is a paragraph.</p>Copy
```

#### Show different PDF content with If/Else Conditional Blocks

If/Else Conditional Blocks let one PDF template produce different PDFs based on the submitted values. Wrap content in `${bf_if:...}` and `${bf_endif}` in the Header, Body or Footer, and it is only printed when the condition is true. Add `${bf_else}` for alternative content, and nest another block in the Else part for Else If. For example, `${bf_if:b7-5 greater_or_equal 300}VIP PASS${bf_endif}` in the Header prints “VIP PASS” only for Gold and Diamond passes.

[![Two PDFs generated from one Bit Form PDF template: the Gold pass PDF shows a VIP PASS header line and accommodation row, the Bronze pass PDF shows a phone row and fallback text](https://bit-form.com/wp-content/uploads/2026/09/bitform-pdf-conditional-output-1.webp)](https://bit-form.com/wp-content/uploads/2026/09/bitform-pdf-conditional-output-1.webp)To hide a whole table row, wrap the tags in HTML comments in code view, for example `\<!-- ${bf_if:b7-11} -->`. For the full syntax, every operator, and more examples, read the [If/Else Conditional Blocks doc](/wp-docs/conditional-blocks/).

#### File settings

[![PDF template File settings with PDF file name, PDF password, Allow download (link) options and the Override default PDF settings toggle](https://bit-form.com/wp-content/uploads/2026/09/bitform-pdf-template-file-settings-1.webp)](https://bit-form.com/wp-content/uploads/2026/09/bitform-pdf-template-file-settings-1.webp)1. **PDF file name:** a static name, or build one from form fields and smart tags with **+ Add field**. The PDF is named exactly as the result, for example `bitform.pdf`. When the name is empty, the file is named `bit-form-` followed by the entry ID. Characters that are not allowed in file names, such as `/`, are replaced with a hyphen.
2. **PDF password:** protects the PDF with a static password or one built from form fields with **+ Add field**. When a password is set, a **PDF Password Shortcode** such as `${bf_pdf_password.1}` appears so you can tell the recipient the password, for example in the email.
3. **Allow download (link):** **None**, **All users** or **Only logged-in users**. When download is allowed, a **Download Link Shortcode** such as `${bf_pdf_download.1}` appears. Add it to an email template, confirmation message or other supported area to give users a download link.
4. **Override default PDF settings:** use different page, font and watermark settings for this template only.

The number in each shortcode is the PDF template’s ID. Copy the shortcode from the template instead of typing it.

#### Override Global PDF Setting

Turn on **Override default PDF settings** to replace the Global PDF Settings for one template. The options are grouped as **Page Layout** (Paper size, Orientation), **Typography** (Font family, Font size (px), Language direction) and **Watermark** (Text or Image, with the same options as the global watermark). Turning the override off again restores the global settings and keeps the template’s file name, password and download settings.

[![Override default PDF settings expanded with Page Layout, Typography, Language direction and Watermark options](https://bit-form.com/wp-content/uploads/2026/09/bitform-pdf-template-override-settings-1.webp)](https://bit-form.com/wp-content/uploads/2026/09/bitform-pdf-template-override-settings-1.webp)### Attach the PDF to an email

A PDF template is sent as an attachment of an email template:

1. In the form builder, click **Settings**, then **Email Templates**, and edit the email that should carry the PDF.
2. In the **Attachments** section, select one or more templates under **PDF Attachment Templates**. **Add PDF** creates a new PDF template without leaving the email.
3. Click **Update Template**.

[![Attachments section of a Bit Form email template with a PDF template selected under PDF Attachment Templates and the Conditional Logic toggle](https://bit-form.com/wp-content/uploads/2026/09/bitform-email-template-attachments-1.webp)](https://bit-form.com/wp-content/uploads/2026/09/bitform-email-template-attachments-1.webp)Active email templates are sent automatically after every submission, so the PDF is generated and attached without any Conditional Logic rule. To send the email, and therefore the PDF, only in some cases, use the email template’s Conditional Logic (Pro) or a Conditional Logic rule. You can also pick PDF templates directly in the Email Notification action of a rule under **Settings → Conditional Logics**. See the [Email Template doc](/wp-docs/email-template/) and the [Email Notification doc](/wp-docs/apply-conditional-logic-using-bitform/setting-up-email-notifications/).

![note-icon-bit-apps](https://bit-form.com/wp-content/uploads/2023/06/info-icon.png) **Note**

Configure SMTP under **Bit Form → App Settings → SMTP** so emails with PDF attachments are delivered reliably. See the [SMTP settings doc](/wp-docs/app-settings/smtp-settings/).









### Related documentation

- [If/Else Conditional Blocks in email and PDF templates](/wp-docs/conditional-blocks/)
- [Email Template: recipients, body and attachments](/wp-docs/email-template/)
- [PDF app settings](/wp-docs/app-settings/pdf-settings/)
- [Smart Tags reference](/wp-docs/others/smart-tags/)