Thank's mr. bean.  That makes sense.  And I went ahead and ordered the  
book.

What was tripping me up on using ColumnText is that I kept wanting to  
put my normal paragraphs at the top of the page and then use the  
ColumnText instances for the sections that followed.  But it seems you  
are saying to just use ColumnText for everything and I see now that  
would work.

Thanks!

On Oct 13, 2009, at 3:29 AM, mister bean wrote:

>
> OK so you have arbitrarily long chunks of text that are preceded by  
> a heading
> and you need to have the heading and the text kept together on the  
> same
> page. And where several chunks would fit on a page you'd like them  
> to flow
> together nicely to give the appearance of a single document. This  
> can be
> done.
>
> ColumnText is your friend. Think of a column as text box (of any  
> size)--this
> will facilitate conceptualizing the solution.
>
> You always know the coordinates of the first box (ColumnText), since  
> it
> appears on the first page. Make it the length of your page (less  
> margins)
> and fill it with your first heading and data and find out how much  
> space it
> takes. (Get the y coordinate of the last line.) Place another Column  
> Text
> below this (as you now have the coordinates) and fill it with the  
> heading
> and text of the second section and see if it fits on the page (as  
> explained
> in the book.) If it doesn't, move it to the next page. If it does  
> fit, write
> it out, get the new y-coordinate, and continue like this section by  
> section
> until you've output all your material.
>
> It might help to know that ColumnText instances can overlap, so  
> placing your
> second Column Text over the unfilled portion of your original full- 
> page
> ColumnText is not a problem.
>
> Good luck!
>
> ---mr. bean
>
>
>
> digerata-3 wrote:
>>
>> On Oct 12, 2009, at 3:00 PM, mister bean wrote:
>>
>>>
>>> If you're trying to locate paragraphs exactly and keep the content
>>> together,
>>> tables or whatever you might mean by nested paragraphs are not the
>>> right way
>>> to do it.
>>>
>>> Use ColumnText, which allows you to place text anywhere and has
>>> specific
>>> provisions for keeping lines together. This is discussed in Chapter
>>> 7 of the
>>> book.
>>>
>>> If you mean something else by nested paragraphs, please explain what
>>> you
>>> mean.
>>>
>>> ---mr. bean
>>
>> It is for resume output.  So given the following:
>>
>> Arbitrary text content as a paragraph
>>
>> Arbitrary text content as a paragraph
>>
>> Section 1 Title
>> ------------------------------
>>       Section Entry 1 Title
>>       Section Entry 1 Description with multiple, unknown number of
>> lines of text
>>
>>       Section Entry 2 Title
>>       Section Entry 2 Description with multiple, unknown number of
>> lines of text
>>
>>       Section Entry 3 Title
>>       Section Entry 3 Description with multiple, unknown number of
>> lines of text
>>
>> Section 2 Title
>> ------------------------------
>>       Section Entry 1 Title
>>       Section Entry 1 Description with multiple, unknown number of
>> lines of text
>>
>>       Section Entry 2 Title
>>       Section Entry 2 Description with multiple, unknown number of
>> lines of text
>>
>>       Section Entry 3 Title
>>       Section Entry 3 Description with multiple, unknown number of
>> lines of text
>>
>> Follow the rules:
>>
>> - Arbitrary paragraph content can break anywhere
>> - No part of any section entry can break across pages
>> - If the first entry of a section would not print on the same page as
>> the section title block, then break before the section title block.
>>
>> The tricky part is the last rule.  I am currently creating each
>> section title as its own paragraph.  Then the first section entry is
>> being added as a child paragraph.  The remaining section entries are
>> added as independent paragraphs on their own.  This all works well
>> until the indentation comes in, the first section entry is not  
>> indented.
>>
>> The problem I see with ColumnText is that it requires coordinates.
>> I'm dealing with arbitrary text and don't have any coordinates.
>> Depending on the arbitrary text before the section, the column could
>> start anywhere on the page.  Any ideas?
>>
>> Thanks a ton for chiming in, Mr. Bean!
>>
>> -Mike
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart  
>> your
>> developing skills, take BlackBerry mobile applications to market  
>> and stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference
>> _______________________________________________
>> iText-questions mailing list
>> iText-questions@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/itext-questions
>>
>> Buy the iText book: http://www.1t3xt.com/docs/book.php
>> 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/
>>
>
> -- 
> View this message in context: 
> http://www.nabble.com/Nested-Paragraph-Indentation-tp25858404p25868353.html
> Sent from the iText - General mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart  
> your
> developing skills, take BlackBerry mobile applications to market and  
> stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
>
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> 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/


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
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/

Reply via email to