Hello, Aspose Team !
In my Java code, I try to insert images, using Aspose.Words library.
For reach better quality of generated document we want to use SVG format of image in logo.
I try to insert SVG image directly in Shape object from InputStream:
com.aspose.words.Document document = new com.aspose.words.Document();
com.aspose.words.DocumentBuilder builder = new com.aspose.words.DocumentBuilder(document);
com.aspose.words.Shape shape = builder.insertImage(InputStream, 300.0, 100.0);
The SVG format of image may use group engine, which allow the possible to create multi-layered images. Some group may have display=“none” attribute in the tag and it is meaning that the layer is hidden and should not rendered to generated document. But, when I tried insert image to Word document, then I found that all layers of image was rendered and inserted into the Shape object of document. It seems like the display=“none” attribute in group tag was ignored and whole SVG was rendered and inserted in Document.
I tried that different ways with Aspose.Words 18.10 version, as well with newest 19.4 version of library, but it was unsuccessful and with the same result for DOC or DOCX format of documents.
Here is the jUnitTest with example of generated documents:
CannotLoadNativeDLL.zip (80.6 KB)