RtfSaveOptions Class
Represents options for saving to Rich Text (RTF) format.
public sealed class RtfSaveOptions : SaveOptions
Public NotInheritable Class RtfSaveOptions
Inherits SaveOptions
- Inheritance:
- System.ObjectRtfSaveOptions
Constructors
RtfSaveOptions()
Initializes a new instance of the RtfSaveOptions class.
Properties
ContentType
Gets the content-type for RTF file format: application/rtf.
public override string ContentType { get; }
Public Overrides ReadOnly Property ContentType As String
Property Value
- System.String
The content-type for RTF file format.
Overrides
Encoding
Gets or sets the encoding for the RTF file.
Property Value
- System.Text.Encoding
The encoding for the RTF file.
Exceptions
- System.ArgumentNullException
Value is set to null.
ExportPictureWithMetafile
RTF supports inclusion of JPEG, PNG, EMF, WMF, Apple PICT, Windows bitmap and OS/2 Metafile picture types. Not all of these picture types are supported in all RTF readers. When a RTF document is opened in software that does not support the picture type of an inserted picture, such picture is not displayed at all. For better compatibility with some Microsoft applications (e.g. WordPad) two copies of the graphic are saved in the document. Graphics are saved in the applicable EMF, PNG, GIF, or JPEG format and are also converted to WMF (Windows Metafile) format. Property gets or sets the flag indicating whether to create a Windows Metafile (WMF) copy of the original picture when saving the DocumentModel instance.
public bool ExportPictureWithMetafile { get; set; }
Public Property ExportPictureWithMetafile As Boolean
Property Value
- System.Boolean
true to create a Windows Metafile (WMF) copy of the original picture when saving the DocumentModel instance; otherwise, false.
Remarks
warning
If property is set to true, this code will only work in a Full-Trust environment. If you attempt to run the code in a Medium-Trust environment, a System.Security.SecurityException will be thrown.
Inherited Properties
DocxDefault | Gets the default saving options for Microsoft Word file format. Word file will be saved in Docx format. (Inherited from SaveOptions) |
HtmlDefault | Gets the default saving options for HyperText Markup Language (HTML) format. (Inherited from SaveOptions) |
ImageDefault | Gets the default saving options for image file format. Image will be saved in Bmp format. (Inherited from SaveOptions) |
OdtDefault | Gets the default saving options for Open Document file format. (Inherited from SaveOptions) |
PageCount | Gets or sets the number of pages which should be saved. (Inherited from SaveOptions) |
PageNumber | Gets or sets the zero-based page number of the document's page which should be saved. (Inherited from SaveOptions) |
PdfDefault | Gets the default saving options for Portable Document Format (PDF). (Inherited from SaveOptions) |
RtfDefault | Gets the default saving options for Rich Text (RTF) format. (Inherited from SaveOptions) |
TxtDefault | Gets the default saving options for Plain Text (TXT) format. (Inherited from SaveOptions) |
XmlDefault | Gets the default saving options for XML file format. (Inherited from SaveOptions) |
XpsDefault | Gets the default saving options for XML Paper Specification (XPS) format. (Inherited from SaveOptions) |