Problem to take into account white space with xml:space="preseve" (DOCX)

We have problem with losing space character with Aspose.Words.11.7.0.0.

Indeed we have a word document which display the spaces. But when we
load this document with Aspose.words the spaces are losing.



XML exemple (document.xml) :

<w:document xml:space=“preserve”>

<w:body>

<w:tbl>

<w:tr>

<w:tc><w:p><w:r><w:t>Cell</w:t></w:r><w:r><w:t>
</w:t></w:r><w:r><w:t>one</w:t></w:r></w:p></w:tc>

<w:tc><w:p><w:r><w:t>Cell</w:t></w:r><w:r><w:t> two
</w:t></w:r></w:p></w:tc>

<w:tc><w:p><w:r><w:t>Last Cell </w:t></w:r></w:p></w:tc>

</w:tr>

</w:tbl>

</w:body>

</w:document>



Aspose method used :

String cellText = cell.toTxt();




Why Aspose does not read the preserve space attribute within the
document tag to keep the spaces ?

When we have xml:space=“preserve” in w:t tag it’s working well

<w:document>

<w:body>

<w:tbl>

<w:tr>

<w:tc><w:p><w:r><w:t>Cell</w:t></w:r><w:r><w:t xml:space=“preserve”>
</w:t></w:r><w:r><w:t>one</w:t></w:r></w:p></w:tc>

<w:tc><w:p><w:r><w:t>Cell</w:t></w:r><w:r><w:t xml:space=“preserve”> two
</w:t></w:r></w:p></w:tc>

<w:tc><w:p><w:r><w:t xml:space=“preserve”>Last Cell </w:t></w:r></w:p></w:tc>

</w:tr>

</w:tbl>

</w:body>

</w:document>



Do yo have simple solution to take into account <w:document xml:space=“preserve”>
?


Thanks

Hi,

Thanks for your inquiry. Could you please attach your input Word document, you're getting this problem with, here for testing? I will investigate the issue on my side and provide you more information. Also, it would be great if you please highlight the problematic areas and share the screenshots here to help understand the problem.

Best Regards,

Hi,

I attached two docx file when I read cell in array (with function toTxt()) I have two differents results.


When the <w:document xml:space=“preserve”> is in top, the space in the text doesn’t appear in toTxt() function.


If you open the docx you have the same display. But When we get the text in the document when don’t have the same text.

Regards,




Hi,


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

The issues you have found earlier (filed as WORDSNET-6928) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.