You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Slawick <is...@yahoo.fr> on 2007/03/01 17:11:03 UTC

Rows higher than expected

Dear FOP users,

I have a small problem with FOP (both 0.20 and 0.93).
When generating a PDF, I got an error of type "The contents of row 1 are 
taller than they should be", and in the generated PDF, the rows are higher 
than I expect.

I understand the error by itself, but not why it is generated.

For example, I have:
"the row grows to 21600 millipoints, but the row shouldn't get any taller than 
MinOptMax[min=opt=max=12000] millipoints"

But the font size I use is 12pt, and even if I add the 1pt padding on top and 
bottom, the result shouldn't be higher than 14pt.

Does anyone know why my rows are that higher? How the necessary high (21600pt 
in my example) is calculated? What elements are taken in account (font size, 
padding, borders size...?)?

Thank you for your help,
Slawick Charlier


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Rows higher than expected

Posted by Andreas L Delmelle <a_...@pandora.be>.
On Mar 1, 2007, at 18:22, Chris Bowditch wrote:

> Slawick wrote:
>> For example, I have:
>> "the row grows to 21600 millipoints, but the row shouldn't get any  
>> taller than MinOptMax[min=opt=max=12000] millipoints"
>> But the font size I use is 12pt, and even if I add the 1pt padding  
>> on top and bottom, the result shouldn't be higher than 14pt.
>
> Wrong. First of all theres half leading. Which means a line of text  
> typically takes up 1.2x the font height.
>
> 1.2x 12pt = 14.4pt.
>
> You don't show your FO, but if you have added 1pt padding top and  
> bottom then the line height is up to:
>
> 16.4pt.

... on top of what Chris already pointed out:
If the fo:block inside the fo:table-cell has some space-before /  
space-after (or: margin-top / margin-bottom), this would also  
increases the row-height.


Cheers,

Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Rows higher than expected

Posted by Chris Bowditch <bo...@hotmail.com>.
Slawick wrote:
> Dear FOP users,
> 
> I have a small problem with FOP (both 0.20 and 0.93).
> When generating a PDF, I got an error of type "The contents of row 1 are 
> taller than they should be", and in the generated PDF, the rows are higher 
> than I expect.
> 
> I understand the error by itself, but not why it is generated.
> 
> For example, I have:
> "the row grows to 21600 millipoints, but the row shouldn't get any taller than 
> MinOptMax[min=opt=max=12000] millipoints"
> 
> But the font size I use is 12pt, and even if I add the 1pt padding on top and 
> bottom, the result shouldn't be higher than 14pt.

Wrong. First of all theres half leading. Which means a line of text 
typically takes up 1.2x the font height.

1.2x 12pt = 14.4pt.

You don't show your FO, but if you have added 1pt padding top and bottom 
then the line height is up to:

16.4pt.

If your table cells have borders this may also increase the row height. 
There are many other things that can increase the row height, but rather 
than try and guess, post up the XSL-FO for the row in question and we'll 
help you analyze it.

<snip/>

Chris




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org