Blurry SVG image in doc file

Hello,

a small bug.
If you start from a *.doc (not docx), insert an svg image and save the file as *.doc, the image is blurry.
If you save as *.docx, the image is perfect.

Best regards
Luca

This is a testing code

class Program
{
    static void Main(string[] args)
    {
        bool version_22_ck = Aspose.Words.BuildVersionInfo.Version.Contains("18.") ? false : true;
        Aspose.Words.License license = new Aspose.Words.License();
        string templatePath = "Test_SVG.doc";
        string fileNamePath = "myimage.svg";
        if (version_22_ck)
        {
            //versione 22.8
            //verssione 23.7
            license.SetLicense("Aspose.Words.NET.lic");
        }
        else
        {
            //versione 18.1
            //versione 18.2
            license.SetLicense("Aspose.Words.lic");
        }

        Aspose.Words.Document wordDocument = null;
        wordDocument = new Aspose.Words.Document(templatePath);

        //Create a list of the names of the bookmarks
        List<string> lst_name = wordDocument.Range.Bookmarks.Cast<Aspose.Words.Bookmark>().Select(b => b.Name).ToList();
        Aspose.Words.Bookmark bm = wordDocument.Range.Bookmarks[lst_name[0]];

        string bm_name = bm.Name;
        bm_name = "disegno_1";

        Aspose.Words.Drawing.Shape shp = WordSupport.InsertImageIntoBookmark(wordDocument, bm_name, fileNamePath, rotation_mode: 1);
        // per avere un'immagine di H=22 cm
        //shp.Height = 623; -> conversione punti tipografici 1 pto = 0,0352778 cm con 72dpi
        if (shp.Rotation == 0)
        {
            shp.Height = 623;
        }
        else
        {
            shp.Width = 623;
        }

        wordDocument.UpdateFields();
        wordDocument.Save("Test_SVG_save.doc");
        wordDocument.Save("Test_SVG_save.docx");
        wordDocument = new Aspose.Words.Document("Test_SVG_save.docx");
        wordDocument.Save("Test_SVG_save.pdf");

    }

    public static Aspose.Words.Drawing.Shape InsertImageIntoBookmark(Aspose.Words.Document document, string bookmarkName, string fileName, Aspose.Words.Drawing.WrapType wrapType = Aspose.Words.Drawing.WrapType.Inline, bool behindText = true, int rotation_mode = 0)
    {
        Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(document);
        builder.MoveToBookmark(bookmarkName);

        Aspose.Words.Drawing.Shape shape = builder.InsertImage(fileName);

        shape.WrapType = wrapType;
        shape.BehindText = behindText;

        //shape.RelativeHorizontalPosition = Aspose.Words.Drawing.RelativeHorizontalPosition.Page;
        //shape.HorizontalAlignment = Aspose.Words.Drawing.HorizontalAlignment.Center;
        //shape.RelativeVerticalPosition = Aspose.Words.Drawing.RelativeVerticalPosition.Page;
        //shape.VerticalAlignment = Aspose.Words.Drawing.VerticalAlignment.Center;

        //rotation_mode: 0=non ruota, 1=se immagine ha forma orizzontale, viene ruotata in senso antiorario di 90° per assumere aspetto verticale, 2=se immagine ha forma verticale, viene ruotata ins enso orario di 90° per assumere aspetto orizzontale 
        // Rotation=-90 immagine viene ruotata di 90 gradi in senso antiorario
        if (rotation_mode == 1 && (shape.Width > shape.Height))
        {
            shape.Rotation = -90;
        }
        else if (rotation_mode == 2 && (shape.Width < shape.Height))
        {
            shape.Rotation = 90;
        }

        return shape;
    }
}

@ceck Could you please attach your input and output documents here for testing? We will check the issue and provide you more information.
DOC format does not allow storing SVG images as SVG, so only fallback PNG image is stored in DOC format. This might be the reason of the problem.

Hello

please find the link to a sample c# project, I removed the Aspose lic files.

https://www.dropbox.com/s/sawmq4vtqq4w3tz/AsposeTest_SVG.zip?dl=0

Another note: the bug is present only in versions 22.8 and 23.7. I tried it out version 18.2 and it works.

Best regards
Luca

@ceck
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-26483

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.