Hi Georg,

Georg Datterl a écrit :
> Hi Jeremias,
> 
> Yes, I include a picture of my table (created with iText, except for the red 
> stuff).  The left colum contains numbers (Block A), photos (Block B), 
> drawings (Block C) and finally another number (Block D). The right column 
> contains headlines, text, tables, various stuff. As you can see on the second 
> page, last table, Block A aligns with Block E, Block D is on the bottom line 
> of the table, not necessarily aligned to anything in Block E.

Please have a look at the FO file attached. That’s the most accurate
approach I could find. That requires a bit of pre-processing, and
knowing the heights of the images, but since your content seems to be
even you might be happy with it. Plus it’s implementable straight away,
without any modification to FOP.

I can think of two FO constructs to make content repeat on pages:
markers or table headers/footers. Markers are not really an option here
(even supposing that table markers are implemented), since the repeated
content should be mixed with the table body, and have an influence on
its height.
Remains table header. The idea is to put the drawing in a header and
fill the body with blank content such that the height of the table
matches the height of content E. In the sample FO I used blocks
containing non-breaking spaces. The whole challenge is to determine how
many such blocks should be put. In your case you seem to always have the
same content: 2 title lines, a few list items, then tables with
a certain amount of entries. If the title content and list items are
short enough to never be broken over lines, then you can easily estimate
the height of content E, substract the heights of A, B and C, which
gives you the amount of blank blocks to put.
However, I can’t think of any way to extend the borders to the final
horizontal line.
Block D is relatively easy to achieve: just put a block with negative
margin after the whole table.

> The text "PE universeel fittingen" is in the header area and can be ignored.
> 
> Maybe my table structure is not that smart, but it seemed the easiest way to 
> keep block D on the bottom. More or less... If you know a way to elongate the 
> table columns down to the table baseline regardless of empty rows, that would 
> be most welcome, too.
> 
> Regards,
>  
> Georg Datterl

HTH,
Vincent
<?xml version="1.0" standalone="no"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  <fo:layout-master-set>
    <fo:simple-page-master master-name="page"
      page-height="10cm" page-width="20cm" margin="1cm">
      <fo:region-body/>
    </fo:simple-page-master>
  </fo:layout-master-set>
  <fo:page-sequence master-reference="page">
    <fo:flow flow-name="xsl-region-body">
      <fo:table table-layout="fixed" width="100%" border-bottom="1pt solid black">
        <fo:table-column column-width="proportional-column-width(1)"/>
        <fo:table-column column-width="proportional-column-width(4)"/>
        <fo:table-body>
          <fo:table-cell>
            <fo:block keep-together.within-column="always">
              <fo:block>538000</fo:block>
              <fo:block>538001</fo:block>
            </fo:block>
            <fo:block keep-together.within-column="always">
              <fo:block>PHOTO</fo:block>
              <fo:block>PHOTO</fo:block>
              <fo:block>PHOTO</fo:block>
              <fo:block>PHOTO</fo:block>
              <fo:block>PHOTO</fo:block>
            </fo:block>
            <fo:table table-layout="fixed" width="100%">
              <fo:table-header>
                <fo:table-cell>
                  <fo:block>DRAWING</fo:block>
                  <fo:block>DRAWING</fo:block>
                  <fo:block>DRAWING</fo:block>
                  <fo:block>DRAWING</fo:block>
                  <fo:block>DRAWING</fo:block>
                </fo:table-cell>
              </fo:table-header>
              <fo:table-body>
                <fo:table-cell>
                  <fo:block> </fo:block>
                  <fo:block> </fo:block>
                  <fo:block> </fo:block>
                  <fo:block> </fo:block>
                </fo:table-cell>
              </fo:table-body>
            </fo:table>
          </fo:table-cell>
          <fo:table-cell>
            <fo:block font-weight="bold" font-size="14pt">
              <fo:block>voorlaskraag, PE100 SDR17/17.6</fo:block>
              <fo:block>gecombineerd dichtvlak: vlak en gegroefd</fo:block>
            </fo:block>
            <fo:block>blah 1</fo:block>
            <fo:block>blah 2</fo:block>
            <fo:block>blah 3</fo:block>
            <fo:block>blah 4</fo:block>
            <fo:block>blah 5</fo:block>
            <fo:block>blah 6</fo:block>
            <fo:block>blah 7</fo:block>
            <fo:block>blah 8</fo:block>
            <fo:block>blah 9</fo:block>
            <fo:block>blah 10</fo:block>
            <fo:block>blah 11</fo:block>
            <fo:block>blah 12</fo:block>
            <fo:block>blah 13</fo:block>
            <fo:block>blah 14</fo:block>
            <fo:block>blah 15</fo:block>
            <fo:block>blah 16</fo:block>
            <fo:block>blah 17</fo:block>
            <fo:block>blah 18</fo:block>
            <fo:block>blah 19</fo:block>
            <fo:block>blah 20</fo:block>
            <!--
            <fo:block>blah 21</fo:block>
            <fo:block>blah 22</fo:block>
            <fo:block>blah 23</fo:block>
            <fo:block>blah 24</fo:block>
            <fo:block>blah 25</fo:block>
            <fo:block>blah 26</fo:block>
            -->
          </fo:table-cell>
        </fo:table-body>
      </fo:table>
      <fo:block space-before="-14.4pt">PF 2 51 301 001</fo:block>
      <fo:block>Further content follows...</fo:block>
    </fo:flow>
  </fo:page-sequence>
</fo:root>

Reply via email to