user10606387
user10606387

Reputation:

How can I convert large RTF string to HTML string manually in C#?

I have large RTF string read from a document and I need to display it on an ASP.NET (.cshtml) page. How can I convert it to HTML manually without using any nuget packages or class libraries before displaying?

Upvotes: 1

Views: 2973

Answers (1)

Tamás Deme
Tamás Deme

Reputation: 2228

There is no built-in way to read RTF documents in C# / .NET.

If you can't (or don't want to) use any libraries the only thing you can do is to implement the RTF specification, and output html based on the resulting parsed document. (But I'd just use a library, there's one doing exactly what you want: https://www.nuget.org/packages/RtfPipe/)

Upvotes: 3

Related Questions