degzhaus wrote: > Good Afternoon!, I have been working with iText for a week or so and > have found it the *BEST* PDF library available!! One requirement of a > report I'm currently working on is to have alternating row background > colors. I spent some time in forums all over the web, but couldn't find > any properties in the PdfPTable object or Document object that handles > alternating row styles, so I tried this brute force work around:
Have you looked at the Table Events functionality? By implementing this interface, and adding it to a PdfPTable before adding the table to the document, you can add all kinds of custom borders and backgrounds. In the method you are supposed to implement, you get all the necessary coordinates and you can grab the canvas that goes under the cells of the table. br, Bruno ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
