Loss of whitespace when converting from HTML to RTF.

Get technical support of HTML to RTF .Net in C# and VB.Net
IanD
Posts: 3
Joined: Mon Jun 28, 2021 12:51 pm
Contact:

Loss of whitespace when converting from HTML to RTF.

Post by IanD »

Hello,

I'm evaluating the RTF to HTML and HTML to RTF products for use, and have run into a problem when converting HTML into RTF.

When the HTML contains whitespace and formatting, the whitespace is lost in the RTF output.

For example, HTML that displays as:

Alpha Beta Gamma

(Where Alpha and Beta are spans with a trailing space)

The returned RTF will appear as follows.

AlphaBetaGamma

(Converting RTF to HTML with your sister library does not exhibit this problem).

Code samples (in the form of a LinqPad script that demonstrates the problem) and input/output RTF/HTML is available if necessary.

Kind Regards,

Ian D
IanD
Posts: 3
Joined: Mon Jun 28, 2021 12:51 pm
Contact:

Re: Loss of whitespace when converting from HTML to RTF.

Post by IanD »

I've tried with your Document.NET library as well as a comparison, and found the same issue - RTF to HTML is fine, HTML to RTF has whitespace loss.
Oliver
Posts: 60
Joined: Wed Aug 19, 2020 11:59 am
Contact:

Re: Loss of whitespace when converting from HTML to RTF.

Post by Oliver »

Hi

Could you send me your original file foe test?

My email: techsupport@sautinsoft.com

I'll try to help you.
Oliver
Posts: 60
Joined: Wed Aug 19, 2020 11:59 am
Contact:

Re: Loss of whitespace when converting from HTML to RTF.

Post by Oliver »

I've tested your files.
Do you think, that you have 6 extra spaces inside.

If we open any Notepad viewer and look at this string: "<b>Hello world</b>"; I confirm, that inside 6 spaces between "Hello123456world".

But any Web-Veiwer understands this as a single space: "Hello1world" and open the html page like an one single space inside. So we convert to one space also!

If you want to see 6 extra spaces, you need to do the next:
Just use the tag :&nbsp;

Thanks
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests