diff --git a/backend/src/services/pdfGenerationService.ts b/backend/src/services/pdfGenerationService.ts index ec73d6c..483d0c1 100644 --- a/backend/src/services/pdfGenerationService.ts +++ b/backend/src/services/pdfGenerationService.ts @@ -845,14 +845,16 @@ class PDFGenerationService { // Add section content Object.entries(section.data).forEach(([key, value]) => { if (value && typeof value !== 'object') { + // Normalize inline numbered lists to newline-separated + const normalizedValue = String(value).replace(/\.\s+(\d+)\)\s/g, '.\n$1) '); doc.fontSize(10) .font('Helvetica-Bold') - .text(`${this.formatFieldName(key)}:`, { continued: true }); - + .text(`${this.formatFieldName(key)}:`); + doc.fontSize(10) .font('Helvetica') - .text(` ${value}`); - + .text(normalizedValue, { lineGap: 2 }); + doc.moveDown(0.3); } });