There's a bug in PdfGraphics2D that shows the text at the wrong position if
the text is rotated. The fix is:
public void drawString(String s, float x, float y) {
AffineTransform inverse = this.normalizeMatrix();
AffineTransform flipper = AffineTransform.getScaleInstance(1,-1);
inverse.concatenate(flipper);
inverse.translate(x, -y);
double[] mx = new double[6];
inverse.getMatrix(mx);
cb.beginText();
cb.setFontAndSize(baseFont, fontSize);
cb.setTextMatrix((float)mx[0], (float)mx[1], (float)mx[2],
(float)mx[3], (float)mx[4], (float)mx[5]);
cb.showText(s);
cb.endText();
}
Best Regards,
Paulo Soares
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions