Hi Puja,

Put the block-container into the body region after the text to overlay. FOP renders block-container's in the order it encounters them in the XXSL-FO. region-* are always rendered before the body, so the body contents will always overlay any block-containers placed in region-*

Thanks,

Chris

On 30/06/2015 15:13, Puja Jain wrote:
I’m trying to overlay a watermark over text by placing the watermark in <fo:region-after> as per the FOP documentation in https://xmlgraphics.apache.org/fop/0.95/output.html. But the watermark is always rendered under the text. How can I get the watermark to overlay over the text?

Here’s the code snippet:

<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  <fo:layout-master-set>
      <fo:simple-page-master
          master-name="A4" margin-top="1.5cm" margin-bottom="1.5cm"
          margin-left="1.25cm" margin-right="1cm">
          <fo:region-body />
          <fo:region-after extent="11in"/>
      </fo:simple-page-master>
  </fo:layout-master-set>

     <fo:page-sequence master-reference="A4">
      <fo:static-content flow-name="xsl-region-after">
          <fo:block-container position="absolute" top="80px" left="0px">
<fo:block display-align="center" font-weight="bold" font-size="40pt" color="red”>Watermark
            </fo:block>
          </fo:block-container>
    </fo:static-content>


      <fo:flow flow-name="xsl-region-body" font-size="20pt">
      <fo:block-container>
<fo:block margin-top="0px">This text should appear under the watermark
          </fo:block>
          </fo:block-container>
          </fo:flow>
    </fo:page-sequence>

Thanks,
Puja


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscr...@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-h...@xmlgraphics.apache.org

Reply via email to