Keep up to date with Gravity PDF

  • This field is for validation purposes and should be left unchanged.
This is the legacy Gravity PDF v4 documentation which is NOT supported. Go to the latest documentation.
Jump To Section

Description #description

This action can be used to run a task or change a setting prior to the PDF being generated and saved for notifications. If you change the PDF settings on the fly, you should use the gfpdf_post_generate_and_save_pdf_notification action to clean up your filter.

Version #version

This action was introduced in Gravity PDF 4.5.

Parameters #parameters

$form | array
The Gravity Forms form array
$entry | array
The Gravity Form entry array
$settings | array
The current Gravity PDF settings array
#notification | array
The current notification being sent

Usage #usage

add_action( 'gfpdf_pre_generate_and_save_pdf_notification', function( $form, $entry, $settings, $notifications ) {
   add_filter( 'gfpdf_mpdf_class', 'prefix_modify_the_mpdf_object' );
}, 10, 4 );

add_action( 'gfpdf_post_generate_and_save_pdf_notification', function( $form, $entry, $settings, $notifications ) {
   remove_filter( 'gfpdf_mpdf_class', 'prefix_modify_the_mpdf_object' );
}, 10, 4 );

Source Code #source-code

This action is located in the notifications() method of /src/model/Model_PDF.php.

Signup for the latest Gravity PDF news, tips and updates

  • This field is for validation purposes and should be left unchanged.
Gravity PDF 40K Active Installs Celebration! Take 20% off any products with coupon 40KMILESTONE (this week only)Visit Store
+ +
Scroll To Top

Choose your currency:

Converted prices are for reference only - all orders are charged in $ Australian Dollars ($) AUD.
  • AUDAustralian Dollars ($)
  • USDUS Dollars ($)
  • CADCanadian Dollars ($)
  • EUREuros (€)
  • GBPPound Sterling (£)
  • NZDNew Zealand Dollar ($)
  • JPYJapanese Yen (¥)