Last active
April 11, 2021 22:53
-
-
Save jakejackson1/64c470e4dee540fbda5b8814a4cb1d36 to your computer and use it in GitHub Desktop.
Make page numbering show in upper roman for all Gravity PDF documents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'gfpdf_mpdf_class_config', function( $config ) { | |
$config['defaultPageNumStyle'] = 'upper-roman'; | |
return $config; | |
} ); | |
add_filter( 'gfpdf_mpdf_class_config', function( $config, $form, $entry, $settings ) { | |
if ( $form['id'] === 1 ) { | |
$config['defaultPageNumStyle'] = 'upper-roman'; | |
} | |
return $config; | |
}, 10, 4 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment