Fixes a single set of column widths up front — necessary for a grouped table, where each
group is a separate autoTable (letting each one compute its own auto widths would make
columns misalign across groups).
No need to distribute widths exactly like AutoTable's internal algorithm does —
as long as every segment uses the same set of values, the column lines stay aligned across the whole report;
text wider than what was measured, AutoTable wraps on its own (the row gets taller, it doesn't overflow)
Parameters
doc: jsPDF
rows: readonly (readonlystring[])[]
userWidths: readonly (number|undefined)[]
contentWidth: number
fontSize: number = AUTOTABLE_FONT_SIZE
must match the fontSize the body actually uses (typography.detailRow once resolved —
it used to be hardcoded to 10, which measured wrong whenever a user overrode typography)
Fixes a single set of column widths up front — necessary for a grouped table, where each group is a separate autoTable (letting each one compute its own auto widths would make columns misalign across groups).
No need to distribute widths exactly like AutoTable's internal algorithm does — as long as every segment uses the same set of values, the column lines stay aligned across the whole report; text wider than what was measured, AutoTable wraps on its own (the row gets taller, it doesn't overflow)