adding a jpg image in XSLT

Here should go questions about transforming XML with XSLT and FOP.
Jackdaniels
Posts: 1
Joined: Tue Feb 09, 2021 12:23 pm

adding a jpg image in XSLT

Post by Jackdaniels »

Hello all,

I'm trying to add a logo that will be rendered in a PDF file through XSLT.
the formula I'm trying to use is the following but it doesn't work:

<fo:block>
<fo:external-graphic src="url(file:\C:\Users\Desktop\logo.jpg)"/>
</fo:block>

Does anyone know how to make this work?
Thanks for your support.

Cheers
JD
Radu
Posts: 9413
Joined: Fri Jul 09, 2004 5:18 pm

Re: adding a jpg image in XSLT

Post by Radu »

Hi,

An URL-like path uses "/" instead of "\", so maybe you can try something like:

Code: Select all

<fo:external-graphic src="url(file:/C:/Users/Desktop/logo.jpg)"/> 
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply