The only way I can do this is to replace the _cm_ListView_pre_print() method with two alternative methods - _cm_ListView_print_before() and _cm_ListView_print_after(). See the attached file.
Here are some examples of both methods in use:
function _cm_ListView_print_before ($prev_row, $curr_row)
// allow extra rows to be created in List View
{
$output = array();
if (!empty($prev_row)) {
// row has changed
if (substr($prev_row['last_name'], 0, 1) != substr($curr_row['last_name'], 0, 1)) {
$this->pdf->AddPage();
} // if
} // if
$output[0]['pers_type_desc'] = 'before ' .$curr_row['person_id'];
return $output;
} // _cm_ListView_print_before
// ****************************************************************************
function _cm_ListView_print_after ($curr_row)
// allow extra rows to be created in List View
{
$output = array();
$output[0]['pers_type_desc'] = 'after ' .$curr_row['person_id'];
return $output;
} // _cm_ListView_print_after
As you can see this allows _cm_ListView_print_before() to call $this->pdf->AddPage() when the first character of the surname/last_name field changes.
NOTE: if your table class contains the old _cm_ListView_pre_print() method then this will be called in preference to the two new methods, so any code which uses the old method will still work and the new methods will not be called.
Try it out and tell me if it does what you want.