Need to replace "&nbsp" with blank space ("") in out html

Hi Aspose Team,

We are using valid aspose license for development: Aspose.Words for Java 190618103026 Proved

Query 1 :
We are facing an issue with “&nbsp” non-breaking space when converting word document to HTML. I have used below reference to removing “&nbsp” from out HTML but not get expected result.

Please find attached source code with input and output.

Query 2 :
Is there any aspose word java API library by using we can remove an inline style from generated HTML
OR
map with another style (CSS)?

Thanks

Query for nbsp.zip (145.9 KB)
Query for nbsp.zip (145.9 KB)

Hi Team,
Please share solution of below issue:

WORDSNET-16599

Thanks

@purusadh

You can use Range.Replace method to achieve your requirement. We have not found any non breaking space in your input document. Please ZIP and attach your input, problematic and expected outputs here for testing. We will then provide you more information about your query.

You can use Run.Font property to access to the font formatting of run and change it. Please share your input and expected output document for this case. We will then provide you more information on it along with code.

This issue was closed as ‘Not a bug’. Please check the detail in the same thread.

Thanks, Tahir for reply.

Please find input and expected output file which I want to achieve.

Like: when I get Input data with some HTML tag it should convert to compatible with ms word file tag
because we need to generate ms word file based on output result.

Thanks
Purushottam
query.zip (271.2 KB)

@purusadh

You are using old version of Aspose.Words. Please use the latest version of Aspose.Words for Java 19.9 to get the desired output.

If you still face problem, please ZIP and attach the code example that you are using to reproduce your issue at our end. Thanks for your cooperation.

Thanks Tahir (-_-)