Mark Rollins wrote: > I'm trying to convert the xml from a Word document to PDF using iText, > adding lots of additional content en-route. The documents are quite > complex which is why I want the users to be able to edit the source > document with Word. In Word, when you specify the background colour for > a paragraph it is applied across the page-width which is different to > iText, which only sets the background for the written text (by setting > the background colour on the Chunks in a paragraph). I know I can extend > the background by using setBackground(color,l,b,r,t), but how do I > calculate l and r to ensure it reaches the page margins? There seems to > be a lack of functions that return text width for a paragraph. Thanks.
I'd add the background using page events; not by setting attributes on this or that object. -- This answer is provided by 1T3XT BVBA ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net 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