gfpdfe_pre_render_pdf

The Gravity PDF gfpdfe pre render pdf hook.

Description

apply_filters( 'gfpdfe_pre_render_pdf', (unknown) $this_mpdf, (unknown) $this_entry_form_id, (unknown) $this_entry_id, (unknown) $this_settings, (string) $var, (string) $this_get_filename ); 

Parameters (6)

0. $this_mpdf (unknown)
The this mpdf.
1. $this_entry_form_id (unknown)
The this entry form id.
2. $this_entry_id (unknown)
The this entry id.
3. $this_settings (unknown)
The this settings.
4. $var (string) => ''
The var.
5. $this_get_filename (string)
The this get filename.

Usage

To run the hook, copy the example below.
  1. $this_mpdf = apply_filters( 'gfpdfe_pre_render_pdf', $this_mpdf, $this_entry_form_id, $this_entry_id, $this_settings, $var, $this_get_filename ); 
  2.  
  3. if ( !empty( $this_mpdf ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the gfpdfe_pre_render_pdf callback 
  2. function filter_gfpdfe_pre_render_pdf( $this_mpdf, $this_entry_form_id, $this_entry_id, $this_settings, $var, $this_get_filename ) { 
  3. // make filter magic happen here... 
  4. return $this_mpdf
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'gfpdfe_pre_render_pdf', 'filter_gfpdfe_pre_render_pdf', 10, 6 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'gfpdfe_pre_render_pdf', 'filter_gfpdfe_pre_render_pdf', 10, 6 ); 

Defined (1)

The filter is defined in the following location(s).

/src/helper/Helper_PDF.php  
  1. $this->mpdf = apply_filters( 'gfpdfe_pre_render_pdf', $this->mpdf, $this->entry['form_id'], $this->entry['id'], $this->settings, '', $this->get_filename() );