Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Make page numbering show in upper roman for all Gravity PDF documents
<?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