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

Currently, if a PDF has been generated during the PHP execution it won’t be generated a second time (refer to our security policy for more information on how and when PDFs are saved to the filesystem). This occurs most often when sending the PDF via email to multiple parties. Use this filter to disable this cache and regenerate the PDF each time. Warning: This could cause long page load times for the end user, or timeouts.

Version #version

This filter was introduced in Gravity PDF 4.2.

Parameters #parameters

$enable | boolean
Return true to bypass the PDF cache
$pdf | Helper_PDF
This class does the heavy lifting for PDF generation

Usage #usage

Use the following code to enable the field:

add_filter( 'gfpdf_override_pdf_bypass', function( $enable, $pdf ) {
    return true;
}, 10, 2 );

Source Code #source-code

This filter is located in the Model_PDF::process_and_save_pdf() method in /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 (¥)