In the case of Chunk, we can specify the text and font to be used. For example, we can set the bold font and font size in the case of Chunk. Although in the case of PdfContentByte I try to set the text in bold to
PdfContentByte cb = writer.DirectContent; cb.ShowTextAligned(PdfContentByte.ALIGN_CENTER,"INVOICE",386,596, 0);
using
cb.SetTextRenderingMode(PdfContentByte.TEXT_RENDER_MODE_FILL_STROKE);
But the text that is displayed is too Black, is there any way to render the text as Chunk text to use a font like
Font contentBoldHead = FontFactory.GetFont("Arial-BoldMT", 14, Font.BOLD);
in PdfContentByte.
Any suggestions really help.
Vinay source share