Oh, I see. I read in the tutorial something about mixing adding content to a Chapter and to a Document before adding the Chapter itself to the document and that the result is not predictable.
However, see the attached example application. I minimized it from my actual project but the structure is nearly identical (except form using PageEvents and that all methods are declared static). In the main method I create a Document and a (main) Chapter which is used as the 'section building' methods parameter. The method which should be displayed in landscape orientation gets the Document as a parameter as well. In this tiny application the result is as expected. Regards Dirk > > -------- Original-Nachricht -------- > Datum: Thu, 04 Jan 2007 11:30:32 +0100 > Von: Bruno Lowagie <[EMAIL PROTECTED]> > An: Post all your questions about iText here > <[email protected]> > Betreff: Re: [iText-questions] Section breaks > > Dirk Ulrich wrote: > > mainChapter.add(Chunk.NEXTPAGE); > > document.setPageSize(Pagesize.A4.rotate()); > > Oops, I gave you the standard answer without looking at the context. > Again you are mixing two different things: > 1. you add content to a Chapter object. > 2. you change the orientation of the pages in the document. > But these two things are completely unrelated: > the document doesn't know what you do with the chapter > object; the chapter doesn't know what you do with the > document object... > > > I use Helper classes on PageEvents (onEndPage as well as onGenericTag). > > Could this cause problems? > > I haven't tried this, but it looks like something > that could have unwanted side-effects: the document > object passed to a page event, is of type PdfDocument, > it's not an ordinary Document object. > > > So: How can i tell iText to switch from one orientation to another > > within a single Chapter? > > I don't know. The question never came up. > It's not implemented. > br, > Bruno > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > 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/ > -- Mit freundlichen Grüßen Dirk Ulrich Jansenstraße 21 13437 Berlin fon:0++49-(0)30-40 999 087 mobil:++49-(0)174/948 87 39 Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
Dirk.java
Description: Binary data
Dirk.pdf
Description: Adobe PDF document
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ 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/
