Skip to main content

inter_page_blank_count

Function inter_page_blank_count 

Source
pub fn inter_page_blank_count(
    this_lines: &[String],
    next_lines: &[String],
) -> usize
Expand description

Number of blank lines to insert between two adjacent PDF page outputs in the streaming reader.

Returns:

  • 0 when the two pages should read as one continuous block — a bulleted / numbered list whose sibling items span the page break, or a caption list (Plate N …, Figure 3.4 …, Table 2 …) whose entries straddle a page boundary.
  • 1 otherwise, as the normal paragraph separator.

Both this_lines and next_lines are the per-page standalone_lines produced by justify_pdf_page, with edge blanks already stripped. flat_lines calls this to decide the separator; rendered_line_count calls it to keep the per-page count in sync with what flat_lines produces, so cursor positioning and “jump to page” stay correct.