The «HTML to RTF .Net» is 100% C# managed assembly which enables any .Net app add these functions:
  • Convert HTML (URL, ASPX, XHTML) to Word (RTF, Unicode Text) with CSS, images, tables, Unicode and full text formatting
  • Merge RTF documents and replace values inside them

Namespace:  SautinSoft
Assembly:  SautinSoft.HtmlToRtf (in SautinSoft.HtmlToRtf.dll) Version: 5.8.2.8

Syntax

      
 C#  Visual Basic 
public class HtmlToRtf
Public Class HtmlToRtf

Members

               
 All Members  Constructors   Properties   Methods   Events  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
HtmlToRtf()()()
Initializes a new instance of the SautinSoft.HtmlToRtf class
HtmlToRtf(String)
Initializes a new instance of the SautinSoft.HtmlToRtf.
BaseURL
It's target path of HTML document base location.
BeforeImageDownload
Event which appears before downloading http images
BorderVisibility
Set visibility for table's borders: visible, hidden or as in HTML document.
ConvertFile(String, String)
Converts HTML, XHTML, ASPX file/URL to RTF or Text file. Output file will be overwritten.
ConvertFileToString(String)
Converts HTML, XHTML, ASPX file/URL to RTF or Text string
ConvertString(String)
Converts HTML, XHTML, ASPX string to RTF or Text string
ConvertString(String, List<(Of <(HtmlToRtf..::.SautinImage>)>))
Converts HTML, XHTML, ASPX string to RTF or Text string. This method can be used together with the RTF-to-HTML DLL .Net to convert RTF -> HTML -> RTF with images in memory.
ConvertStringToFile(String, String)
Converts HTML, XHTML, ASPX string to RTF or Text file. Output file will be overwritten.
Cookies
Allows to set a credentials to work with password protected HTML documents, e.g. set userName and password
CreateTraceFile
Specify the component to create a tracing text file.
Encoding
Encoding of input HTML
ExceptionList
Allows to get list with all arisen exceptions during the one conversion cycle.
ImageCompatible
Set how to store images inside RTF
InputFormat
Set input format: Text or Html
LineSpacing
Setup line spacing
MergeAndReplaceRtfFileFromFile(String, String, String, String)
Replaces all matches of string "whatReplaceInRtf" in RTF file "rtfSourcePath" by the content of file "wherewithReplaceRtfPath".
MergeAndReplaceRtfFileFromString(String, String, String, String)
Replaces all matches of string "whatReplaceInRtf" in RTF file "rtfSourcePath" by the RTF string "wherewithReplaceRtf".
MergeAndReplaceRtfString(String, String, String)
Replaces all found matches of string "whatReplaceInRtf" by the string "wherewithReplaceInRtf" and returns a new RTF document
MergeOptions
Allows to specify options for merging RTF documents
MergeRtfFile(String, String, String)
Merge two RTF files and create new sinlge RTF document. Output file will be overwritten.
MergeRtfString(String, String)
Merge two RTF strings and create new sinlge RTF document
OpenHtml(String)
Loads the HTML document and prepares it for converting. Works only in pair with methods: ToDocx(), ToRtf() and ToText().
OutputFormat
Set the output format: DOC, RTF, Text ansi or Unicode Text
PageAlignment
Page Alignment
PageStyle
Set page properties: page size, orientation and page margins
PreserveAlignment
Preserve alignment as in HTML
PreserveBackgroundColor
Preserve background color as in HTML
PreserveFontColor
Preserve font color as in HTML
PreserveFontFace
Preserve font face as in HTML
PreserveFontSize
Preserve font size as in HTML
PreserveHR
preserve horizontal rule
PreserveHttpCss
Download Remote CSS
PreserveHttpImages
Download Remote Images
PreserveHyperlinks
Preserve Hyperlinks
PreserveImages
Preserve images
PreserveNestedTables
Preserve nested tables as in HTML
PreservePageBreaks
Preserve PageBreaks
PreserveTables
Preserve Tables or transfer to text
ProduceRtfFragment
Produce only RTF fragment without document header, font table, color and style tables.
RtfLanguage
Rtf Language
RtfListCompatible
Sets or gets in what format lists will be stored inside RTF: Word 6.0 ({\pn\pntext...}) or Word 97 and higher ({\listtable\list...}).
Serial
Set activation key
SetSerial(String)
Set activation key
TableAutoFit
Set autofit mode for all tables. Default: false;
TableCellPadding
Set single cell padding for all tables
TableFitWidthByPage
Gets or sets a value indicating to automatically decrease a table width if it greater than page width.
TextStyle
Set text properties: font family, size and color.
ToDocx()()()
Converts the current HTML document to Docx. Works only in pair with the method OpenHtml().
ToDocx(Stream)
ToDocx(String)
ToRtf()()()
ToRtf(String)
TraceFilePath
Path to create a tracing file.
TraceType
Type of tracing file: short, standard or full.

Remarks





Inheritance Hierarchy

System..::.Object
  SautinSoft..::.HtmlToRtf

See Also