I create a Font object that is bold, italic and underlined. After that I have
to create a BaseFont object with the Font object, because I would like to
write this content into a Template. I create the Template and call the method
setFontAndSize with the created BaseFont object. The error is, that the output
is not bold, italic and underlined.
Any ideas what I could do?
Code example:
Font font = FontFactory.getFont("Arial", BaseFont.IDENTITY_H,
BaseFont.EMBEDDED, 10, Font.NORMAL, Color.RED);
font.setStyle(Font.BOLD);
font.setStyle(Font.ITALIC);
font.setStyle(Font.UNDERLINE);
PdfTemplate tpl = tplObj.getTemplate();
BaseFont basefont = font.getBaseFont();
tpl.beginText();
tpl.setFontAndSize(basefont, fontSize);
tpl.setColorFill(Color.BLACK);
tpl.setTextMatrix(0, 0);
tpl.showText(pdfWriter.getPageNumber());
tpl.endText();
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/