Thomas J.S.: xsl-fo SVG-Einbindung *grrrr*

Beitrag lesen

Hallo,

ich binde in meine xsl-fo files gelegentlich svg-grafiken ein.

Diesmal wird diese SVG-Grafik in eine Tabellenzelle eingebunden, was ohne erkennbaren Grund zur Folge hat dass das die Zeile höher wird obwohl das SVG genau hinein passt. Sollte halt...

So siehts aus (habe den einzelnen Elementen einen Border gegeben):

Gut mann kann sich denken was du meinst, aber das mit dem Border im Beispiel ist natürlich nicht so toll, weil das das Ergebniss noch mehr verfälscht.

Das Kreuz sollte genau in die Zelle hineinpassen.

Wenn ich es so mache:
---------------------
fo:block
    <fo:table table-layout="fixed">
     <fo:table-column column-width="3.2mm" column-number="1" />
     <fo:table-column column-width="3.2mm" column-number="2"/>
     <fo:table-column column-width="3.2mm" column-number="3"/>
     <fo:table-column column-width="3.2mm" column-number="4"/>
     <fo:table-column column-width="3.2mm" column-number="5"/>
     fo:table-body
      <fo:table-row height="3.2mm">
       <fo:table-cell background-color="#E4E2E4">
        fo:block</fo:block>
       </fo:table-cell>
       <fo:table-cell background-color="#C4C2C4">
        fo:block</fo:block>
       </fo:table-cell>
       <fo:table-cell background-color="#E4E2E4">
        fo:block</fo:block>
       </fo:table-cell>
       <fo:table-cell background-color="#C4C2C4">
        fo:block</fo:block>
       </fo:table-cell>
       <fo:table-cell background-color="#E4E2E4">
        fo:block</fo:block>
       </fo:table-cell>
      </fo:table-row>
      <fo:table-row height="3.2mm">
       <fo:table-cell background-color="#C4C2C4">
        fo:block</fo:block>
       </fo:table-cell>
       <fo:table-cell background-color="#E4E2E4">
        <fo:block font-size="1pt" line-height="1pt">
         <fo:instream-foreign-object width="3.2mm" height="3.2mm">
          <svg:svg xmlns:svg="http://www.w3.org/2000/svg" width="3.2mm" height="3.2mm">
           <svg:rect x="0" y="0" width="3.1mm" height="3.1mm" stroke-width="1pt" stroke="black" fill="none"/>
           <svg:line x1="0mm" y1="0mm" x2="3.1" y2="3.1mm" stroke-width="1pt" stroke="black"/>
           <svg:line x1="0mm" y1="3.1mm" x2="3.1mm" y2="0mm" stroke-width="1pt" stroke="black"/>
          </svg:svg>
         </fo:instream-foreign-object>
        </fo:block>
       </fo:table-cell>
       <fo:table-cell background-color="#C4C2C4">
        fo:block</fo:block>
       </fo:table-cell>
       <fo:table-cell background-color="#E4E2E4">
        fo:block</fo:block>
       </fo:table-cell>
       <fo:table-cell background-color="#C4C2C4">
        fo:block</fo:block>
       </fo:table-cell>
      </fo:table-row>
     </fo:table-body>
    </fo:table>
   </fo:block>
------------

Sagt zwar FOP noch immer, dass die zweite Zeile noch immer größer ist, als es sein sollte, aber die Darstellung ist nahezu indent.

Grüße
Thomas