SVG with linked images conversion
Posted: 2019-01-16T09:56:39-07:00
Hi,
I'm having an issue converting SVG files with linked images. Embedded images work fine though.
I have in a SVG file I'm testing the following line:
<image xlink:href='C:/Data/0160019002-13.png' x='6mm' y='96mm' height='8mm' width='33.7mm' />
When opening the SVG file using a browser, the image appears fine, but after converting it to PDF or PNG with Magick.NET and opening them, the image does not appear in the resulting file.
I'm using the Magick.NET-Q8-x64 NuGet package, running it in a Windows 10 machine, with the following code:
I tried also to change C:/Data/0160019002-13.png to file:///C:/Data/0160019002-13.png or C:\Data\0160019002-13.png, to no avail.
Anyone knows what can be done so those linked images get rendered in the PDF file I'm saving?
I'm having an issue converting SVG files with linked images. Embedded images work fine though.
I have in a SVG file I'm testing the following line:
<image xlink:href='C:/Data/0160019002-13.png' x='6mm' y='96mm' height='8mm' width='33.7mm' />
When opening the SVG file using a browser, the image appears fine, but after converting it to PDF or PNG with Magick.NET and opening them, the image does not appear in the resulting file.
I'm using the Magick.NET-Q8-x64 NuGet package, running it in a Windows 10 machine, with the following code:
Code: Select all
ImageMagick.MagickReadSettings rs = new ImageMagick.MagickReadSettings()
{
TextEncoding = Encoding.UTF32
};
ImageMagick.MagickImage i = new ImageMagick.MagickImage(sourcefile, rs);
i.Write(destfile, ImageMagick.MagickFormat.Pdf);
Anyone knows what can be done so those linked images get rendered in the PDF file I'm saving?