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

fixed size containers

Expand Messages
  • Alexander Lohse
    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
    Message 1 of 3 , Aug 9, 2004
    • 0 Attachment
      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>
    • Eliot Kimber
      ... If your FO implementation supports block container and supports an overflow option that will discard overflow then that would, in the abstract, be the
      Message 2 of 3 , Aug 9, 2004
      • 0 Attachment
        Alexander Lohse wrote:

        > 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)

        If your FO implementation supports block container and supports an
        overflow option that will discard overflow then that would, in the
        abstract, be the easiest way to go.

        But for this application I think you are correct that using SVG is
        probably the most reliable given that you can do all the line breaking
        yourself and you need precise control over the size and placement of the
        result.

        Cheers,

        Eliot
        --
        W. Eliot Kimber
        Professional Services
        Innodata Isogen
        9390 Research Blvd, #410
        Austin, TX 78759
        (512) 372-8122

        eliot@...
        www.innodata-isogen.com
      • tokukobayashi2002
        Hello, XSL Formatter v3.1 supports extension for block-container. You may control actions when overflow occurs. Please check this example.
        Message 3 of 3 , Aug 9, 2004
        • 0 Attachment
          Hello,

          XSL Formatter v3.1 supports extension for block-container.
          You may control actions when overflow occurs.
          Please check this example.

          http://www.antennahouse.com/XSLsample/FOsample.htm#LA

          * In the block container for which the size is specified,
          you can specify the processing when the content overflows.

          replace text, condense text, stretch font, condense line height.

          This extension will be helpful for you.

          You may try evaluation version from here:

          http://www.antennahouse.com/product/axfo30/download.htm

          Best regards,

          Tokushige Kobayashi


          --- In XSL-FO@yahoogroups.com, Alexander Lohse <al@w...> wrote:
          > 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)
          >


          Tokushige Kobayashi
          Antenna House, Inc.
          E-mail koba@...
          WWW http://www.antenna.co.jp/
          WWW http://www.antennahouse.com/ (English)
          TEL +81-3-3234-1361(direct call)
          FAX +81-3-3221-9975
        Your message has been successfully submitted and would be delivered to recipients shortly.