HI Team,
We detected that some content was lost when converting from html to doc using Aspose.word .net
Note: Html document (Html document also converted word to html using aspose.word)
Sample Coding we are using :
Aspose.Words.License license2 = new Aspose.Words.License();
license2.SetLicense(“Aspose.Total.lic”);
Aspose.Words.Document doc1 = new Aspose.Words.Document(@“D:\FileTest\New folder\HTMLTable.html”);
doc1.Save(@“D:\FileTest\New folder\HTMLTabletoWord.docx”, Aspose.Words.SaveFormat.Docx);
HTML Document screenshot:HTML Docuemnt.png (25.7 KB)
Issue word document:Content lost in Word doc.png (44.1 KB)
Sample Document:Sample_Doc.zip (11.3 KB)
Thanks.
@thiru1711 Thank you for reporting the problem to us. For a sake of correction it has been logged as WORDSNET-24380. We will keep you updated and let you know once it is resolved or we have more information for you.
HI @alexey.noskov,
Thanks for the replay, Any other way to fix the issue(temporary solution or workaround solution) ,
This is very important functionality to us.
Kindly do the needful.
Thanks.
@thiru1711 Currently the issue is in the queue for analysis. Once analysis is done we will provide you more information and possible workarounds.
@thiru1711 We have completed the analysis of this issue. The problem occurs because the content of the last two cells in the table is malformed:
<td>
<p>
<span style="-aw-bookmark-end:_Hlk98239278">Z
<p>
<span style="-aw-bookmark-end:_Hlk98239278"></span>
<span></span>
</p>
</span>
</p>
</td>
The Aspose.Words’ HTML reader treats spans that have the “-aw-bookmark-end” as bookmark end marks and ignores their content.
HI @alexey.noskov,
Thanks for the replay, Our application purpose we are using bookmark,
Don’t ignore the bookmark content, need to convert with bookmark content(html doc) in to word document.
Excepted output: All the html content should be display in word document
Thanks.
@thiru1711 Sure, we understand what is the expected output and will consider changing Aspose.Words behavior. But since -aw-bookmark-end
is Aspose.Words specific attribute and span with this attribute is supposed to be empty, you can refactor your HTML to avoid the problem.