Keep up to date with Gravity PDF

  • This field is for validation purposes and should be left unchanged.
Gravity PDF v4 will receive bug fixes and security updates until October 4, 2019, however it's recommended you upgrade to v5 as soon as practical.
Jump To Section

Description #description

This action can be used to run a task or change a setting prior to the PDF being generated for viewing or downloading, either via a shortcode, merge tag or from the admin area.

Version #version

This action was introduced in Gravity PDF 4.5.

Parameters #parameters

$entry_id | int
The Gravity Forms Entry ID
$pdf_id | string
The Gravity PDF Settings ID
$action | string
Either view or download

Usage #usage

add_action( 'gfpdf_pre_view_or_download_pdf', function( $entry_id, $pdf_id, $action ) {
   add_filter( 'gfpdf_mpdf_class', 'prefix_modify_the_mpdf_object' );
}, 10, 3 );

Source Code #source-code

This action is located in the process_pdf_endpoint() method of /src/controller/Controller_PDF.php.

Signup for the latest Gravity PDF news, tips and updates

  • This field is for validation purposes and should be left unchanged.
Scroll To Top

Choose your currency:

Close
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 (¥)