Image inside table cell in header in XML document is not visible when convert file to DOCX

I am using docio.net.core vs 18.3.0.48 to convert xml files from word to *.doc format.
However, I have an anomaly when I include a table cell with an image inside in document header.
In that case the image is not rendered in the resulting file.
I have attached examples and the code I am using:

private static WordDocument FromXMLtoDOC(String strXML)
        {
            WordDocument wordDoc = new WordDocument();
            try
            {
                wordDoc.UpdateStylesOnOpen = true;
                wordDoc.Open(strXML.ToStream(), FormatType.Doc);
               
                //TEST->Exit to ----------------- file
                Stream file3 = File.Create("outputdoc.doc");
                file3.Position = 0;
                wordDoc.Save(file3, OutputFormat);
                file3.Close();

                return wordDoc;

            }
            catch (Exception e) { return null; }
        }




Attachment: SAMPLE_56165524.7z

4 Replies 1 reply marked as answer

HC Hemalatha Chiranjeevulu Syncfusion Team November 13, 2020 05:11 PM UTC

Hi Esther,

Thank you for contacting Syncfusion support.

We can reproduce the reported image preservation issue in our end, and we suspect it to be a defect. We will validate this issue and update you with more details on 17th November 2020.

Please let us know if you have any other questions.

Regards,
Hemalatha C



HC Hemalatha Chiranjeevulu Syncfusion Team November 17, 2020 12:54 PM UTC

Hi Esther,

Thank you for your patience.

On further analyzing the given document, we have found that the corresponding element in header is shape filled with picture. Currently DocIO doesn’t have support for shape filled with picture preservation in DOC conversion.

To resolve this we suggest you to use the picture as normal image in the input document.
For your reference, we have attached the modified document to meet your requirement which can be download from the below link:
https://www.syncfusion.com/downloads/support/forum/159655/ze/inputdoc_modified1055093309

Please let us know if you have any other questions.

Regards,
Hemalatha C


Marked as answer

EG Esther Garcia del Barrio November 24, 2020 12:02 PM UTC

Hi, Hemalatha! Sorry for the delay in my response, I have not been able to check the solution you proposed until today. In fact, inserting the image as you indicate works perfectly.
Thanks again, you are amazing


MJ Mohanaselvam Jothi Syncfusion Team November 25, 2020 08:06 PM UTC

Hi Esther,

We are glad to know that our solution meet your requirement. Please get back to us for further assistance.

Regards,
Mohanaselvam 


Loader.
Up arrow icon