Description
The gravityflowpdf_mpdf_config filter allows customization of the mPDF initialization properties to be overridden. See mPDF configuration declaration documentation for more details of what can be customized through it.
Parameters
Parameter | Type | Definition |
---|---|---|
$mpdf_config | Array | The mPDF initialization properties. |
$entry | Boolean | The current entry array or false. |
$step | Step | The current step or false. |
Examples
Make all PDFs generate in landscape mode
1 2 3 4 5 6 | add_filter( 'gravityflowpdf_mpdf_config' , 'jo_mpdf_config_landscape' , 10, 3 ); function jo_mpdf_config_landscape( $mpdf_config , $entry , $step ) { $mpdf_config [ 'orientation' ] = 'L' ; return $mpdf_config ; } |
Placement
This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.
See also the PHP section in this article: Where Do I Put This Code?