To add a watermark to the PDF output of a DITA map transformation, follow these steps:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:variable name="imageDir" select="'/common/artwork/'"/> <xsl:variable name="imageWatermarkPath"><xsl:value-of select="$imageDir"/>ExampleImage.png</xsl:variable> </xsl:stylesheet>
<!--uri name="cfg:fo/attrs/custom.xsl" uri="fo/attrs/custom.xsl"/-->
<uri name="cfg:fo/attrs/custom.xsl" uri="fo/attrs/custom.xsl"/>
<xsl:template name="insertImage"> <fo:block-container absolute-position="fixed" top="160mm"> <fo:block> <fo:external-graphic src="url({concat($customizationDir.url, $imageWatermarkPath)})" xsl:use-attribute-sets="image" /> </fo:block> </fo:block-container> </xsl:template>
<xsl:call-template name="insertImage"/>