Version: 5
CAUTION
️Version 5 of Gravity PDF does not have full support for Gravity Forms 2.5 and you should consider upgrading to version 6. If you cannot, version 5 will still function but have a degraded admin experience. Support and bug/security fixes will be provided until 27 April 2023.gfpdf_mpdf_tmp_location
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
$path | string
- The path to the
tmp
folder.
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
This filter is located in the Model_Install::setup_template_location()
method of /src/model/Model_Install.php
.