views:

17

answers:

0

How to debug xsl-fo layout

I have a table, blocks and one image that is 1mm too far from the outer egde of all this.

<fo:table-row xsl:use-attribute-sets="blue-border">
      <fo:table-cell >
        <fo:block id="logo" xsl:use-attribute-sets="red-border">
          <fo:external-graphic src="url('{$headerLogoPath}')" width="100%" content-width="53mm" scaling="uniform" xsl:use-attribute-sets="green-border"/>
        </fo:block>
      </fo:table-cell>
      <fo:table-cell text-align="right" margin-right="1mm">
        <xsl:apply-templates select="/FOO" />
      </fo:table-cell>
    </fo:table-row>

And as a result I get following:

_____blue, red___ 
|______green_____|
|                |
|                |
|______green_____|
|____blue, red___|

How to debug what is causing the spacer? As I understand it may be several things (margin, padding, space). I have tried setting all of these to 0pt for block and graphic but no help.

Something like more advanced AWT preview would be great. I wish it would show all margins, paddings, area borders and area dimensions. Anyone knows such (preferably freeware) tool?