It is indeed. Just use _pdf_serial in your pdf template
/*
* Makes Flamingo _serial_number work even in PDFs as _pdf_serial
*/
add_filter('wpcf7_posted_data', 'add_serial_number_as_posted_data', 10, 1);
function add_serial_number_as_posted_data($posted_data) {
$wpcf = WPCF7_ContactForm::get_current();
$submission = WPCF7_Submission::get_instance();
if($submission) {
$post_meta = get_post_meta( $wpcf->id(), '_flamingo', true );
$channel_id = isset( $post_meta['channel'] )
? (int) $post_meta['channel']
: wpcf7_flamingo_add_channel(
$contact_form->name(), $contact_form->title()
);
if ( $channel_id ) {
$serial = 1 + (int) Flamingo_Inbound_Message::count(
array( 'channel_id' => $channel_id )
);
// adds some zeroes in front of the serial
$serial = str_pad($serial, 4, "0", STR_PAD_LEFT);
}
if($serial) {
$posted_data['_pdf_serial'] = $serial;
}
}
return $posted_data;
}