Hi,

I am using iText 5 to create documents. Everything worked fine until I
tested with different viewers. On the first page I stamp a number with
the following code:

ByteArrayOutputStream baosResult = new ByteArrayOutputStream();
PdfReader reader = new PdfReader(baosAntrag.toByteArray());
PdfStamper stamper = new PdfStamper(reader, baosResult);
PdfContentByte cb = stamper.getOverContent(1);
cb.setColorFill(BaseColor.BLACK);
cb.setFontAndSize(Pdf.FGD_12.getBaseFont(), 12f);
float x = 400f;
float y = 714.40f;
cb.setTextMatrix(x, y);
cb.showText(a.getAngebotNr());
stamper.close();
return baosResult;

The page has a gray background. Therefore I used getOverContent. When I
view the with different viewers, the content which was placed on the
gray background is not visible. Other stamped content (on ares without
background colors) is always displayed correctly.

Foxit Reader 3.1.4
- everything works fine

Adobe Acrobat Reader 9.3.0
- content is not displayed

Adobe Acrobat Reader 7.0.8
- content is displayed correct but I get an error when opening the
document "Invalid Action ("TM") outside of text object" (not the
original error - translated from german)

TIA for any advice.
Greetings
Frank

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.itextpdf.com/book/
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to