Let’s start with the breaking changes:
- Minimum PHP version is now 5.6+
- Minimum Gravity Forms version is 2.3.1+
- Minimum WordPress version is 4.8+.
The PHP version has been increased to accommodate version 7.0 of the mPDF library (what we use to generate PDFs), which is fully compatible with PHP7.2 – no more PHP notices / warnings, yay 🎆 – and a number of bugs related to the Table of Contents feature have also been resolved. The minimum Gravity Forms version bump has allowed us to remove a lot of legacy code, as well as introduce a new feature: PDF background processing (more on that later). While the WordPress version bump has given us access to newer APIs which we will take advantage of in future 5.x releases.
The installation process now has an extra step because we’ve decoupled the PDF fonts from the plugin. Zipped up the plugin now only weighs 4.6MB – a 21MB reduction over version 4. After the initial plugin activation you’ll be prompted to install the fonts using the Core Font Installer. This only needs to be done once and the installed fonts will survive plugin updates. Decoupling the fonts solves a number of problems, but the biggest issue fixed is for users on low-resource shared hosting that had trouble with one-click updates from WordPress.org.
Out of the box Gravity PDF will generate PDFs and attach them to your Gravity Forms Notifications while the user is submitting the form. Depending on the PDF complexity and number of documents to create, this can mean the user is waiting a considerable amount of time for these processes to complete before seeing your Confirmation page. Now, you can opt into PDF Background Processing (located in the global PDF settings) to handle the generation and sending of the PDFs in a background task. Once enabled, you’ll see a noticeable drop in the time between clicking “submit” and seeing the confirmation page. This feature also applies to Gravity Forms Resend Notifications feature. If you wanted to re-send 250 notifications with a PDF attached in version 4 you’d quickly run into timeout or memory issues. With PDF Background Processing enabled, those 250 notifications and associated PDFs will be queued up, generated and emailed in the background.
We’ve left this functionality off by default because some websites cannot trigger the background processes automatically. You can check if your website supports this feature by looking for “Background Tasks” on the Gravity Forms System Status page. As this feature matures, we put in place more checks and balances for background processing, and create better documentation, we’ll enable this feature by default for new installations.
Aside from Background Processing and Mpdf v7 with full PHP7.2 support, we’ve a number of improvements for developers. We’ve updated all PHP/JS libraries to their latest versions. Most notable of these are React and Immutable.js, which were re-licensed to MIT last September. To assist with debugging, if a PDF generation error occurs while an administrator loads a PDF the error message will now display the PHP file and line number that error occurred. We also removed the legacy
/resources/ directory that contained almost 3MB of images and was used in example PDFs that shipped with version 3.
If you rely on Gravity PDF to run your business, or just want to try it out, we’d really appreciate it if you could test v5.0.0-RC1 in a staging environment and provide appropriate feedback via our support system, or on GitHub. We do NOT recommend running v5 in a production environment.
If you’ve purchased a premium template from our online store and want to test it with v5, just double check you’re running the latest version (we pushed out compatibility updates this month for them all). If not, download the latest version from your Account page and install via the PDF Template Manager.
- Breaking Change: Bump minimum version of Gravity Forms from 1.9 to 2.3.1+
- Breaking Change: Bump WordPress minimum version from 4.4 to 4.8+
- Breaking Change: Bump the PHP minimum version from 5.4 to 5.6+
- Breaking Change: Decouple the fonts from the plugin.
- Feature: Option to enable background Process PDFs during form submission and while resending notifications. Requires background tasks are enabled [GH#713]
- Feature: Include a Core Font Downloader in the PDF Tools to install all core PDF fonts during the initial installation [GH#709]
- Feature: Updated ReactJS to v16 which uses MIT license [GH#701]
- Feature: Add PHP7.2 Support [GH#716]
- Feature: Remove “Common Problems” link from PDF Help page and include “Common Questions” [GH#752]
- Dev: Update all Packagist-managed JS files to the latest version [GH#701]
- Dev: Upgrade Mpdf to version 7.1 (accessed directly via `\Mpdf\Mpdf` and aliased to `mPDF` for backwards-compatibility) [GH#787]
- Dev: Conditionally run `Model_PDF::maybe_save_pdf()` when Background Processing disabled [GH#713]
- Dev: Use wp_enqueue_editor() to load up the WP Editor assets [GH#754]
- Dev: Include file/line number when PDF error is thrown [GH#803]
- Dev: Remove the legacy /resources/ directory [GH]
- Bug: Fix Chosen Drop Down display issue when WordPress using RTL display [GH#698]