I am setting the background colour of my document prior to the creation of
the document object/writer by creating a rectangle the size of the page and
then using setBackgroundColor to set the background colour. I then add
various images/objects to the cbu PDF content byte. The background colour
displays without problem - but obscures all images/objects in the content
byte. If I take the setBackgroundColor call out then everything is fine.
Why does the setBackgroundColor obscure the cbu layer? Am I doing something
wrong here?
Thanks
Paul
...
// Create the Rectangle object in a certain
colour and use this
// as pageSize
this.pageSize = new Rectangle(Xpoints, Ypoints);
// Set page background
pageSize.setBackgroundColor(new
java.awt.Color(this.pdfRed,
this.pdfGreen, this.pdfBlue));
// Create document object
Document document = new Document(pageSize,
this.marginLeft,
this.marginRight,
this.marginTop, this.marginBottom);
// Create an instance of the
com.lowagie.text.Document object
PdfWriter writer =
PdfWriter.getInstance(document,
new
FileOutputStream(this.pdfpath + this.pdfname
+ ".pdf"));
...
--
View this message in context:
http://www.nabble.com/Why-does-setBackgroundColor-obscure-cbu-images-tp24682518p24682518.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php
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/