Gravity PDF 6.0 is a major update which has an overhauled UI to match the changes found in Gravity Forms 2.5. A bunch of new features have been added to this release, with the standouts being:
- A brand new Font Manager
- Support for Drag and Drop Columns in Core/Universal PDFs
- Integration with Export Entries
- Integration with the Webhook add-on
- New modifiers for PDF Merge Tags
To future-proof the plugin, the minimum version requirements for PHP, WordPress and Gravity Forms has been increased. And legacy code and settings from version 3 have been removed.
This document presents all the pertinent info you need to upgrade to version 6. It also provides details about potential issues you might run into, how to fix, and how to downgrade back to version 5 if you find a problem you cannot resolve.
Before you Begin
Because of the large changes found in both Gravity Forms 2.5 and Gravity PDF 6.0, you are strongly encouraged to test the updates in a staging environment first. Doing so will mean you don't negatively affect your production site should you run into problems. Some (but not all) web hosting providers include tools to quickly create a clone of your production site. Check with your host to see if this feature is available to you.
You are strongly encouraged to take a full backup of your production site before completing the upgrade. That way, if something goes wrong, you can quickly restore your site from the backup. Your hosting provider should include these tools.
New Software Requirements
Both the server and software requirements have changed. Gravity PDF 6.0 requires the following:
- PHP 7.3+
- WordPress 5.3+
- Gravity Forms 2.5+
Verify you meet these requirements by viewing the System Status page, which can be accessed from the WP Admin menu
Forms -> System Status. If you aren't running a compatible version of PHP and aren't sure how to upgrade, contact your web hosting provider. If you're running an older version of WordPress or Gravity Forms, use WordPress's one-click update feature.
If you are unable to meet the v6 minimum software requirements, Gravity PDF will continue supporting users on v5 with bug and security fixes until 27 April 2023.
New User Interface
Gravity Forms 2.5 sees a completely redesigned admin experience. So it doesn't stick out like a sore thumb, Gravity PDF has been updated to match the new user interface.
A refined look see settings grouped more logically, with better keyboard and screen reader support. The horizontal submenu structure stays the same.
Form PDF Settings
Instead of being split into tabs, the PDF settings are now grouped into sections. To aid you in managing the settings, an Add/Update button is included below each section, and you can hide sections by selecting the section title or associated toggle.
The location of the PDF view/download link hasn't changed, but the submenu that appears when you've multiple PDFs configured has got a makeover. It will now display more consistently, is keyboard and screen reader accessible, and can handle a big list of PDFs without running off the screen.
It's now easier than ever to access your PDFs. The PDF links have been moved from the Entry widget to a dedicated PDFs widget.
The Gravity PDF System Status information has been moved (and expanded upon) from the Global Settings pages to Gravity Forms dedicated System Status page.
The uninstaller was moved from the Tools Global Settings page to Gravity Forms dedicated uninstall page.
A lot of new features and refinements went into this release. Below is the big ticket items you should be aware of.
Drag and Drop Columns
Gravity Forms have revamped their Form Builder and it now includes Drag and Drop column support. To support this feature individual templates have to be updated with new CSS.
The Core templates Gravity PDF ships have all been updated to support Drag and Drop columns. If you've attempted to create a custom template in the past and run the Setup Template Tool your Core template overrides will be out of date and need to be updated (or deleted). You can check if you're affected in the Gravity PDF System Status section.
Should you be using an out-of-date version of the Core templates, there are two ways you can fix the problem:
- If you haven't made any modifications to the Core template(s), you can delete those template files via the PDF Template Manager.
- If you did modify a Core template, you will need to add this CSS to your template in the PDF Working Directory.
The following premium templates have been updated to be compatible with Drag and Drop columns:
If you plan to utilise this feature you'll want to install the latest version from GravityPDF.com. Active license holders can download the latest version of a template by logging into your GravityPDF.com account and navigating to the Downloads or Access Passes page (depending on your purchase). If your license has lapsed you will need to purchase a new one.
Once you've downloaded the latest template zip file install it via the PDF Template Manager.
Nested Forms Column Support
When using Gravity Perks Nested Forms add-on with Gravity PDF, the generated PDF documents now supports Drag and Drop columns when displaying those Nested Forms in Core/Universal templates.
We threw the old Font Manager out the window, and built an intuitive, accessible interface for searching, installing, updating, and deleting custom fonts for use in PDFs. All the quirky bugs with the old Font Manager have been squashed, significant improvements were made to the rendering of fonts supporting Arabic, Hebrew, Bengali, Thai (or other complex scripts), and you can install and select new fonts in-context while configuring new PDFs on your form.
Merge Tag Modifiers
The PDF Merge Tag has been significantly improved thanks to the addition of modifiers that'll change the behaviour of the generated PDF URL.
- Show Download PDF URL
- Show Print Dialog on open
- Signed PDF URL
- Signed PDF URL with 2 week timeout
Modifiers can also be used together, in any order:
- Signed + Download URL
- Signed + Download + Print Dialog URL
- Print Dialog + Signed URL
- Download + Print Dialog + Signed URL
The powerful Webhooks Add-On is now supported by Gravity PDF, so you can send your PDF URLs to external services. This works really nicely with the new PDF merge tag modifiers feature, so that you've greater control over what kind of PDF URL you want to include with the webhook.
Breaking Changes / Removed Components
Along with the bump in the minimum software requirements, below is a list of changes to the Gravity PDF plugin that may affect some users.
Always Save PDF
Because Gravity PDF doesn't permanently store PDFs on disk, this has always been a confusion setting for users. The reason it existed was so the
gfpdf_post_save_pdf hook would always be triggered on form submission, even if no notifications were configured.
We've removed the setting from the UI entirely, and will determine whether to temporarily save the PDF to disk based on if an action is hooked into
gfpdf_post_save_pdf (or if being included as a notification attachment).
Setup Template Tool
The Setup Template tool has been removed from Gravity PDF (previously located on the PDF Tools page). This feature was used by developers to automatically copy all Core templates to the PDF Working Directory so they could be modified, and it was the recommended first step for creating a custom PDF template. The problem with this is most (if not all) the files copied over never got changed, and when an update is made to the Core templates you're stuck with an outdated version and need to manually intervene (as is the case with Drag and Drop Column support for this release).
Going forward, developers will need to manually copy the individual Core template(s) they plan to modify using an (S)FTP client, or a hosts File Manager (exactly like theme template overrides). A warning prompt has been added to Gravity PDF's System Status section that'll inform you if you've an outdated template override that needs to be manually updated.
Removed Legacy CSS File
The v3 legacy CSS file
/initialisation/template.css has been removed from the plugin. This file was referenced by v3 templates, which were deprecated in v4 and users were encouraged to upgrade to one of the Core templates. If you are still using one of the v3 templates, now is the time to make the switch. If your custom template is loading/referencing
/initialisation/template.css you should remove that line, or, if you rely on those styles, add them directly in your template file.
Removed Legacy v3 Migration Code
The v3 to v4 migration code has been removed from Gravity PDF. If you are one of the few still running Gravity PDF v3 and want to upgrade, you should use the WP Rollback plugin to roll forward through each major version and follow the respective migration guides (v3 to v4 and v4 to v5).
Changed Namespace for Composer Packages
Gravity PDF includes a number of third party libraries for its functionality, which is managed through Composer. A problem with this approach is when another plugin includes a different version of the same library, and this can cause unexpected bugs. To prevent this, we've moved all Composer-managed libraries to a new namespace. For most users this won't cause any problems when you upgrade (even if you are using a custom template).
If you've developed custom functionality for Gravity PDF and needed to directly access any of the following namespaced classes, you'll need to update your code:
If you've integrated the commercial FPDI PDF-Parser from Setasign with Gravity PDF, you'll need to update your code to support Gravity PDF's new Composer namespaces.
The HTML mark-up used on all Gravity PDF pages in the WordPress Admin area has been updated to match Gravity Forms (as much as possible). If you've written custom CSS to change the look and feel of one of these pages, you'll likely need to update your code to support this new structure.
The following files have been removed from Gravity PDF and may affect developers who've manually included or used functionality from them:
Removed Class Methods
The following public class methods have been removed from Gravity PDF and may affect developers who've used them in their custom code:
Model_Settings::remove_font_file() // Use GPDFAPI::delete_pdf_font()
Model_Settings::is_font_name_valid() // Moved to Model_Custom_Fonts::check_font_name_valid()
Model_Settings::install_fonts() // Moved to Model_Custom_Fonts::add_font()
Model_Settings::save_font() // Use GPDFAPI::add_pdf_font()
Model_Settings::delete_font() // Use GPDFAPI::delete_pdf_font()
Model_Settings::process_font() // Use GPDFAPI::add_pdf_font()
Model_Settings::get_font_id_by_name() // Font names no longer linked to IDs.
View_Settings::get_avaliable_tabs(); // Renamed View_Settings::get_available_tabs()
Modified Class Method Signatures
The following class method signatures have been changed and may affect developers who've written code that calls them:
GPDFAPI::delete_pdf_font( $font_name ) -> GPDFAPI::delete_pdf_font( $font_id )
Controller_Save_Core_Fonts::__construct( Helper_Abstract_View $view, LoggerInterface $log, Helper_Data $data, Helper_Misc $misc ) -> Controller_Save_Core_Fonts::__construct( LoggerInterface $log, Helper_Data $data, Helper_Misc $misc )
Controller_System_Report::__construct( $allow_url_fopen ) -> Controller_System_Report::__construct( Helper_Abstract_Model $model, Helper_Abstract_View $view )
Model_Install::__construct( Helper_Abstract_Form $gform, LoggerInterface $log, Helper_Data $data, Helper_Misc $misc, Helper_Notices $notices, Helper_Pdf_Queue $queue ) -> Model_Install::__construct( LoggerInterface $log, Helper_Data $data, Helper_Misc $misc, Helper_Notices $notices, Helper_Pdf_Queue $queue, Model_Uninstall $uninstall )
Model_Mergetags::__construct( Helper_Abstract_Options $options, Model_PDF $pdf, LoggerInterface $log, Helper_Misc $misc ) -> Model_Mergetags::__construct( Helper_Abstract_Options $options, Model_PDF $pdf, LoggerInterface $log, Helper_Misc $misc, Helper_Interface_Url_Signer $url_signer )
If something broke during the update you can rollback to v5 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 v6, we recommend installing the WP Rollback plugin. Once installed, click the Rollback link on the Gravity PDF row on the plugin's page, then select the latest stable v5 release and rollback.
Help and Support
If you run into trouble during the upgrade, get in touch with our friendly support team, and we will be happy to assist you.