Re: Relative path for images in FOP
Mansour Al Akeel <[email protected]>
| Newsgroups | gmane.text.xml.cocoon.user |
|---|---|
| Message-ID | <CAFvvX=Zid3Y1nPfGOv+Ox2uQ-vrVNa9gtRvyGL8qrGQ_7UWYCg@mail.gmail.com> |
OK, I was able to do this: <xsl:param name="baseUrl" /> .... then <xsl:value-of select="concat($baseUrl , 'xslts/logo.png' )" /> It works, but I am wondering if there's a better way to let the serializer get the relative path of the images. On Sun, Mar 10, 2013 at 1:18 AM, Mansour Al Akeel <[email protected]> wrote: > I have this: > > <fo:block> > <fo:external-graphic src="url('logo.png')" height="2.00in" width="5.00in" /> > <xsl:apply-templates select="head" /> > ...... > > I am getting this in the logs: > > 2013-03-10 01:12:29,952 btpool0-1 ERROR apps.FOUserAgent - Image not > found. URI: logo.png. (No context info available) > > And of course the image doesn't show on the generated pdf page. I > tried all possible combinations of the image path: > > src="logo.png" > src="url('COB-INF/xslts/fo/logo.png')" > > The only thing that worked was the absolute path. However, this is not > an option when deploying to the server. So my question is, how do I > get fo2pdf serializer to resolve relative paths ?? > > Thank you.