Loading ...
Sorry, an error occurred while loading the content.

5685fixed size containers

Expand Messages
  • Alexander Lohse
    Aug 9, 2004
      Hi,

      Please help.
      I need to create address-label-sheets from my Java-Swing-Application
      and I wonder if anyone can tell me how to hack FOP so it would not
      display the overflow, when using fixed height containers or table-rows?
      (I believe block-containers would be the right thing, but there a very
      buggy in FOP, e.g. do not wrap into columns)

      I thought maybe it would be possible using SVG. I might create an
      graphic for each label and place/resize this to fit?

      Any ideas, thoughts or hints?

      Thanks in advance,

      Alex

      Here is some code:

      <?xml version="1.0" encoding="UTF-8" ?>
      <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:fo="http://www.w3.org/1999/XSL/Format">

      <xsl:template match="export">
      <fo:root>
      <fo:layout-master-set>
      <fo:simple-page-master master-name="master" page-height="29.7cm"
      page-width="21cm">
      <fo:region-body column-count="2" column-gap="10mm"
      margin-top="6mm" margin-left="6mm" margin-right="6mm"
      margin-bottom="6mm" />
      </fo:simple-page-master>
      </fo:layout-master-set>

      <fo:page-sequence master-reference="master">
      <fo:flow flow-name="xsl-region-body" font-size="10pt"
      font-family="Helvetica">
      <fo:table>
      <fo:table-column column-width="94mm" />
      <fo:table-body>
      <xsl:apply-templates select="data/customer" />
      </fo:table-body>
      </fo:table>
      </fo:flow>
      </fo:page-sequence>
      </fo:root>
      </xsl:template>

      <xsl:template match="customer">
      <xsl:apply-templates select="address" />
      </xsl:template>

      <xsl:template match="address">
      <fo:table-row height="40mm">
      <fo:table-cell border-width="0.1pt" border-color="#000000"
      border-style="solid">
      <fo:block white-space-collapse="false"
      linefeed-treatment="preserve" font-size="10pt" margin="5mm">
      <xsl:value-of select="." />
      </fo:block>
      </fo:table-cell>
      </fo:table-row>
      </xsl:template>

      </xsl:stylesheet>
    • Show all 3 messages in this topic