I\'m using a image inside the HMTL code like here below:
A workaround is to convert the .SVG files to .PNG files before converting to .PDF. The .SVG code can be extracted via AgilityPack or read the files as a string. Then use the Svg library to convert to .PNG as follows:
var svg = SvgDocument.FromSvg(svgXmlAsString);
var bitmap = svg.Draw();
var codec = "image/png".ParseImageCodecInfo();
// intermediaryStream required due to image.Save attempting read access
using (var intermediaryStream = new MemoryStream())
{
bitmap.Save(intermediaryStream, codec);
intermediaryStream.Position = 0;
await intermediaryStream.CopyToAsync(responseStream);
await intermediaryStream.FlushAsync();
await responseStream.FlushAsync();
}