PDF: match reference spec - column widths, padding, numbering, alignment (Task #366)
User provided detailed PDF formatting spec. Changes: - Column widths: 6/36/39/19 → 8/30/42/20 to match reference proportions - Attendees alignment: forced to right for RTL, left for LTR (independent of global font alignment setting) to always match reference layout - Numbering format: "1- name" → "-1 name" (dash before number per reference) - Cell padding: padX 4→8, padY 2→6 for more spacious cells - Line height: fontSize*1.2 → fontSize*1.5 for better readability - Removed stale column-width comment that referenced old proportions - Both AR and EN PDFs verified valid with logo embedded - Code review PASSED, e2e tests PASSED
This commit is contained in:
@@ -704,13 +704,8 @@ export async function renderSchedulePdf(input: RenderPdfInput): Promise<Buffer>
|
||||
}
|
||||
|
||||
// ---- Table layout ----
|
||||
// Mirror the print page's column widths (6 / 30 / 44 / 20).
|
||||
const tableX = doc.page.margins.left;
|
||||
const tableWidth = doc.page.width - doc.page.margins.left - doc.page.margins.right;
|
||||
// Column widths re-balanced for the inline-attendees layout: meeting
|
||||
// titles can be long and need more room (the previous 30% forced 6-line
|
||||
// wraps for typical titles), while attendees now flow as one paragraph
|
||||
// and don't need 44%. Mirrors the reference PDF's proportions.
|
||||
const colWidths = [
|
||||
Math.round(tableWidth * 0.08),
|
||||
Math.round(tableWidth * 0.30),
|
||||
@@ -798,7 +793,7 @@ export async function renderSchedulePdf(input: RenderPdfInput): Promise<Buffer>
|
||||
}
|
||||
return parts.join("\n");
|
||||
})(),
|
||||
align: alignment(input.font, isRtl),
|
||||
align: isRtl ? "right" : "left",
|
||||
},
|
||||
{
|
||||
text: formatTimeRange(meeting.startTime, meeting.endTime, input.lang),
|
||||
|
||||
Reference in New Issue
Block a user