Can't seem to render images using fo:external-graphic
Does anyone know why I can't seem to render images using fo:external-graphic? I've got the following code which loops through any images stored inside a folder:
@{ var mediaFolderId = Model.itemImageGallery; var folder = Library.MediaById(mediaFolderId); }
and then:
<fo:block font-size="10pt" margin-bottom="15mm"> @{ if (folder != null && folder.Children.Count() > 0) { foreach (var media in folder.Children) { <fo:block> <fo:external-graphic src="@media.umbracoFile"></fo:external-graphic> </fo:block> } } } </fo:block>
If I remove the <fo:external-graphic> tag and just have @media.umbracoFile in the block then it renders the path to the image fine, i.e.
Can't seem to render images using fo:external-graphic
Does anyone know why I can't seem to render images using fo:external-graphic? I've got the following code which loops through any images stored inside a folder:
and then:
If I remove the <fo:external-graphic> tag and just have @media.umbracoFile in the block then it renders the path to the image fine, i.e.
/media/1012/file01.jpg
/media/1012/file02.jpg
/media/1012/file03.jpg
/media/1012/file04.jpg
etc...
So I'm not sure why it then doesn't render anything when writing:
<fo:external-graphic src="@media.umbracoFile"></fo:external-graphic>
I'm clearly missing something here. Any ideas?
Many thanks,
Mike
It seems that the full absolute path to the image needs to be used, so:
which I guess makes sense for 'external-graphic'.
is working on a reply...