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.
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.
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' );
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:
Create a new page in WordPress and tell Gravity Forms to redirect the user to the new page with the form and lead id in the URL once they have completed filling out a form. Create a custom page in your active theme and use the $_GET to build the PDF URL.
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.
/* 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) );
Append &data=1 to the end of your URL when viewing the PDF through the admin area.
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.
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. Or, you can purchase an unofficial Developers key through us at 50% the retail price.
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.