On 5/05/2011 20:11, 1T3XT BVBA wrote:
Op 5/05/2011 19:58, ptownsen schreef:
I am currently using version 5.06 of iText. Is this an old version? Where
can I get the new version?
No, that's the latest version. The new version will be released
tomorrow. I assumed you were using an old version because the newer
versions throw an exception if you have "unbalanced state operators"
(which was what you had: that never works).
I have added the restoreState() method call in my code but I still get the
same error when opening the resultant pdf in Adobe Reader.
.....
PdfGState gstate = new PdfGState();
gstate.setFillOpacity(0.3f);
gstate.setStrokeOpacity(0.3f);
PdfContentByte pdfContent = stamper.getOverContent(1);
pdfContent.saveState();
pdfContent.setGState(gstate);
pdfContent.addImage(image);
pdfContent.restoreState();
stamper.close();
.....
I don't know if this is valid or not. By the way, I have ordered the book.
The fact that you could use saveState() without restoreState() worries
me. Normally, iText should have thrown an exception. Are you sure you're
using iText 5.0.6?
The producer line says OpenOffice.org 3.1; modified using iText 5.0.6
(c) 1T3XT BVBA
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php
--
@redlabbe <http://twitter.com/redlabbe>
redlab-log <http://www.redlab.be/blog>
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php