Re: table cell duplication

2009-02-05 Thread Vincent Hennebert
Hi Georg,

Georg Datterl wrote:
 Hi Jost, hi Vincent
 
 I could use a combination of your ideas. If I just put the drawings in a 
 table header and fill the table body with empty cells, I still have to keep 
 in mind that a new page means, the header is reprinted, therefore the body 
 moves down. Since I don't know, over how many pages the table spans, I don't 
 know for how many headers I should include in my calculation. 
 I could generate the document with only one set of drawings. Then I would 
 know how many pages a table spans and I would know, how long the table body 
 should be. Only if the last part of the table is shorter than the drawings, 
 the bottom line of the complete DesignTable would move down and the page 
 spanning of further DesignTables can be influenced. So worst case I would 
 have to generate the whole page-sequence once for each DesignTable. 
 Performance nightmare, but it should give the desired result. 

This would have to be tested, but I think you can estimate the height of
the blank content accurately enough. If you have the height of content E
and the height of pages, then you can compute the maximum number of
pages over which the DesignTable can be spread. So the maximum number of
times drawing C would appear, and substract that number of times from
the height of the blank content. That should allow you to avoid
re-generating the whole page-sequence once for every DesignTable.

By making a post-process based on the informations of the intermediate
format, you could probably manage to get the borders of the tables
inside content E extended until the bottom of the DesignTable.

 Vincent, could I just insert multiple copies of the drawings block and 
 add a break-before=page all but the first block?

Yes, if you use the post-process approach, then you don’t need to worry
about using a table. In spite of the multiple processings problem that
you identified above, this approach may be better if you can’t
accurately estimate the height of content E.


 Georg Datterl

snip/

HTH,
Vincent


Re: table cell duplication

2009-02-04 Thread Vincent Hennebert
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:block538000/fo:block
  fo:block538001/fo:block
/fo:block
fo:block keep-together.within-column=always
  fo:blockPHOTO/fo:block
  fo:blockPHOTO/fo:block
  fo:blockPHOTO/fo:block
  fo:blockPHOTO/fo:block
  fo:blockPHOTO/fo:block
/fo:block
fo:table table-layout=fixed width=100%
  fo:table-header
fo:table-cell
  fo:blockDRAWING/fo:block
  fo:blockDRAWING/fo:block
  fo:blockDRAWING/fo:block
  fo:blockDRAWING/fo:block
  fo:blockDRAWING/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:blockvoorlaskraag, PE100 SDR17/17.6/fo:block
  fo:blockgecombineerd dichtvlak: vlak en gegroefd/fo:block
/fo:block
fo:blockblah 1/fo:block
fo:blockblah 2/fo:block
fo:blockblah 3/fo:block
fo:blockblah 4/fo:block
fo:blockblah 5/fo:block
fo:blockblah 6/fo:block
fo:blockblah 7/fo:block
fo:blockblah 8/fo:block
fo:blockblah 9/fo:block
fo:blockblah 10/fo:block
fo:blockblah 11/fo:block
fo:blockblah 12/fo:block
fo:blockblah 13/fo:block
fo:blockblah 14/fo:block
fo:blockblah 15/fo:block
fo:blockblah 16/fo:block
fo:blockblah 17/fo:block
fo:blockblah 18/fo:block
fo:blockblah 19/fo:block

Re: table cell duplication

2009-02-03 Thread Jeremias Maerki
Smells table-marker-ish to me. A block-container in the table-header
(retrieved through retrieve-table-marker) could display the second CCC
in the right position.

The only problem: someone has to implement table markers first. But I
think this would be better than to introduce yet another extension.

On 03.02.2009 09:21:39 Georg Datterl wrote:
 Hello everybody,
 
 for my project I need one final feature: Table cell duplication. Imagine a 
 Table like this:
 
 TH1 TH2
 AAA EEE
 BBB EEE
 CCC EEE
 EEE
 EEE
 EEE
 DDD EEE
 
 Two columns, four rows, Block E spans all four rows, A aligns with the top of 
 the table, B and C follow, D aligns with the bottom of the table. A, B, C and 
 D always keep-together. Now, if Block E breaks to a new page, it usually 
 looks like this:
 
 AAA EEE
 BBB EEE
 CCC EEE
 EEE
 ---break---
 TH1 TH2
 EEE
 EEE
 DDD EEE
 
 What I want is:
 
 AAA EEE
 BBB EEE
 CCC EEE
 EEE
 ---break---
 TH1 TH2
 CCC EEE
 EEE
 DDD EEE
 
 Basically, the complete block C should be repeated on the next page, if the 
 table breaks. As far as I was able to see, this is not supported by the 
 specification, so I assume, I have to write my own extension. I'd be grateful 
 for any ideas how to solve that in a supported way or any comments on where 
 and how to implement the extension. 
 
 Regards,
  
 Georg Datterl



Jeremias Maerki