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

How to get fixed height for a fo:block or fo:table-cell?

Expand Messages
  • wzhou@nsf.gov
    I want to create a form so that no matter the data is one line or ten lines, the block occupies, say 2in in height. I tried and it
    Message 1 of 6 , Apr 4, 2001
    • 0 Attachment
      I want to create a form so that no matter the data is one line or ten
      lines, the block occupies, say 2in in height.

      I tried <fo:block height="2in"> and it doesn't seem to work
      for FOP 0.17.

      Any help is appreciated.

      Wufeng
    • G. Ken Holman
      ... That s because height= isn t an attibute of . It is an attribute of , which itself contains blocks. I hope the example below
      Message 2 of 6 , Apr 4, 2001
      • 0 Attachment
        At 01/04/04 19:30 +0000, wzhou@... wrote:
        >I want to create a form so that no matter the data is one line or ten
        >lines, the block occupies, say 2in in height.
        >
        >I tried <fo:block height="2in"> and it doesn't seem to work
        >for FOP 0.17.

        That's because height= isn't an attibute of <block>. It is an attribute of
        <block-container>, which itself contains blocks.

        I hope the example below helps.

        ................ Ken

        <flow flow-name="frame-body">

        <block>This is a test</block>

        <block-container border-style="solid" height="2in" max-height="2in"
        width="3in" overflow="hidden" start-indent="1in">
        <block>This is a test 1</block>

        <block>This is a test 2</block>

        <block>This is a test 3</block>

        <block>This is a test 4</block>

        <block>This is a test 5</block>

        <block>This is a test 6</block>

        <block>This is a test 7</block>

        <block>This is a test 8</block>

        <block>This is a test 9</block>

        </block-container>

        <block>This is a test</block>

        </flow>


        --
        G. Ken Holman mailto:gkholman@...
        Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
        Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
        Web site: XSL/XML/DSSSL/SGML/OmniMark services, training, products.
        Book: Practical Transformation Using XSLT and XPath ISBN 1-894049-06-3
        Article: What is XSLT? http://www.xml.com/pub/2000/08/holman/index.html
        Next public instructor-led training: 2001-04-06,05-01,05-14,05-15,
        - 05-16,05-17,05-21,05-22,06-18,06-21,07-20,07-21,09-19

        !!Five-day XSLT/XPath/XSLFO Training Blitz June 18-22, 2001 in Ottawa!!
      • bryan
        ... From: wzhou@nsf.gov [mailto:wzhou@nsf.gov] Sent: 4. april 2001 21:31 To: XSL-FO@yahoogroups.com Subject: [XSL-FO] How to get fixed height for a fo:block or
        Message 3 of 6 , Apr 5, 2001
        • 0 Attachment
          -----Original Message-----
          From: wzhou@... [mailto:wzhou@...]
          Sent: 4. april 2001 21:31
          To: XSL-FO@yahoogroups.com
          Subject: [XSL-FO] How to get fixed height for a fo:block or
          fo:table-cell?


          I want to create a form so that no matter the data is one line or ten
          lines, the block occupies, say 2in in height.

          I tried <fo:block height="2in"> and it doesn't seem to work
          for FOP 0.17.

          Any help is appreciated.

          Wufeng



          To unsubscribe from this group, send an email to:
          XSL-FO-unsubscribe@egroups.com



          Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
        • costempd@us.ibm.com
          Hi, I ve just started learning XSL-FO. I m using FOP 0.18.1-DEV. Looking through the archives, I found Ken s sample below. I tried it
          Message 4 of 6 , May 22, 2001
          • 0 Attachment
            Hi,

            I've just started learning XSL-FO. I'm using FOP 0.18.1-DEV. Looking
            through the archives, I found Ken's <block-container> sample below.
            I tried it (adding the "fo:" prefix to the elements) but for some
            reason I get about a 2 inch gap between the box and the following
            block. Does anyone know why? Is this a known problem with FOP?

            It looks like it might be related to another problem i'm having in
            which the region-after extent seems to be mis-calculated when a table
            is present, causing a page break sooner than it should. When I remove
            the table and just have a sequence of plain text blocks, it works
            correctly.

            Thanks.

            Nick Ridout

            --- In XSL-FO@y..., "G. Ken Holman" <gkholman@c...> wrote:
            > At 01/04/04 19:30 +0000, wzhou@n... wrote:
            > >I want to create a form so that no matter the data is one line or
            ten
            > >lines, the block occupies, say 2in in height.
            > >
            > >I tried <fo:block height="2in"> and it doesn't seem to work
            > >for FOP 0.17.
            >
            > That's because height= isn't an attibute of <block>. It is an
            attribute of
            > <block-container>, which itself contains blocks.
            >
            > I hope the example below helps.
            >
            > ................ Ken
            >
            > <flow flow-name="frame-body">
            >
            > <block>This is a test</block>
            >
            > <block-container border-style="solid" height="2in" max-height="2in"
            > width="3in" overflow="hidden" start-indent="1in">
            > <block>This is a test 1</block>
            >
            > <block>This is a test 2</block>
            >
            > <block>This is a test 3</block>
            >
            > <block>This is a test 4</block>
            >
            > <block>This is a test 5</block>
            >
            > <block>This is a test 6</block>
            >
            > <block>This is a test 7</block>
            >
            > <block>This is a test 8</block>
            >
            > <block>This is a test 9</block>
            >
            > </block-container>
            >
            > <block>This is a test</block>
            >
            > </flow>
          • costempd@us.ibm.com
            Now I can answer my own question, at least in part. The FOP features page says: Not implemented: block-container Surprisingly there were no error or warning
            Message 5 of 6 , May 23, 2001
            • 0 Attachment
              Now I can answer my own question, at least in part. The FOP
              "features" page says:

              Not implemented: block-container

              Surprisingly there were no error or warning messages, and it did
              generate a box.

              I'm still having problems with the region-body area ending
              pre-maturely when tables are in the "flow".

              -nick

              --- In XSL-FO@y..., costempd@u... wrote:
              > Hi,
              >
              > I've just started learning XSL-FO. I'm using FOP 0.18.1-DEV.
              Looking
              > through the archives, I found Ken's <block-container> sample below.
              > I tried it (adding the "fo:" prefix to the elements) but for some
              > reason I get about a 2 inch gap between the box and the following
              > block. Does anyone know why? Is this a known problem with FOP?
              >
              > It looks like it might be related to another problem i'm having in
              > which the region-after extent seems to be mis-calculated when a
              table
              > is present, causing a page break sooner than it should. When I
              remove
              > the table and just have a sequence of plain text blocks, it works
              > correctly.
              >
              > Thanks.
              >
              > Nick Ridout
              >
              > --- In XSL-FO@y..., "G. Ken Holman" <gkholman@c...> wrote:
              > > At 01/04/04 19:30 +0000, wzhou@n... wrote:
              > > >I want to create a form so that no matter the data is one line or
              > ten
              > > >lines, the block occupies, say 2in in height.
              > > >
              > > >I tried <fo:block height="2in"> and it doesn't seem to work
              > > >for FOP 0.17.
              > >
              > > That's because height= isn't an attibute of <block>. It is an
              > attribute of
              > > <block-container>, which itself contains blocks.
              > >
              > > I hope the example below helps.
              > >
              > > ................ Ken
              > >
              > > <flow flow-name="frame-body">
              > >
              > > <block>This is a test</block>
              > >
              > > <block-container border-style="solid" height="2in"
              max-height="2in"
              > > width="3in" overflow="hidden"
              start-indent="1in">
              > > <block>This is a test 1</block>
              > >
              > > <block>This is a test 2</block>
              > >
              > > <block>This is a test 3</block>
              > >
              > > <block>This is a test 4</block>
              > >
              > > <block>This is a test 5</block>
              > >
              > > <block>This is a test 6</block>
              > >
              > > <block>This is a test 7</block>
              > >
              > > <block>This is a test 8</block>
              > >
              > > <block>This is a test 9</block>
              > >
              > > </block-container>
              > >
              > > <block>This is a test</block>
              > >
              > > </flow>
            • costempd@us.ibm.com
              Hmmm... just found usage of block-container in one of the example files: examples pagination allregions.fo so I guess it s implemented after all. -nick
              Message 6 of 6 , May 23, 2001
              • 0 Attachment
                Hmmm... just found usage of block-container in one of the example
                files: examples\pagination\allregions.fo
                so I guess it's implemented after all.
                -nick

                --- In XSL-FO@y..., costempd@u... wrote:
                > Now I can answer my own question, at least in part. The FOP
                > "features" page says:
                >
                > Not implemented: block-container
                >
                > Surprisingly there were no error or warning messages, and it did
                > generate a box.
                >
                > I'm still having problems with the region-body area ending
                > pre-maturely when tables are in the "flow".
                >
                > -nick
              Your message has been successfully submitted and would be delivered to recipients shortly.