Eric Summkeller wrote:
> 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?

As you (should) know Arial is a /font family/ consisting
of /different fonts/: Arial, Arial Bold, Arial Italic,...

In other words: the font Arial Bold and Arial Italic are
two different fonts, therefore you need two different
BaseFont instances.

'Underline' is not a property of a font (there's no font
program with underlined glyphs), so you have to stroke the
lines yourself.

This is all explained in the book.

Of course, there might be a more elegant solution.
If you don't understand my answer so far, you could
continue using the building blocks such as Phrase,
Chunk, Paragraph,... you are familiar with, and add
them at some absolute position using ColumnText.

This way, you don't have to worry about BaseFont.
You'll read more about ColumnText in chapter 7 of the book.
-- 
This answer is provided by 1T3XT BVBA

-------------------------------------------------------------------------
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/

Reply via email to