Insert SVG Image with Text font-weight in Word Document using C# .NET and Convert to DOC Format

Consider this minimal code that inserts an SVG image:

var doc = new Document();
var builder = new DocumentBuilder(doc);
builder.InsertImage(@"image.svg");
doc.Save("test.doc");

This is a minimal SVG with font-weight set:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"[]>
<svg width="450px" height="390px" font-size="6.5" font-family="Arial" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xml="http://www.w3.org/XML/1998/namespace" version="1.1">
  <g transform="translate(0, 10)">
    <text>foo</text>
    <text transform="translate(20, 0)" font-weight="700">bar</text>
  </g>
</svg>

The SVG looks like this:

2020-03-25 10_43_01-test.svg.png (347 Bytes)

But Aspose.Words creates document ignoring the font weight (zoomed in):

2020-03-25 10_44_14-test.doc - Compatibility Mode - Word.png (787 Bytes)

Insert into a Microsoft Word document using Microsoft Word itself produces a correct image:

2020-03-25 10_45_34-Document1 - Word.png (832 Bytes)

@kristofferjalen,

We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-20188. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-20188) have been fixed in this Aspose.Words for .NET 20.6 update and this Aspose.Words for Java 20.6 update.