diff --git a/artifacts/api-server/src/lib/pdf-renderer.ts b/artifacts/api-server/src/lib/pdf-renderer.ts index 88e36907..3fc9e31a 100644 --- a/artifacts/api-server/src/lib/pdf-renderer.ts +++ b/artifacts/api-server/src/lib/pdf-renderer.ts @@ -712,24 +712,20 @@ export async function renderSchedulePdf(input: RenderPdfInput): Promise // 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.06), - Math.round(tableWidth * 0.36), - Math.round(tableWidth * 0.39), - 0, // last col (Time) absorbs rounding ≈ 19% — wide enough to keep - // a `HH:MM-HH:MM` range on a single line in both languages - // without stealing room from the Attendees column. + Math.round(tableWidth * 0.08), + Math.round(tableWidth * 0.30), + Math.round(tableWidth * 0.42), + 0, ]; colWidths[3] = tableWidth - colWidths[0] - colWidths[1] - colWidths[2]; const headerLabels = isRtl - ? // RTL: visually right-to-left ordering matches the schedule's - // Arabic layout (#, Meeting, Attendees, Time becomes Time first). - [input.labels.time, input.labels.attendees, input.labels.meeting, input.labels.no] + ? [input.labels.time, input.labels.attendees, input.labels.meeting, input.labels.no] : [input.labels.no, input.labels.meeting, input.labels.attendees, input.labels.time]; const headerWidths = isRtl ? [...colWidths].reverse() : colWidths; - const cellPadX = 4; - const cellPadY = 2; - const lineHeight = input.font.fontSize * 1.2; + const cellPadX = 8; + const cellPadY = 6; + const lineHeight = input.font.fontSize * 1.5; function drawHeader(): number { const headerHeight = lineHeight + cellPadY * 2; @@ -794,7 +790,7 @@ export async function renderSchedulePdf(input: RenderPdfInput): Promise } else { personIdx += 1; const t = a.title?.trim(); - currentGroup.push(`${personIdx}- ${name}${t ? ` (${t})` : ""}`); + currentGroup.push(`-${personIdx} ${name}${t ? ` (${t})` : ""}`); } } if (currentGroup.length > 0) { @@ -802,7 +798,7 @@ export async function renderSchedulePdf(input: RenderPdfInput): Promise } return parts.join("\n"); })(), - align: "center", + align: alignment(input.font, isRtl), }, { text: formatTimeRange(meeting.startTime, meeting.endTime, input.lang),