Keep up to date with Gravity PDF

Gravity PDF 5.0 is a major update that sees the minimum version requirements for PHP, WordPress and Gravity Forms increased. We have updated the PDF library we use (mPDF) from v6 to v7, we’ve removed a legacy directory used in v3 and we no longer bundle the PDF fonts directly in the plugin.

Our team realises many users may be locked into using Gravity PDF v4 for the foreseeable future, which is why we will continue providing security and compatibility patches until October 4 2019 (12 months after Gravity PDF v5 was released).

Both the server and software requirements have changed. Gravity PDF 5.0 requires the following:

PHP 5.6+ (PHP 7.1+ is recommended)

WordPress 4.8+

Gravity Forms 2.3.1+

Verify you meet these requirements by viewing the System Status page, which can be accessed from the WP Admin menu Forms -&gt; System Status. If you aren’t running a compatible version of PHP, contact your host and ask them how you can upgrade. If you’re running an older version of WordPress or Gravity Forms, use WordPress’s one-click update feature before updating Gravity PDF.

The library we use to generate PDF documents is called mPDF and it also got a major version bump. Our team has worked closely with the mPDF developers over the past 12 months to ensure there’s little (if any) differences to PDFs generated using Gravity PDF v4 and v5 when using the standard templating functionality. However, any developers who are accessing the mPDF library directly – either in a custom template or using a filter – may need to modify their code. Notable changes in mPDF v7 include:

The /resources/ directory, which contained assets (images and CSS) used in v3 example template files, has been removed. If your custom template(s) relied on files in this directory you’ll need to move them to the PDF Working Directory and update your template(s).

Before you begin, you should take a full backup of your website before attempting the update. Better yet, test the update in a staging environment so you can check for any problems without affecting your live website.

To verify there have been no visual changes in your PDF, it’s helpful to download a number of PDFs before beginning the update. This will allow you to compare them to v5’s PDFs once successful. Just make sure you write down which entries the PDFs come from.

If you upgraded from v4.3+, the software automatically copied the fonts to the PDF Working Directory’s font subfolder. However, mPDF v7 includes additional fonts which support even more languages out of the box. To take advantage of this, it is recommended to run the Core Font Installer. This feature is available from the Tools tab of the Global PDF settings. If you upgraded from v4.2 or below you’ll be prompted to run the Core Font Installer automatically. Click the Install Core Fonts button to start the process.

If something broke during the v5 update all is not lost and you can rollback to v4 without much difficulty. First, if you are experiencing the “white screen of death” please follow these instructions to help resolve the problem. If you still have full control over your website, but there’s some compatibility issues with v5, we recommend installing the WP Rollback plugin. With little effort on your behalf you can downgrade from v5 to v4. Once installed, just click the Rollback link on the Gravity PDF row on the plugin’s page, then select the latest stable release of v4 and rollback.