On 01/27/2012 03:31 PM, Gary Lam wrote:
>
> I'm currently using the ditac command line to convert bookmap into PDF
> I've created a custom style-sheet for the title page by overwriting some
> of the attributes set in the stock styles.
> However, I seem to be having problems referencing an external image onto
> the title page with the error as follows:
>
> In my CustomStyle Sheet
> I have the attributes as follows
>
> <xsl:attribute-set name="document-title"
> use-attribute-sets="title-page-block-style">
> <xsl:attribute name="text-indent">25px</xsl:attribute>
> <xsl:attribute name="padding-top">13em</xsl:attribute>
> <xsl:attribute name="font-family">sans-serif</xsl:attribute>
> <xsl:attribute name="font-weight">normal</xsl:attribute>
> <xsl:attribute name="font-size">33px</xsl:attribute>
> <xsl:attribute name="color">white</xsl:attribute>
> <xsl:attribute name="background-color">#1f95d3</xsl:attribute>
> <xsl:attribute name="background-image">CoverImage.png</xsl:attribute>
> <xsl:attribute name="background-repeat">no-repeat</xsl:attribute>
> </xsl:attribute-set>
>
> But this throw me an error with the following
>
> "ditac: ERROR: SEVERE: Image not found. URI: CoverImage.Png. (See
> position 1:28684)
> ditac: ERROR: Jan 26, 2012 5:55:47 PM
> org.apache.fop.events.LoggingEventListener processEvent"
>

This error is reported by FOP (when invoked by ditac to generate PDF).

I don't know how FOP resolves URIs specified as the value of attribute 
background-image (relatively to the location of your custom XSLT 
stylesheet?).

Obviously, a simply workaround is to specify an *absolute* *URI*. For 
example, on Windows:

url(file:/C:/docs/xsl/resources/CoverImage.png)

If, after doing that, you still have an error, then it's probably 
because  your url() construct is incorrect. Many of our customers and 
users don't get it right, so we have written this FAQ -- 
http://www.xmlmind.com/foconverter/faq.html#image_not_showing -- which 
also applies to your case.
 
--
XMLmind DITA Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/ditac-support

Reply via email to