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

Free Support Forum - aspose.com

Repeating Content Control Section lost in conversion

Hello,

I have a problem with Aspose.Words. After opening and saving document via:



Document doc = new Document(“c:\tmp\Aspose\Source2Convert.docx”);



doc.Save(“C:\Tmp\Aspose\converted_ASPOSE_BAD.docx”, SaveFormat.Docx);



section which contains repeating content loses data. What is strange, when i call the save to Text and after that to Docx - everytingh works fine:



Document doc = new Document(“c:\tmp\Aspose\Source2Convert.docx”);



doc.Save(“C:\Tmp\Aspose\converted_ASPOSE.txt”, SaveFormat.Text);

doc.Save(“C:\Tmp\Aspose\converted_ASPOSE_OK.docx”, SaveFormat.Docx);



I attached sample project and files. Can you help?

Hi Piotr,


Thanks for your inquiry. I tested the scenario and have managed to reproduce the same problem on my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-10779. 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.

Best regards,

Additionally, please take a look at the table, only first column converted properly. The other three are copies from the first row.

so it seems, that none of the ways work properly.

Hi Piotr,


Thanks for your inquiry. Unfortunately, this issue is not resolved yet. Currently, this issue is pending for analysis and is in the queue. We will inform you via this thread as soon as this issue is resolved. We apologize for your inconvenience.

Best regards,
Hi Piotr,

Thanks for being patient. Regarding WORDSNET-10779, our development team has completed the work on your issue and has come to a conclusion that they won't be able to implement the fix to your issue. Your issue (WORDSNET-10779) will be closed with 'Won't Fix' resolution.

The source document has w15 data binding with repeated items and Aspose.Words writes the Document correctly only if OoxmlCompliance.Iso29500_2008_Transitional explicitly set in SaveOptions. Also, writing to TXT converts sdt to normal nodes, that's why saving to DOCX after saving to TXT looks fine although SDT is lost. Please try running the following code to fix this issue:

Document doc = new Document(MyDir + @"Source2Convert.docx");

OoxmlSaveOptions options = new OoxmlSaveOptions(SaveFormat.Docx);

options.Compliance = OoxmlCompliance.Iso29500_2008_Transitional;

doc.Save(MyDir + @“out.docx”, options);


I hope, this helps.

Best regards,