We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Background of SVG not transparent but white

When inserting the attached SVG image using DocumentBuilder.InsertImage(byte[]) the inserted image has a white background. It should be transparent however. When drag and dropping the image into Word directly the image correctly appears with a transparent background. We are using Aspose.Words for Java 19.6.

test.zip (1.2 KB)

@bmpi

We have tested the scenario using the latest version of Aspose.Words for Java 19.6 and have not found the shared issue. Please check the attached output document. 19.6.zip (6.6 KB)

Your example looks ok because the background of the SVG and the word page’s background match, they are both white. But if you e.g. create a table with a grey background you’ll see that the SVG retains its white background even though it should be transparent. See the attached file for an example.
19.6_inside_table.docx.zip (10.9 KB)

@bmpi

We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-18800. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

Thank you.

We have another transparency related issue. If you open the attached SVG in e.g. Internet Explorer you’ll notice that the x-axis label “01.02” is not shown because its opacity is set to 0. If you insert the SVG using DocumentBuilder.insertImage the label is shown however. Can you have a look at that as well?

actual-denselinecolumn.zip (6.1 KB)

@bmpi

We have logged this problem in our issue tracking system as WORDSNET-18815 . You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

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

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