Is there anything C# Library that will convert a plain text string to html code with css class in C#?
Text to HTML RTF-to-HTML DLL .Net is a robust and independent .Net assembly to convert Text, RTF documents into HTML/XHTML documents with CSS. The component is 100% created in managed C# and absolutely standalone. It doesn't require MS Office or any other word-processor.
The Text to HTML has methods to convert between files, strings, array of bytes, memory stream objects.
Images can be extracted from RTF and saved to HDD as physical files or stored in memory or stored inside HTML using base64 algorithm.
This Text to HTML C# is just a class library (.Net assembly) but with powerfull abilities of exporting:
- RTF to plain HTML 3.2
- RTF to HTML 4.01 with CSS
- RTF to HTML 5 new!
- RTF to XHTML 1.01
- Text to HTML
- RTF to Text
Features of C# Text to HTML:
- Full text formatting (bold, italic, underline, double underline, strike, superscript, subscript)
- Images in WMF, EMF, JPG, PNG, BMP, GIF formats
- Tables and nested tables, border colors and border types, background
- Font colors, face, size
- Hyperlinks and ancors
- Full Unicode (include Japanese, Chinese, Arabic/Hebrew, Russian etc)
- Special characters, such as €, ™, — etc.
- RTL and LTR text direction
- Bullets and ordered lists
Text to HTML allows you to adjust these properties in Text to HTML converting
- Specify output format: HTML 3.2, HTML 4.01, XHTML 1.01, HTML 5, Text
- Where to link images to phisycal file on HDD or inside HTML document
- Converting with CSS or without CSS
- Save CSS between tags <style>...</style> or inline styles <tag style="...">
- Specify encoding of output HTML
- Title and set up converting only part of HTML between <body>...</body> tags
- Set united font, size and color for document
- Specify table borders
- Set single measurement units: pixels, points, mm, ems, inches.
- Set prefix to style class names in HTML
- Default tags for paragraphs <p> or <div>
Text to HTML Technical Features
The RTF-to-HTML DLL .Net requires only .Net 1.1 or higher platform. Using it you can easily create any type of a 32-bit or 64-bit .NET application including ASP.NET, Web Services and WinForms . Our .Net assembly is Multi-Platform component, you can use it to build your application with Mono platform for Linux and Mac (http://www.mono-project.com).
- 100% Created with only managed C#
- Absolutely standalone, you will need to only copy "SautinSoft.RtfToHtml.dll" into 'Bin' directory
- No other dependencies
- Has own RTF parser and HTML writer
- Doesn't require Microsoft Office ® or any other dependencies
- Works on any .Net platform (.Net 1.1, 2.0, 3.0, 3.5, 4.0 etc)
- Works with Windows and even with Linux and Mac (thanks to Mono project http://www.mono-project.com)
- Has great abilities to adjust an output HTML, XHTML or Text as you wish
- Small size of assembly, less than 500 Kb
HTML Compatibility with W3C standards
HTML and XHTML documents produced RTF-to-HTML library are completely compatible with W3C standards.
Requirements and compatibility
- .Net platform (1.1 or higher), because it's 100% managed C# library
- Works even in Medium Trust level
- 32-bit and 64-bit compatible