[xep-support] Re: Page break in bottom-aligned table cell

From: Kevin Brown <kevin@renderx.com>
Date: Mon Jun 18 2012 - 14:53:56 PDT

A tough one ... I will need to think it through. How "short" is the "short
string" ... is it always a defined/known height?

First glance, I am thinking do two rows with the second having a known
negative padding if the total line height in the second column is known.
There could be additional tricks to give a larger negative padding and then
a block with display-align="after" to get to the same answer ...

If yes, you could try the following ... first table shows the problem, the
second shows one possible workaround with limitations of course. You could
also use some "keep" glue to be sure you don’t have an a table ending
exactly at one page that causes some issues:

<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"
        xmlns:rx="http://www.renderx.com/XSL/Extensions"
font-family="Helvetica" font-size="11pt">
        <fo:layout-master-set>
                <fo:simple-page-master margin-top=".5in" margin-left="1in"
margin-bottom="1in"
                        margin-right="3in" page-width="8.5in"
page-height="11in" master-name="first">
                        <fo:region-body margin-top="1in"
margin-bottom="0pt"/>
                        <fo:region-before extent="1in"/>
                </fo:simple-page-master>
        </fo:layout-master-set>
        <fo:page-sequence master-reference="first">
                <fo:static-content flow-name="xsl-region-before">
                        <fo:block>Display Align After Problem</fo:block>
                </fo:static-content>
                <fo:flow flow-name="xsl-region-body">
                        <fo:block>Testing table continuation
headers</fo:block>
                        <fo:table width="100%" border-style="solid"
border-width="1pt">
                                <fo:table-column column-width="3in"/>
                                <fo:table-column column-width="3in"/>
                                <fo:table-body>
                                        <fo:table-row>
                                                <fo:table-cell>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                </fo:table-cell>
                                                <fo:table-cell
display-align="after">
                                                        <fo:block-container
display-align="after">
        
<fo:block>Diplay me at end</fo:block>
        
</fo:block-container>
                                                </fo:table-cell>
                                        </fo:table-row>
                                </fo:table-body>
                        </fo:table>
                        <fo:block
page-break-after="always"><fo:leader/></fo:block>
                        <fo:table width="100%" border-style="solid"
border-width="1pt">
                                <fo:table-column column-width="3in"/>
                                <fo:table-column column-width="3in"/>
                                <fo:table-body>
                                        <fo:table-row>
                                                <fo:table-cell>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                        <fo:block
padding-top="18pt">I am the left cell content</fo:block>
                                                </fo:table-cell>
                                                <fo:table-cell>
                                                        <fo:block/>
                                                </fo:table-cell>
                                        </fo:table-row>
                                        <fo:table-row>
                                                <fo:table-cell>
                                                        <fo:block/>
                                                </fo:table-cell>
                                                <fo:table-cell>
                                                                <fo:block
padding-top="-14pt">Diplay me at end</fo:block>
                                                </fo:table-cell>
                                        </fo:table-row>
                                </fo:table-body>
                        </fo:table>
                </fo:flow>
        </fo:page-sequence>
</fo:root>

-----Original Message-----
From: xep-support-bounces@renderx.com
[mailto:xep-support-bounces@renderx.com] On Behalf Of François Yergeau
Sent: Friday, June 15, 2012 1:30 PM
To: xep-support@renderx.com
Subject: [xep-support] Page break in bottom-aligned table cell

Hello all,

I have a simple table with two columns and only one row. The right-hand cell
has display-align="after" and contains just a short string. The left-hand
column has more text than can fit in a page, so there is a page break. The
problem is that the text in the right-hand column prints at the bottom of
the first page, instead of sinking down to the very bottom of the table row
as (I think) it should.

The right-hand cell obviously extends to the second page (as can be made
plain with a border), but XEP doesn't seem to want to take advantage of that
and put the text there.

Opinions, suggestions, criticism and workarounds are all welcome.

Complete FO test case below.

<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="page" page-width="8.5in"
page-height="11in" margin-top="42pt" margin-right="48pt+ 2.5in"
margin-bottom="24pt + 2in" margin-left="48pt"> <fo:region-body
region-name="xsl-region-body" margin-top="26pt"
margin-bottom="36pt"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="page"> <fo:flow
flow-name="xsl-region-body"> <fo:table> <fo:table-column
column-width="250pt"/> <fo:table-column column-width="70pt"/>
<fo:table-body> <fo:table-row> <fo:table-cell start-indent="5pt"
end-indent="5pt"
display-align="before" border="0.5pt solid black"> <fo:block
text-align-last="justify">Lorem ipsum dolor sit amet, consectetaur
adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
sunt in culpa qui officia deserunt mollit anim id est laborum Et harumd und
lookum like Greek to me, dereud facilis est er expedit distinct. Nam liber
te conscient to factor tum poen legum odioque civiuda. Et tam neque pecun
modut est neque nonor et imper ned libidig met, consectetur adipiscing elit,
sed ut labore et dolore magna aliquam makes one wonder who would ever read
this stuff? Bis nostrud exercitation ullam mmodo consequet. Duis aute in
voluptate velit esse cillum dolore eu fugiat nulla pariatur. At vver eos et
accusam dignissum qui blandit est praesent luptatum delenit aigue excepteur
sint occae. Et harumd dereud facilis est er expedit distinct. Nam libe
soluta nobis eligent optio est congue nihil impedit doming id Lorem ipsum
dolor sit amet, consectetur adipiscing elit, set eiusmod tempor incidunt et
labore et dolore magna aliquam. Ut enim ad minim veniam, quis nostrud exerc.

Irure dolor in reprehend incididunt ut labore et dolore magna aliqua. Ut
enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in
voluptate velit esse molestaie cillum. Lorem ipsum dolor sit amet,
consectetaur adipisicing elit, sed do eiusmod tempor incididunt ut labore et
dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
sunt in culpa qui officia.<fo:leader leader-pattern="dots"/></fo:block>
</fo:table-cell>
<fo:table-cell start-indent="5pt" end-indent="5pt" display-align="after"
border="0.5pt solid black">
<fo:block>$1000.00</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>

--
François Yergeau
Xcential Group LLC
!DSPAM:87,4fdb9b6e63731790015949!
_______________________________________________
(*) To unsubscribe, please visit
http://lists.renderx.com/mailman/options/xep-support
(*) By using the Service, you expressly agree to these Terms of Service
http://w ww.renderx.com/terms-of-service.html
_______________________________________________
(*) To unsubscribe, please visit http://lists.renderx.com/mailman/options/xep-support
(*) By using the Service, you expressly agree to these Terms of Service http://w
ww.renderx.com/terms-of-service.html
Received on Mon Jun 18 14:44:35 2012

This archive was generated by hypermail 2.1.8 : Mon Jun 18 2012 - 14:44:42 PDT