Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files from any .NET platform (C#, VB.NET, ASP.NET, .NET Core) and Java applications (J2SE and J2EE) with fast and high quality performance.

Fri Nov 05, 2021 3:49 pm

I have a problem with rich text in Spire.Doc, I am trying to add rich text in a paragraph using AppendHTML, but I get the following exception: "The input string was not in the correct format". I don't know why this problem arises as I am passing a string to the AppendHTML.

Posts: 12
Joined: Tue Oct 28, 2014 9:41 pm

Mon Nov 08, 2021 7:44 am


Thank you for your inquiry.
According to your description, could you please confirm whether your rich text is in HTML or RTF format? If it is in RTF format, you need to use AppendRTF(string rtfCode) method. If it is in HTML format, I suggest you try again with our latest Spire.Doc Pack(hot fix) Version:9.10.9. If the issue still exists after trying, please share us with your rich text as well as your complete test code for our reference. You could attach them here or send them to us via email (support@e-iceblue.com). Thanks in advance.

E-iceblue support team
User avatar

Posts: 712
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.Doc