I looked through the documentation and found the following ways to add text:
var font = pdfWriter.getFontForFile('./arial.ttf');
var textOptions = {font:font,size:11,colorspace:'gray',color:0x00};
cxt.writeText('Paths',250,250,textOptions);
//OR
cxt.BT();
cxt.k(0,0,0,1);
cxt.Tf(font,11);
cxt.Tm(1,0,0,1,250,250);
cxt.Tj("Hello World");
cxt.ET();
However both of these method require PDFUsedFont which needs to be read from a file.
Is there a way to use the font that's already in PDF? For example using the Object having PDFName of 'Font' which is retrieved via:
I looked through the documentation and found the following ways to add text:
However both of these method require PDFUsedFont which needs to be read from a file.
Is there a way to use the font that's already in PDF? For example using the Object having PDFName of 'Font' which is retrieved via:
Thanks in advance.