How to transparent image in fo:external-graphic

Hi everyone,
I’m using ** fo:external-graphic/ ** tag to insert background or watermark images in my pdf and I want to apply transparent property to my images (like using the alpha channel in (r,g,b, a)). However, this property seems not to work in this tag, can anyone help me show the way to achieve that purpose?
Thank you so much!

1 Like

I’ve find the way to resolve this by using fo:instream-foreign-object . Here is my code
<fo:instream-foreign-object> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="8.5in" height="11in"> <image xlink:href="${logoLocation.getUri()}" opacity="0.8" width="8.51in" height="11in" preserveAspectRatio="none"/> </svg> </fo:instream-foreign-object>

2 Likes