Hello Martin,

Here's a mock-up of what I would use for your graphical header - in fact
this even does the graphical header we use with for odd pages quite nicely.
I think your biggest problem is the syntax of the image.  You can use
something like src="url(/logo.png)" for your image source or you can
directly refer to the drive and image (don't add the / before c:).

Take a look and see what parameters or choices you may be missing.  This
code does work as I tested it :)

        <xsl:attribute-set name="external.header.graphic">
                <!--used for fo:external-graphic, see also
external.header.graphic.block-->
                <xsl:attribute name="height">0.5in</xsl:attribute>
                <xsl:attribute name="width">0.5in</xsl:attribute>
                <!--    <xsl:attribute name="border">solid</xsl:attribute>
                <xsl:attribute name="border-width">1mm</xsl:attribute>-->
                <xsl:attribute name="scaling">uniform</xsl:attribute>
                <xsl:attribute name="scaling-method">auto</xsl:attribute>
                <xsl:attribute
name="content-width">scale-down-to-fit</xsl:attribute>
                <xsl:attribute
name="content-height">scale-down-to-fit</xsl:attribute>
        </xsl:attribute-set>
        <xsl:param name="header.column.widths">1 2 1</xsl:param>
        <xsl:param name="header.rule">0</xsl:param>
        <xsl:param name="header.table.height">.5in</xsl:param>
        <xsl:param name="headers.on.blank.pages">1</xsl:param>
        <!--used to compare blank values to-->
        <xsl:template name="header.content">
                <xsl:param name="pageclass" select="''"/>
                <!--lot means page with list of titles including TOC or list
of figures, options titlepage,lot,front,body,back,index-->
                <xsl:param name="sequence" select="''"/>
                <!--allows you to set certain entries in the sequence of the
grouping to be different than other pages or other selections first, odd,
even, blank-->
                <xsl:param name="position" select="''"/>
                <!--allows you to select left, center, or right-->
                <xsl:param name="gentext-key" select="''"/>
                <!--allows you to change selections that are auto-gfenerated
to a new auto-generation. Keys are found in common/en.xml  e.g., <l:gentext
key="TableofContents" text="Table of Contents"/>-->
                <xsl:variable name="makemeblank"/>
                <!--used to compare blank values to-->
                <xsl:variable name="candidate">
                        <xsl:choose>
                                <xsl:when test="$sequence = 'odd' and
$position = 'right'">
                                        <fo:block-container
xsl:use-attribute-sets="external.header.graphic.block">
                                                <fo:block>
                                                        <fo:external-graphic
xsl:use-attribute-sets="external.header.graphic">
        
<xsl:attribute name="src"><xsl:call-template
name="fo-external-image"><!--remember this is from
xsl/fo/graphics.xsl--><xsl:with-param
name="filename"><xsl:text>images/NumberConcepts-Header.jpg</xsl:text></xsl:w
ith-param></xsl:call-template></xsl:attribute>
        
</fo:external-graphic>
                                                </fo:block>
                                        </fo:block-container>
                                </xsl:when>
                                <xsl:otherwise>
                                        <!--do nothing-->
                                </xsl:otherwise>
                        </xsl:choose>
                </xsl:variable>
                <xsl:copy-of select="$candidate"/>
        </xsl:template>

-----Original Message-----
From: martinsig [mailto:[EMAIL PROTECTED] 
Sent: 25 April 2007 03:29
To: [email protected]
Subject: [docbook] Header some image


Hi @ all,

I try to insert an image to my header pdf output. 

Therefore I defined a customization layer looks like:

...
  <xsl:when test="$sequence = 'odd' and $position = 'right'">
       <fo:block>
         <fo:external-grafic src="url(/C:/logo.png)"/>
        </fo:block>
        <!--fo:block>hello</fo:block-->
      </xsl:when>
...

If I insert the text hello, it is in the right corner in the pdf written. 
But if I try to insert the image it do nothing! I also change the image to
jpg, bmp, png. 
Has anyone an idea how it works?

Should I customize some parameters? Like the before area?

Thank you a lot of:-)
Martin 




--
View this message in context:
http://www.nabble.com/Header-some-image-tf3644191.html#a10177258
Sent from the docbook General mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to