PDFPRO

This knowledge base article relates to the WS Form PDF add-on. Click here to purchase this add-on.

The PDF add-on allows you to attach a PDF file to emails, as well as export PDFs from the submissions page.

Note: The PDF add-on uses Published forms. Please ensure your form has been published before using the PDF add-on.

Installation

The WS Form PDF plugin is installed in the same way as installing the WS Form PRO plugin.

Once installed you will need to activate the license for the plugin. When you purchase the PDF plugin, you will be given a license key. If you have lost your license key(s), click here.

To activate your license key:

  1. Click ‘WS Form’ in the WordPress administration menu.
  2. Click ‘Settings’.
  3. Click the ‘PDF’ tab at the top of the page.
  4. Enter your license key.
  5. Click the ‘Activate’ button.

If your license key fails to activate, please ensure you are using the correct license key and not your WS Form PRO license key.

Attaching a PDF to an Email Action

To attach a PDF to a Send Email action:

  1. When editing your form, click the ‘Actions’ icon at the top of the page. The ‘Actions’ sidebar will open on the right-hand side of the page.
  2. Click the ‘Add’  icon to add a new action (or select an existing ‘Send Email’ action).
  3. Scroll down through the settings until you see the ‘Attach PDF’ checkbox.
  4. Check the ‘Attach PDF’ checkbox.
  5. Click the ‘Save’ button at the bottom.

Now when the email is sent, a PDF attachment of your submitted data will be included with the email.

Export Submission PDFs

To create a PDF of a submission:

  1. View the submissions of a form.
  2. In the left-most column, click on ‘Export PDF’.

Adding Page Breaks

When you install the PDF add-on, a new field type will appear in the form editor field types called ‘Page Break’. Simply drag that onto your form, and a page break will appear in your PDF at that point. This is useful for formatting PDFs that are created from your form submissions. This field type does not have any settings.

Creating Your Own PDF Designs

The PDF add-on uses parsed HTML templates containing WS Form variables. These templates are then converted to PDF. You can create your own HTML templates for each form ID. To add your own templates, copy the file found in templates/standard.html of the plugin folder to your WordPress uploads folder and then modify that file.

The path for the template should be:

wp-content/uploads/ws-form/pdf/<form_id>.html

So for example, if form ID 123 is in use and a template file called 123.html is found, WS Form will use that file instead of the standard.html file.

The default template code is as follows:

<!doctype html>
<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>#blog_name</title>

<style>

  svg { max-width: 100%; }
  h1 { font-size: 28px !important; margin-bottom: 10px !important; }
  p, ul, ol, td, span, a { font-size: 16px !important; }

</style>

</head>

<body style="background-color: #ffffff; font-family: sans-serif; -webkit-font-smoothing: antialiased; font-size: 14px; line-height: 1.4; margin: 0; padding: 0; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%;">

#email_submission

</body>

</html>

The add-on uses the popular dompdf converter to transform the parsed HTML template in a PDF document. Please refer to their online help for guidance on formatting a PDF document.

Unfortunately we are not able to provide support for the development of custom HTML templates using the PDF add-on.