Tuesday, 15 June 2010

node.js - Is there a way to make a fragment of text within a line bold in nodejs pdfkit? -



node.js - Is there a way to make a fragment of text within a line bold in nodejs pdfkit? -

node-pdfkit http://pdfkit.org/index.html

i using nodejs pdfkit generate pdf. want able bold or italic individual words in line. looks pdfkit doesn't back upwards this, wondering if had done similar?

what useful phone call doc.text function, have document retain it's x position, following.

doc.text('some words '); doc.font('helvetica-oblique'); doc.text('italic'); doc.font('helvetica'); doc.text(' remaining words');

and see output:

some words italic remaining words.

right it's outputting 1 line per text function.

anyone know way this?

please see: can mix font weights in same paragraph when using pdfkit?

pdf.text('hello ', left, 200, { //here is, linebreak : false }).font(bold).text('world!');

node.js pdf pdf-generation

No comments:

Post a Comment