But how do I make the background transparent? I added the following code to
create a shading color instead of using the image for the header background:
ShadingColor tableHeaderBgColor;
Rectangle page = document.getPageSize();
PdfShading axial = PdfShading.simpleAxial(writer, document.leftMargin(),
page.getHeight(), page.getWidth() - document.rightMargin(), page
.getHeight(), COLOR_MEDIUM_BLUE, Color.white, false, false);
PdfShadingPattern axialPattern = new PdfShadingPattern(axial);
tableHeaderBgColor = new ShadingColor(axialPattern);
// apply it to the cell
cell.setBackgroundColor(tableHeaderBgColor);
I could not find a way to make tableHeaderBgColor or COLOR_MEDIUM_BLUE
transparent. Could you provide a code example of what you meant? Thanks.
1T3XT info wrote:
>
>
> You should remove the line:
> cell.setBackgroundColor(COLOR_LIGHT_BLUE);
> and apply this background using a cell or table event.
> Make that background transparent, NOT the table.
>
>
--
View this message in context:
http://www.nabble.com/Different-transparency-for-cells-in-PdfPtable-tp21511310p21609297.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
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