[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: [xsl-fo] Flexible Region-before size
At 2013-01-29 12:12 +0100, Geert Bormans wrote:
On my pages I have a region-before with some header information You have to make some estimates on your part, and your customer needs to accept that there will be edge cases when the height of the page content is not as big as it could be. I was presented with your very situation when printing US Intelligence documents where the header is between 1 and 10 lines long: having 9 blank lines most of the time is totally unacceptable. Yet the security classification can vary and be very detailed, but often is very short. The project is described here: http://www.CraneSoftwrights.com/links/ipepaper.htm I ended up calculating the region-before height by first determining the content belonging in the header and then doing a character count. I simply divided the count by a "generous" interpretation of the number of characters in a line, and set the region height accordingly. Granted, there were some times that the actual rendered length turned out to be, say, 5 lines and I had reserved 6, but because of how I calculated the line lengths, that rarely happened. I erred on the side of leaving a one-line gap, rather than losing content (especially a security constraint!) on the page. And it is only an estimate, as there is no access through the specification to the font metrics. If you happen to have outside access to the font metrics of the font you are using, then you can perhaps have a very accurate calculation of how much room you'll need. If you don't have a page number in the variable sized bit, you could try putting your entire content into a one-column table with a table header that repeats on every page. That header can have any number of lines. And in subsequent page sequences (or table groups you decide on) you can have a different number of lines in your table header as a pseudo-page-header. And if you are using XSL-FO 1.1 (which I couldn't in 2005), you can use retrieve-table-marker in order to mimic retrieving page markers. 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
|