Hello,
a problem I encountered when using templates to add text to an absolute
location - when I use the function defined below, it somewhy cuts
everything below the base line. That is "g", "j", commas etc. are only
shown partly. Is that a bug or a feature?
Thanks,
Ilja
--- function body ---
private void addTextToAbsoluteLocation(String text, float size,
float x, float y ) throws DocumentException, IOException {
PdfContentByte cb = writer.getDirectContent();
PdfTemplate template = cb.createTemplate(20, 20);
BaseFont bf = someFont.getBaseFont();
float width = bf.getWidthPoint(text, size);
template.beginText();
template.setFontAndSize(bf, size);
template.setWidth(width);
template.showText(text);
template.endText();
cb.addTemplate(template, x, y);
}
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
iText-questions mailing list
iText-questions@(protected)
https://lists.sourceforge.net/lists/listinfo/itext-questions