Free Support Forum - aspose.com

How to remove unwanted characters while reading a word document

Hello,

I’m new to Aspose.Word, Just 2 weeks before we purchased Aspose.Word 9.0.0.0.
My Question is, While reading a word how to remove the unwanted character from word file. I need only the text alone not any unrecognised character like small box character.

For example : I just tried to read a document which contains a table and not have any header and footer using GetText() method in Document class. It returns small box character in the place of table cell and cell content.
How to remove this unwanted character and like other unwanted characters. And how to leave the footer content while reading.


Thanks


Hi,


Thanks for your request.

Please try to use ToTxt method (http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/aspose.words.node.totxt.html) instead of GetText.

Regards,

Thanks For your kind reply …