Node -pdfkit http://pdfkit.org/index.html
I am using nodejs pdfkit to create pdf. I want bold or italicized individual words in a string. Pdfkit doesn't seem to support this, so I was wondering if anyone had done something like this?
What would be really useful is to call the doc.text function, but save it at position x so that I can do the following.
doc.text('some words then '); doc.font('Helvetica-Oblique'); doc.text('italic'); doc.font('Helvetica'); doc.text(' then the remaining words');
and see the result:
some words then italics, then the remaining words.
Now it prints one line per text function.
Does anyone know a good way to do this?
source share