Keep up to date with Gravity PDF

  • This field is for validation purposes and should be left unchanged.
Jump To Section

Description #description

By default mPDF temporary files are stored in the system temporary directory. This location was chosen to work around restrictions preventing the font cache being saved to disk in public folders on some hosting providers.

Parameters #parameters

$path | string
The path to the tmp folder.

Usage #usage

The following snippet shows you how you can move the directory to a different location:

add_filter( 'gfpdf_mpdf_tmp_location', function( $path ) {
     $data = GPDFAPI::get_data_class();
     return $data->template_tmp_location . 'mpdf';
}, 10 );

Once you’ve verified the filter works correctly you should manually remove the old directory.

Source Code #source-code

This filter is located in the Model_Install::setup_template_location() method of /src/model/Model_Install.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 (¥)