(no subject)
- From: "Frank Fischer" <frank.fischer (at) digitalnomads.ch>
- Date: Wed, 22 Mar 2006 13:24:36 +0100
Hi
all
first thanks to
Paulo and Bruno for answering my previous question.
I have another
question related to underlined text.
I use
DirectContent and would like to write underlined text to a specific position.
For normal text i use:
PdfWriter writer =
PdfWriter.getInstance(document, new
FileOutputStream("test.pdf"));
document.open();
PdfContentByte cb
=
writer.getDirectContent();
cb.beginText();
BaseFont bf = BaseFont.createFont(BaseFont.HELVETICA, BaseFont.CP1252,
BaseFont.NOT_EMBEDDED);
cb.setFontAndSize(bf,
10);
cb.showTextAligned(PdfContentByte.ALIGN_LEFT, "text", 10, 10,
0);
Now i could not
find a way to make a BaseFont underlined. In the Font class, there is a related
method to underline the text, but i can not set Font with
cb.setFontAndSize().
Could please someone give a hint, how i can solve that
issue?
Thanks a
lot
Frank