[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Header Text Overflows Body Section Title
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|