Bit Form
Limited-time offer
This deal ends ASAP!
Bit Form Logo
Estimated reading: 9 minutes 853 views

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  Note

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

How to use PDF Attachment📄

Global PDF Setting ⚙️

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

Bit Form - PDF Attachment - Go to App Settings then PDF

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
  • 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
  • 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

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

note-icon-bit-apps  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

After configuring the Global PDF Settings, return to your Bit Form dashboard and choose the specific form for which you wish to enable the PDF Attachment feature.

  • Go to the Settings tab of your Bit Form builder.
  • Click on the PDF Templates tab.
  • Click on the Add New Template button.
  • Enter a name for your template.
  • PDF body:
  • PDF Body: You have the option to utilize the default edition (Tiny MCE) for editing the PDF body, or you can implement your custom template.When opting for a user-defined template, the necessity of using the <body> tag is circumvented. By default, the <body> tag is included and adheres to the following rules if a custom template is used. And follow the rules below for custom template.
Bit Form - PDF Attachment - Add New PDF Template
Bit Form - PDF Attachment - PDF Template Settings

Example of Custom Style

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

<div>
  <h1>hello world</h1>
  <p>hello world</p>
</div>
  • 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 <pagebreak /> 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>

note-icon-bit-apps  Note

Starting from Bit Form version 2.18.0, you can set a custom PDF file name, add a password to the PDF, and enable a download link for the PDF.

PDF File Name

With the PDF File Name feature, you can set a static name for the PDF or use your form fields or smart tags to create a dynamic PDF file name.

PDF Password

With the PDF Password feature, you can set a password to protect your PDF file, ensuring only authorized users can access its contents. You can either set a static password or use your form fields or smart tags to create a dynamic password for added security.

Allow Download (Link)

With the Allow Download (Link) feature, you can enable a download link for the PDF, allowing users to easily download the file directly from the form submission. You can also choose who can download the PDF—either all users or only logged-in users.

When you enable the PDF download link, a smart tag/shortcode like ${bf_pdf_download.1} will be generated. You can use this tag in form submission confirmations, email templates, and other supported areas to provide users with access to download the PDF.

In this example, the smart tag/shortcode ${bf_pdf_download.1} has been added to the email template to allow users to download the PDF directly from the email they receive.

Override Global PDF Setting:

By checking this option, administrators can override the global PDF configuration for each template. This allows administrators to customize the PDF settings on a per-template basis, providing greater flexibility and control over the appearance and content of individual PDF templates. The available option is Paper Size, Orientation, Font Family, Font Size, PDF File Name, Watermark, and Language Direction.

Bit Form - PDF Attachment - Override PDF Global Settings

PDF File Name:

This option allows the admin to set the attachment PDF name. The name will be file_name-entry_id.pdf. The PDF File Name option is not available in the Global PDF Settings. It is only available in the Override Global PDF Settings for each template. After configuring, save the PDF template.

For example, if you set the PDF File Name to “My PDF” and the entry ID is 45, the PDF file name will be “My PDF-45.pdf”.

Bit Form - PDF Attachment - Set PDF File Name
Bit Form - PDF Attachment - Sabe PDF Template

📜 Apply Conditional Logic to send the PDF Attachment Template:

You have to set the conditional logic for when the PDF Attachment Template will be sent. To do this, you will need to:

  • Go to the Settings tab of your BitForm form.
  • Click on the Conditional Logic tab.
  • Click on the Add Conditional Logic button.
Bit Form - PDF Attachment - Setup Conditional Logic

Below are some options to consider while setting up the conditional logic:

  • Action Run When: Select “Record Create/Edit” to trigger the action when a new record is created or an existing one is edited.
  • Action Effect: Choose “On Form Load” to execute the action when the form is loaded.
  • Action Behaviour: You can select “Always” to send the email notification unconditionally or use conditions to send emails based on specific requirements.
  • Check the Email Notification option under Additional Actions. Scroll down until you see the PDF Attachment Template, and then choose the PDF template you’ve created.
Bit Form - PDF Attachment - Setup Conditional Logic and enable Email Notification
Bit Form - PDF Attachment - Choose your PDF Template

✔ Email Notification: Select the email template that you created earlier to be used for the notification.

✔ To: Input the email address where you want to send the email notification. You can also select “Form Fields” to fetch data directly from the front end.

✔ From: Set the email address from which you want to send the email to recipients.

✔ CC & BCC fields: Choose the CC & BCC fields if you want to send the notification to multiple email addresses.

✔ Reply To: Set the email address where the user will send the reply message in response to your email notification.

✔ Attachment: If there is any file upload field on the form, you can send an attachment along with the email.

✔ PDF Attachment Template: The admin can select the PDF template that was created earlier to be included as an attachment in the email.

note-icon-bit-apps  Note

At last, you have to configure the SMTP from the App Settings option to make sure that the email will be sent without any spamming. To set the SMTP read the SMTP documentation.

After configuring the Conditional Logic, click on Update at the top-right corner to save your changes.

Bit Form - PDF Attachment - click on Update
Share this Doc

PDF Attachment

Or copy link

CONTENTS
Subscribe for New Integrations Alert!
Join Community
4800+ Member's
Bit Apps
6500+ Videos
bit form dark logo
© Bit Form. All rights reserved.
Follow us
© 2024 ABC. All rights reserved by Bit Apps.