W3C home > Mailing lists > Public > www-xsl-fo@w3.org > September 2015

Re: Different formatting of a block, depending on its page position in PDF

From: Tony Graham <tgraham@antenna.co.jp>
Date: Sat, 26 Sep 2015 19:07:25 +0100
To: www-xsl-fo@w3.org
Message-ID: <5606DEDD.3050009@antenna.co.jp>
On 26/09/2015 16:00, G. Ken Holman wrote:
...
> I've attached the results of my tests, both the PDF generated by Antenna
> House and the XSL-FO.  Tests A and B work, where the title is in the
> middle of the page in test A (the hidden line is shown) and at the top
> of the page in test B (the hidden line is hidden).  But my scheme does
> not work when the title is at the bottom of the page in test C (the
> hidden line is hidden when it isn't supposed to be), so it isn't
> complete, and I see no way of making it complete.

Building on Ken's example, I used a white background on the 
fo:region-before and a negative margin on the title to 'push' the 
'border-before' of the title under the fo:region-before.

This requires that the FO processor supports negative values of 
'margin-top', which is allowed but not required [1].  It also requires 
that the FO processor will 'paint' the fo:region-before after painting 
the fo:region-body.

> Whether or not what I have can be replicated in FOP, I don't know.
> Perhaps FOP has an extension someone knows about that will help you.

I used Antenna House, since I happened to have it at hand.  I don't know 
how well this will work with FOP.

Regards,


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

[1] http://www.w3.org/TR/xsl11/#margin-top


Received on Saturday, 26 September 2015 18:08:41 UTC

This archive was generated by hypermail 2.3.1 : Saturday, 26 September 2015 18:08:41 UTC