Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Tue Jun 29, 2021 2:03 pm

While converting from HTML to RTF I receive an extra symbol of 1 in front of every line.

original html: <h1>Href Attribute Example</h1>

generated rtf: 1Href Attribute Example

bklochko
 
Posts: 2
Joined: Tue Jun 29, 2021 1:56 pm

Wed Jun 30, 2021 2:04 am

Hello,

Thanks for your inquiry.
I tested the following code with the latest Spire.Doc Pack(hot fix) Version:9.6.10, but did not reproduce your issue. If you are using an older version, we recommend you upgrade to the latest version and try again.
Code: Select all
            String HTML = "<h1>Href Attribute Example</h1>";

            Document document = new Document();
            Section sec = document.AddSection();
            sec.AddParagraph().AppendHTML(HTML);

            document.SaveToFile("HtmlFileToRtf.rtf", FileFormat.Rtf);

If the issue still occurs after trying, to help us investigate further, please tell us your project target framework (e.g. .NET Framework 4.5) and your OS information (e.g. Windows7, 64bit). Thanks in advance.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Wed Jun 30, 2021 3:24 pm

Issue persists with your example, see attachment.

Nuget version: 9.6.10, published Friday, June 11, 2021 (6/11/2021)
Target framework: .NET Core 5.0
OS: Windows 10 64bit

bklochko
 
Posts: 2
Joined: Tue Jun 29, 2021 1:56 pm

Thu Jul 01, 2021 1:50 am

Hello,

Thanks for sharing more information.
I tested your case and did reproduce your issue. I have logged it in our bug tracking system with the ticket SPIREDOC-6267. If there is any update, we will let you know. Apologize for the inconvenience caused.

Sincerely,
Brian
E-iceblue support team
User avatar

Brian.Li
 
Posts: 1271
Joined: Mon Oct 19, 2020 3:04 am

Return to Spire.Doc