as i stated in the original post, it is a requirement dictated by the
stakeholders in the project.

i'm not tied to the chapter/section abstractions, and can make the
appropriate changes, but i do need a way to accomplish this.

let me give this another try:

i'm generating a working marketing plan. the marketing plan simply
consists of marketing events grouped by event type (i.e. Direct Mail,
Magazine Ads, Radio Spots, Billboard Ads, etc):

- Marketing Plan
   - Event Type 1 (i.e. Direct Mail)
      - Event 1
      - Event 2
      - ...
      - Event N
   - Event Type 2 (i.e. Radio Spots)
      - Event 1
      - Event 2
      - ...
      - Event N
   - ...
   - Event Type N (i.e. Billboard Ads)
      - Event 1
      - Event 2
      - ...
      - Event N

each event will consist of some text, some lists, etc describing the
event. 

now, in all cases the event descriptions will never exceed a page in
length, but could be as small as one line of text.

the marketing department has stipulated that an event description should
never be split by a page. if it happens to be split, it should start on
a new page. 

i originally started with the chapter/section classes to get the
automatic bookmarking where:

Marketing plan -> Chapter
Event Type -> Section
Event -> 1-column Table containing various text elements describing
event

so that readers could simply click on the appropriate type in the
bookmark window and be taken to the first page for that event type.

if i replace the chapter/section classes with other text elements, how
does one go about determining this? 

it's really an aesthetic issue, but somehow i need to figure out how
many events will fit on a single page. 

hopefully that makes sense ...

> -----Original Message-----
> From: 1T3XT info [mailto:[email protected]] 
> Sent: Monday, January 12, 2009 3:20 PM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] controlling page breaks (not 
> how to insert a new page)
> 
> Jeff Glatz wrote:
> > thank you for the prompt reply. however, i don't think i properly 
> > constructed my question.
> > 
> > i am aware of that method and what it does, but what is the 
> best way 
> > to determine how many sections will fit on a page before i 
> determine 
> > which section to invoke that method on?
> > 
> > i.e. is there some way of computing the height of the sections then 
> > comparing that to the height of the page to determine how many will 
> > fit then calling setTriggerNewPage() on the section that 
> would exceed 
> > the page size? or is there some other way of accomplishing this?
> 
> I still don't understand the question (nor why you would want 
> such a thing), but no: that's not possible with the 
> Chapter/Section classes.
> While constructing the Chapter/Section classes, they are 
> unaware of the page size, the space left on the page, etc...
> --
> This answer is provided by 1T3XT BVBA
> http://www.1t3xt.com/ - http://www.1t3xt.info
> 
> --------------------------------------------------------------
> ----------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> 
########################################################################
"This email message, including any attachments, is for the sole use of the 
intended recipients and may contain confidential and privileged information.  
Unauthorized use, disclosure or distribution of this email is strictly 
forbidden.  If you have received this message in error, please reply to the 
above sender notifying them of this error, and then kindly delete the message."
########################################################################

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to