Version: 5
CAUTION
️Version 5 of Gravity PDF does not have full support for Gravity Forms 2.5 and you should consider upgrading to version 6. If you cannot, version 5 will still function but have a degraded admin experience. Support and bug/security fixes will be provided until 27 April 2023.gfpdf_include_product_styles
Description
Gravity PDF includes a global stylesheet which applies to all PDFs. This filter allows you to remove the product table styles for all or some of your PDFs.
Parameters
$active | boolean
- Whether to show or remove the default product table styles
$settings | array
- The current PDF settings being processed.
Usage
This snippet shows you how to display the default product table CSS for all PDFs:
add_filter( 'gfpdf_include_product_styles', function( $active, $settings ) {
return false;
}, 10, 2 );
This snippet shows you how to display the default product table CSS for a particular PDF:
add_filter( 'gfpdf_include_product_styles', function( $active, $settings ) {
/* Display the list field styles for a specific PDF */
if ( '51281289afj212' == $settings['id'] ) {
$active = false;
}
return $active;
}, 10, 2 );
Source Code
This filter is located in the /src/view/html/PDF/core_template_styles.php
file.