gravityflowpdf_mpdf_config

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

ParameterTypeDefinition
$mpdf_configArrayThe mPDF initialization properties.
$entryBooleanThe current entry array or false.
$stepStepThe current step or false.

Examples

Make all PDFs generate in landscape mode

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?