Re: Splitting wide tables over a few pages

On 05/09/2016 11:34, Alexey Morozov wrote:
> I would like to ask if it's possible in XSL-FO to spread tables with
> many columns over a few pages as described in this SO question:
> http://stackoverflow.com/questions/15361120/tables-in-pdf-with-horizontal-page-breaks
> .. The key point as I understand is to align
> heights of cells on adjacent pages.

Using the XSLT Extensions [1] from the PPL CG, get the area tree for a
double-width table on a very long table and, based on the rows' heights,
generate a separate fo:table (with fixed row heights) for the cells on
each page of the split table.

That won't work very well if you want to table cells to be able to split
over a page. The more low-tech solution is to generate two complete
copies of the table that go into separate fo:flow and to set up your
page masters so that one fo:flow goes into the fo:region-body on
left-hand pages only and the other goes into right-hand pages only. The
real low-tech part of it is to set a negative left margin on the
right-hand page so that only the right-hand side of the table appears in
the fo:region-body area and use 'overflow="hidden"' and/or use
'color="white"' [2] so that the parts of each table that you don't want
to see on each page aren't visible. If the wide table isn't in a
separate fo:page-sequence, if you're using AH Formatter V6.3, then you
can use a nested fo:page-sequence [3] for the table, otherwise you may
be able to use Ken's PSMI technique [4].

If you're using AH Formatter V6.3, you could, instead, set up a Spread
Page Master [5] with an axf:spread-region that covers all of both
fo:region-body and put the table in an fo:flow that flows into the
axf:spread-region. You'd then have the option of generating the table so
that table cells also fill the gutter between the two fo:region-body or
generating the table with a column of empty fo:table-cell (with white or
no horizontal borders) to cover the gutter.

Regards,


Tony Graham.
-- 
Senior Architect
XML Division
Antenna House, Inc.
----
Skerries, Ireland
tgraham@antenna.co.jp


[1] https://www.w3.org/community/ppl/wiki/XSLTExtensions
[2] IIRC, I got the 'color' idea from a SO post by Kevin Brown
[3] https://www.antennahouse.com/product/ahf63/ahf-ext.html#fo.page-sequence
[4] http://cranesoftwrights.com/resources/index.htm#psmi
[5] https://www.antennahouse.com/product/ahf63/ahf-spread.html

Received on Monday, 5 September 2016 16:57:33 UTC