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 Oct 29, 2024 10:04 am

When running FreeSpire.Doc in .NET 6 or 8, I experience an issue when saving to RTF. (version 12.2.0

Sample code:

Document document = new Document();
document.LoadFromFile(@"C:\temp\test.docx");

document.Replace("{{Name}}", "Username", true, false);

document.SaveToFile($@"C:\temp\output\User.rtf", FileFormat.Rtf);
document.SaveToFile($@"C:\temp\output\User.htm", FileFormat.Html);
document.SaveToTxt($@"C:\temp\output\User.txt", Encoding.Default);

The htm and txt files are all good.
The RTF-file has a "1" prepended to all lines in the file.
This issue does not occur in .NET Framework 4.8

t.vanhee
 
Posts: 1
Joined: Tue Oct 29, 2024 9:57 am

Wed Oct 30, 2024 9:24 am

Hello,

Thanks for your inquiry. To help us investigate your issue faster and more accurately, please provide us with your input document for investigation and analysis. You can upload here or send it to us via email( [email protected] ). Thank you in advance.

Sincerely,
Amin
E-iceblue support team
User avatar

Amin.Gan
 
Posts: 306
Joined: Mon Jul 15, 2024 5:40 am

Return to Spire.Doc