xsl-list
[Top] [All Lists]

Re: [xsl] Header Text Overflows Body Section Title

2007-11-19 12:54:10
Hi Ken,

Thanks! Do you have an example that you can share?

Thanks again,
Horace

--- "G. Ken Holman" <gkholman(_at_)CraneSoftwrights(_dot_)com> wrote:

At 2007-11-19 09:25 -0800, Horace Burke wrote:
I am having some issues with text overflowing from a page header into a
section titles. This is in PDF output generated from an XSL-FO
stylesheet.
I have included snippets from the XML and stylesheet. The XML snippets
show three possible variations of data in a <para> element that will
display in the document header. I want to know if there is anyway for
me
to have the "margin-top" in <fo:region-body...> formatting object to
extend/increase depending on the amount of data in the product name
paragraph ("<ProdName><para>") element.

No ... this is not an elastic construct.

I came across this in a project where security classifications were 
displayed in headers and footers.  For any given document, however, 
the length of the classifications wrapped to an arbitrary number of 
lines (one valid example we had extended to six lines).

The extents of perimeter regions and the margins of the body region 
cannot change to reflect the amount of filled content.  Thus, we 
actually counted the characters and estimated the number of lines and 
then declared the extents and margins based on the line count.  We 
did not do this so accurately as to utilize the font metrics to 
guarantee the line count was precise ... everything was capital 
letters so we just did a character count.

The complexity of your line counting algorithm is related to how 
important it is to accurately reflect line breaks.  There are no
guidelines.

We erred on the excess so that there were a few documents where the 
header was accidentally one line longer than it needed to be ... but 
the document readers couldn't really tell that the excess gap of one 
line was too much.  When the gap was three lines, they could tell and 
they would complain, which is why we started counting 
characters.  One line too much and they didn't say a word.

With that evidence, our simple character counting was sufficient and 
we didn't need to incorporate font metrics into the calculation.

I hope this helps.

. . . . . . . . . . . . . Ken


--
Comprehensive in-depth XSLT2/XSL-FO1.1 classes: Austin TX,Jan-2008
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman                 mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





      
____________________________________________________________________________________
Get easy, one-click access to your favorites. 
Make Yahoo! your homepage.
http://www.yahoo.com/r/hs 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>