Frequently Asked Questions

This is the best place to find questions we get regularly asked. Still don’t find the answer you’re looking for? Ask us directly using our online contact form.

Developers

I just upgraded your plugin and my website stopped working!

You’re getting the error because the server requirements have changed in 3.0.2. To reduce the package file size we now deploy the majority of the software in a zip file which the server decompresses.

The simple fix is to download mPDF.zip from the plugin folder, extract it and then re-upload the files.

To prevent future issues you need to ensure your server has the Zip extension installed.

Can I exclude a field from showing up in the PDF?

Yes. As of version 2.3.0 you can exclude a field from showing up in a default template. You have to add the class name ‘exclude’ to your form field.

Exclude field from PDF

I want to have multiple PDF template files generated on one form. How do I do it?

You only need to modify the configuration.php file in your active theme’s PDF_EXTENDED_TEMPLATE folder.

The best way to do this is to use two configuration arrays with the same form ID.

$gf_pdf_config[] = array(
    'form_id' => '1',
    'notifications' => true,
    'template' => 'custom-template.php',
    'filename' => 'Custom.pdf'
);
  
$gf_pdf_config[] = array(
    'form_id' => '1',
    'notifications' => true,
    'template' => 'custom2.php',
    'filename' => 'Custom Template 2.pdf'
);

I want users to be able to download the PDF from the server.

We’ve put together a video tutorial showing off this feature. Watch it now.

This is by far the easiest way to allow users to download a generated PDF via a landing page. You’ll need to feed the form id, lead id and template name to a URL like this one:

http://www.yourdomain.com/?gf_pdf=1&fid=5&lid=142&template=example-template.php

By modifying the confirmation message on your form you can build a link to the PDF using the above structure or redirect to the document automatically. Just ensure you use the form and lead ID merge tags and change the template to the one configured for the form.

<a href="http://www.yourdomain.com/?gf_pdf=1&fid={form_id}&lid={entry_id}&template=example-template.php">View PDF</a>

<a href="http://www.yourdomain.com/?gf_pdf=1&fid={form_id}&lid={entry_id}&template=example-template.php&download=1">View PDF</a>

Automatically print when PDF is opened

Note: This feature isn’t compatible with the PDF security features or when sending PDFs via email.

Added in v3.4.0
To automatically force a print dialog to be displayed when the PDF is viewed or downloaded from your website you can append &print=1 to your PDF link.

In the example above you would add &print=1 to the PDF URL.

<a href="http://www.yourdomain.com/?gf_pdf=1&fid={form_id}&lid={entry_id}&template=example-template.php&print=1">View PDF</a>

How do I change the PDF size or create a landscape PDF?

You can change the default size of your PDF from A4 to a number of pre-defined sizes, including letter and legal. You can also control if the document is landscape or portrait.

Note: : PDF size presents include: A0 – A10, B0 – B10, C0 – C10, 4A0, 2A0, RA0 – RA4, SRA0 – SRA4, Letter, Legal, Executive, Folio, Demy and Royal
	
/* generate a PDF the size of US letter in landscape */
$gf_pdf_config[] = array(
    'form_id' => '1', 
    'pdf_size' => 'letter',
    'orientation' => 'landscape'
  );
 
/* generate a custom PDF (specified in millimeters) */
$gf_pdf_config[] = array(
    'form_id' => '1', 
    'pdf_size' => array(150, 250)
  );

I’m creating a custom template. How do I know the names of my fields in the $form_data array?

Append &data=1 to the end of your URL when viewing the PDF through the admin area.

When I try to view the PDF I get the error ‘The File is Damaged and could not be repaired’

This is usually caused when the server has error reporting on. You can verify this by opening up the PDF file in a text editor and seeing if there is any readable text/html showing. Turn error reporting off and make sure WP_DEBUG is set to false in your wp-config.php file.

Do I need Gravity Forms installed to use this plugin?

Yes. The plugin uses the data Gravity Forms captures to generate PDFs.

Haven’t purchased Gravity Forms? Purchase a license through Gravity Forms’ official website.

How large a PDF are you able to create/process?

It all depends on the amount of memory allocated to PHP. Given enough memory you can create/process as large a PDF as you need.