gravityflowpdf_mpdf_config

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 bool|Array The current entry array or false.
$step bool|Gravity_Flow_Step The current step or false.

Examples

Example 1 - Make all PDFs generate in landscape mode?

add_action( '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 should be placed in the functions.php file of your active theme or in a custom functions plugin.