Are you aware of PdfGraphics2D? If you've already got everything rendering to a Graphics2D interface, drawing all that to PDF is trivial.
Or maybe not. PdfGraphics2D won't paginate at all. It's given a bounding box and fills it with whatever is drawn. It's also Very Difficult to use both direct content manipulation (PdfGraphics2D works with PdfContentByte) and normal "document.add(...)" PDF creation at the same time. That also leaves the whole "bookmark tree" thing up in the air. Still, something to consider. --Mark Storer Senior Software Engineer Cardiff.com import legalese.Disclaimer; Disclaimer<Cardiff> DisCard = null; > -----Original Message----- > From: Anthony Webster [mailto:[email protected]] > Sent: Thursday, February 10, 2011 8:13 AM > To: Post all your questions about iText here > Subject: Re: [iText-questions] Composition > > That sounds like it's bang on actually (although it's closer > to a Swing component/layout tree than a DOM). > > Any insights that you could provide based on problems that > you have encountered in the reworking of the HTMLWorker would > be most appreciated. > > Many thanks > > Le 10/02/2011 16:53, 1T3XT BVBA a écrit : > > Op 10/02/2011 12:09, Anthony Webster schreef: > >> I have tried using PdfOutline but that's a problem as I > need section > >> bookmarks within a Paragraph object (specifically I add > PdfTables to > >> said paragraph) and I can't figure out how to get the appropriate > >> PdfDestination before adding the paragraph to the document > > I've read your three question, and I don't understand what > you're asking. > > > > This is how I interpret it: > > You have a document that is like a DOM tree. It's structured in > > different nodes that have a meaning: sections, section > titles, tables, > > paragraphs with ordinary content. > > Now you want to render this tree to PDF, and while doing > so, you want > > to create an outline tree (aka bookmarks). > > > > There's no infrastructure in iText to do this, so you'll have to > > program all of this. Actually, we're currently rewriting the > > HTMLWorker functionality to achieve more or less the same, > but we're > > far from finished. It seems as if you've already started writing > > something similar, but now you don't know how to create a > PdfOutline > > to bookmark a Paragraph. This can be done in an onParagraph event. > > > > This can't be combined with the automatic bookmark creation of > > Chapter/Section: the idea is to create the complete outline > tree in a > > custom PdfPageEvent implementation. It's up to you to decide which > > event is best suited. I'd use onGenericTag to achieve this, > and mark a > > chunk for every entry in the outline tree. > > > > I'm not sure if this answers the questions, though. This > only answers > > my interpretation of the questions. > > > > > ---------------------------------------------------------------------- > > -------- The ultimate all-in-one performance toolkit: Intel(R) > > Parallel Studio XE: > > Pinpoint memory and threading errors before they happen. > > Find and fix more than 250 security defects in the > development cycle. > > Locate bottlenecks in serial and parallel code that limit > performance. > > http://p.sf.net/sfu/intel-dev2devfeb > > _______________________________________________ > > iText-questions mailing list > > [email protected] > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > Many questions posted to this list can (and will) be > answered with a > > reference to the iText book: http://www.itextpdf.com/book/ Please > > check the keywords list before you ask for examples: > > http://itextpdf.com/themes/keywords.php > > > > -------------------------------------------------------------- > ---------------- > The ultimate all-in-one performance toolkit: Intel(R) > Parallel Studio XE: > Pinpoint memory and threading errors before they happen. > Find and fix more than 250 security defects in the development cycle. > Locate bottlenecks in serial and parallel code that limit performance. > http://p.sf.net/sfu/intel-dev2devfeb > _______________________________________________ > iText-questions mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Many questions posted to this list can (and will) be answered > with a reference to the iText book: > http://www.itextpdf.com/book/ Please check the keywords list > before you ask for examples: http://itextpdf.com/themes/keywords.php > > ------------------------------------------------------------------------------ The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
