Hi,
When I add a very minimal SVG file to a Word document, I get the following exception:
System.Xml.XmlException: 'For security reasons DTD is prohibited in this XML document. To enable DTD processing set the DtdProcessing property on XmlReaderSettings to Parse and pass the settings into XmlReader.Create method.'
The following code generates the exception. Also attached is the SVG file.
WordDocument document = new WordDocument();
IWSection section = document.AddSection();
IWParagraph firstParagraph = section.AddParagraph();
byte[] imageBytes = File.ReadAllBytes("images/hello.png");
byte[] svgData = File.ReadAllBytes("images/hello.svg");
IWPicture picture = firstParagraph.AppendPicture(svgData, imageBytes);
Attachment:
hello_f586246a.zip