3
votes

I'm new in this mailing list, so please apologize any of my wrongdoings.

FOP 1.1

Question: Is there any condition to find the position of a text-block in on PDF page.

This is the problem:

I need to change the formatting of a title-block depending on its position on the page.

  • If the title-block appears somewhere in the (vertical) middle of the page, I want to add a line on top of it.

  • if the title-block appears at the beginning/top of a page the line must not appear

Does XSL-FO have a way to do that?

1
Which rendering engine do you intend to use (FOP, Antenna House, ...) ?potame

1 Answers

0
votes

From http://lists.w3.org/Archives/Public/www-xsl-fo/2015Sep/0002.html:

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 (http://www.w3.org/TR/xsl11/#margin-top). It also requires that the FO processor will 'paint' the fo:region-before after painting the fo:region-body.