mirror of
https://github.com/foliojs/pdfkit.git
synced 2025-12-08 20:15:54 +00:00
The following example adds text with three sections (part1, part2, part3) in different fonts and colors.
doc.font('Helvetica', 13)
.text(part1, 100, 300, { continued: yes, indent: 50 })
.fillColor('red')
.text(part2, { indent: 50, continued: yes })
.font('Times', 13)
.fillColor('green')
.text(part3)