adding a jpg image in XSLT

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

adding a jpg image in XSLT

Post by Jackdaniels » Tue Feb 09, 2021 12:26 pm

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:external-graphic src="url(file:\C:\Users\Desktop\logo.jpg)"/>

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


Posts: 7529
Joined: Fri Jul 09, 2004 5:18 pm

Re: adding a jpg image in XSLT

Post by Radu » Tue Feb 09, 2021 12:32 pm


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)"/> 
Radu Coravu
<oXygen/> XML Editor

Post Reply