The gravityflowpdf_content filter is used to modify the contents the PDF Generator add-on defines via the step settings template before generating the PDF. 


Parameter Type Definition
$body Array The markup the template from step settings produced with current entry values.
$file_path Array Where the PDF will be generated upon successful completion of the step.
$entry Array The current entry array.
$step Gravity_Flow_Step The current step.


Example  - Add a custom heading above the PDF template content

add_filter( 'gravityflowpdf_content', 'sh_pdf_content_modify', 10, 4 );
function sh_pdf_content_modify( $body, $file_path, $entry, $step ) {
    $body = '<h1>Inserting a custom title before template content</h1>' . $body;
    return $body;


This code should be placed in the functions.php file of your active theme.