Hello Daniel, Please note that I am a relatively newbie with iText. I have been recently faced with similar questions as yours and this is my attempted solution ... perhaps it will give you some ideas.
On Apr 27, 2010, at 9:58 PM, Daniel Cane wrote: > > My first approach was attempting to create the page from "scratch" using > chunks, paragraphs, etc. This seems to give me a ton of control, but I find > myself tinkering (a ton) to get the layout to work. > > I define templates as simple as a list of coordinate points or hot spots or however you want to call them. These points are uniquely keyed by labels e.g. TOP_LEFT and they also have a recurrence flag i.e. repeat for all pages. So they look like Spot(x,y,TOP_LEFT,repeat). These coordinate tuples are defined manually once so that the visual "appealingness" is well known in advance and not computed on the fly by some algorithm where you could lose predictability of the visual output. Now that's all :) I then use the Builder Design pattern which is one of the few interfaces to client code with methods similar to e.g. IBuilder#addPdfPart(Spot,IPdfPart) IBuilder#addTable(Spot,ITable) IBuilder#build() my "Layout Manager" does not shift on the x axis but only on the y-axis and breaks onto new pages automatically. It also checks or will for overlapping. This solution resolves the problem of having to deal with the combinatorial explosion of PDF templates to maintain ... you keep only metadata list of points as template. HTH, Best regards, Giovanni ------------------------------------------------------------------------------ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ 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/