Jonathan Logue wrote:
> So, it sounds like there is not another way to pull it off.

Oh, wait. Maybe there IS!!!

Something just came to mind, but I didn't test it yet,
so don't shoot me if it doesn't work.

You can set the background color of a PdfPCell.
What if you use 'special paint' for this color?
Have a look at this example from the book:
http://www.1t3xt.info/examples/browse/?page=example&id=176

More specifically at this code snippet:

Image img =
   Image.getInstance("resources/in_action/chapter10/iTextLogo.gif");
PdfPatternPainter img_pattern =
   cb.createPattern(img.getScaledWidth(), img.getScaledHeight(),
                    img.getScaledWidth(), img.getScaledHeight());
img_pattern.addImage(img,
   img.getScaledWidth(), 0f, 0f, img.getScaledHeight(), 0f, 0f);
img_pattern.setPatternMatrix(1f, 0f, 0f, 1f, 60f, 60f);

Then create a color using this pattern:

PatternColor img_color = new PatternColor(img_pattern);

Use this 'color' as background color for the cells and the image
used to create the pattern will be tiled in the background.
Maybe it's not exactly what you need, but it's worth a try,
given the amount of work needed for the alternatives.
-- 
This answer is provided by 1T3XT BVBA

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Do you like iText?
Buy the iText book: http://www.1t3xt.com/docs/book.php
Or leave a tip: https://tipit.to/itexttipjar

Reply via email to