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

Free Support Forum - aspose.com

Non-breaking space becomes separate < p > node in the output Html during RTF to Html conversion

The Aspose is not respecting the non-breaking white space in the output html of “Rtf to html” conversion. For example in my input RTF, I have a sentence like

This is~a test of~nonbreaking space

The output Html is

<p style="margin:0pt"><span style="font-family:Arial; font-size:11pt">This is</span></p>
<p style="margin:0pt"><span style="font-family:Arial; font-size:11pt">a test of</span></p>
<p style="margin:0pt"><span style="font-family:Arial; font-size:11pt">nonbreaking space.</span></p>

i…e for each of the non-breaking space characters ("~") in RTF, it creates a paragraph “< p >” in the output html.

How to stop this? Is there a setting in the Aspose API ? I am creating a standalone small test app to demonstrate this. But wanted to throw out the question if someone has quick, helpful pointer for me to try out.

Hi Rahul,

Thanks for your inquiry. We can suggest you anything after looking into you documents and sample code. Please share following resources here, we will test the scenario at our end and will guide you accordingly.

  • Input document
  • Output document, showing undesired behavior.
  • Sample expected output document
  • Sample working code(without compilation errors)

Best Regards,