Hi all,
I'm placing text on a PdfContentByte.
When using Itext version 1.00 all goes well. If I use 1.01 the I get the following error when opening the PDF:
Illegal operation 'Q' inside text object.
This is only the case when I run the code on a Weblogic 6.1 under Solaris
The same code runs well on my NT machine.
This is the part of the code writing on the contentByte.
This is only a code snippet. Of course all used variables are initialized.
cb.beginText();
cb.setFontAndSize(font.getBaseFont(), font.size());
cb.setColorStroke(font.color());
cb.setColorFill(font.color());
if (textRotation == 0) {
cb.showTextAligned(PdfContentByte.ALIGN_LEFT, text, lowerLeft.x,
(lowerLeft.y + (height / 2)) -
(font.size() / 2), textRotation);
} else if (textRotation == 90) {
cb.showTextAligned(PdfContentByte.ALIGN_LEFT, text,
lowerLeft.x + (width / 2) +
(font.size() / 2), lowerLeft.y, textRotation);
} else if (textRotation == 180) {
cb.showTextAligned(PdfContentByte.ALIGN_LEFT, text,
lowerLeft.x + width,
(lowerLeft.y + (height / 2)) +
(font.size() / 2), textRotation);
} else if (textRotation == 270) {
cb.showTextAligned(PdfContentByte.ALIGN_LEFT, text,
(lowerLeft.x + (width / 2)) -
(font.size() / 2), lowerLeft.y + height,
textRotation);
}
else{
cb.showTextAligned(PdfContentByte.ALIGN_LEFT, text,lowerLeft.x,lowerLeft.y,textRotation);
}
cb.endText();
Thanks a lot
David
-----Disclaimer-----
This message may contain confidential information intended solely for the use of the named addressee. If you are not the intended recipient, you should not read, use, disclose or reproduce the content of this message. If you have received this message by mistake, please notify the sender immediately. Any views or opinions presented in this message are solely those of the author and do not necessarily represent those of AXA Belgium, AXA Bank Belgium, AXA Tech Belgium GIE - ESV or any other entity of the AXA Group, unless otherwise stated by the sender and duly authorized by the said companies.
---------------------
