fix: increase edge line count to catch form column headers as repeated content

Bumps EDGE_LINE_COUNT from 3 to 4 to strip repeated form column headers
that sit just inside the page margin (4th-from-edge Y position).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Abimael Martell
2026-03-03 00:14:47 -08:00
co-authored by Claude Opus 4.6
parent 7b6bb69feb
commit eca2db119c
2 changed files with 6 additions and 5 deletions
+3 -2
View File
@@ -214,8 +214,9 @@ pub(crate) fn strip_repeated_lines(lines: Vec<TextLine>, page_count: u32) -> Vec
// A line is in the page margin if it's among the first or last N distinct
// Y positions on that page. This is more robust than a percentage-based zone
// because it catches actual edge lines regardless of how much content fills
// the page. N=3 accommodates multi-line headers/footers (e.g., nav bar + title).
const EDGE_LINE_COUNT: usize = 3;
// the page. N=4 accommodates multi-line headers/footers and repeated form
// column headers that sit just inside the page margin.
const EDGE_LINE_COUNT: usize = 4;
/// Returns true if the line is among the first or last N distinct Y positions
/// on its page.
+3 -3
View File
@@ -33,19 +33,19 @@ Date Date **a. Tips received**
**b. Credit card tips c. Tips paid out to d. Names of employees to whom you**
tips of directly from customers received other employees paid tips recd. entry and other employees 1 2 3 4 5 **Subtotals** **For Paperwork Reduction Act Notice, see Instructions on the back of Form 4070. Page 1**
received other employees paid tips recd. entry and other employees
recd. entry and other employees
7 8 9 10 11 12 13 14 15 **Subtotals**
**Page 2**
received other employees paid tips recd. entry and other employees
recd. entry and other employees
17 18 19 20 21 22 23 24 25 **Subtotals**
**Page 3**
received other employees paid tips recd. entry and other employees
recd. entry and other employees
27 28 29 30 31 **Subtotals** **from pages** **1, 2, and 3** **Totals**