S
Simon Stuber
Hello,
I'm using Docbook XML 4.2 and FOP 0.20.5 to create a pdf from my xml
source. I can generate the pdf with no problem, however I could not
manage to include our company logo within the header. The pdf is
created with the correct header, but there is no image.
What I did:
I copied the whole header.template section from pagesetup.xsl into my
customization layer, and tried to insert the picture in the 'right'
section:
<xsl:template name="header.content">
<xslaram name="pageclass" select="''"/>
<xslaram name="sequence" select="''"/>
<xslaram name="position" select="''"/>
<xslaram name="gentext-key" select="''"/>
<fo:block>
<!-- sequence can be odd, even, first, blank -->
<!-- position can be left, center, right -->
<xsl:choose>
.... snip ...
<xsl:when test="$position='right'">
<fo:external-graphic src="logo.gif"/>
<!-- Same for odd, even, empty, and blank sequences -->
<xsl:call-template name="draft.text"/>
</xsl:when>
.... snip ...
</xsl:template>
The logo.gif is in the same directory as the xml. I also tried
<fo:external-graphic src="url('logo.gif')"/>, but it doesn't work
either.
I thought that the image might be to big to fit into the header, but
neither making it very small nor enlarging the right section of the
header was successfull.
Does anybody have an idea what is wrong? I would highly appreciate a
customization layer example with an image in the header.
Thanks a lot,
Simon Stuber
I'm using Docbook XML 4.2 and FOP 0.20.5 to create a pdf from my xml
source. I can generate the pdf with no problem, however I could not
manage to include our company logo within the header. The pdf is
created with the correct header, but there is no image.
What I did:
I copied the whole header.template section from pagesetup.xsl into my
customization layer, and tried to insert the picture in the 'right'
section:
<xsl:template name="header.content">
<xslaram name="pageclass" select="''"/>
<xslaram name="sequence" select="''"/>
<xslaram name="position" select="''"/>
<xslaram name="gentext-key" select="''"/>
<fo:block>
<!-- sequence can be odd, even, first, blank -->
<!-- position can be left, center, right -->
<xsl:choose>
.... snip ...
<xsl:when test="$position='right'">
<fo:external-graphic src="logo.gif"/>
<!-- Same for odd, even, empty, and blank sequences -->
<xsl:call-template name="draft.text"/>
</xsl:when>
.... snip ...
</xsl:template>
The logo.gif is in the same directory as the xml. I also tried
<fo:external-graphic src="url('logo.gif')"/>, but it doesn't work
either.
I thought that the image might be to big to fit into the header, but
neither making it very small nor enlarging the right section of the
header was successfull.
Does anybody have an idea what is wrong? I would highly appreciate a
customization layer example with an image in the header.
Thanks a lot,
Simon Stuber