How to use multiple fonts in a single line Using PdfContentByte
For Example:
pcb.ShowTextAligned(PdfContentByte.ALIGN_LEFT, "Some normal font" + " Bold Font" + " Some normal font",iXCoordinate, iYCoordinate, 0);
答案 0 :(得分:1)
You need a different version of the ShowTextAligned()
method to achieve this.
ColumnText.ShowTextAligned(pcb, Element.ALIGN_CENTER, phrase, iXCoordinate, iYCoordinate, 0);
The phrase
parameter is of type Phrase
and it can be composed of Chunk
objects with different fonts.