RtfSaveOptions Class

Can be used to specify additional options when saving a document into the Rtf format.

ExpandedInheritance Hierarchy

Namespace:  Aspose.Words.Saving
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 21.3.0

ExpandedSyntax

public class RtfSaveOptions : SaveOptions

The RtfSaveOptions type exposes the following members.

ExpandedConstructors

  NameDescription
Public methodRtfSaveOptions
Initializes a new instance of the RtfSaveOptions class

ExpandedProperties

  NameDescription
Public propertyCode exampleAllowEmbeddingPostScriptFonts
Gets or sets a boolean value indicating whether to allow embedding fonts with PostScript outlines when embedding TrueType fonts in a document upon it is saved. The default value is false.
(Inherited from SaveOptions.)
Public propertyCustomTimeZoneInfo
Gets or sets custom local time zone used for date/time fields.
(Inherited from SaveOptions.)
Public propertyCode exampleDefaultTemplate
Gets or sets path to default template (including filename). Default value for this property is empty string (Empty).
(Inherited from SaveOptions.)
Public propertyDml3DEffectsRenderingMode
Gets or sets a value determining how 3D effects are rendered.
(Inherited from SaveOptions.)
Public propertyCode exampleDmlEffectsRenderingMode
Gets or sets a value determining how DrawingML effects are rendered.
(Inherited from SaveOptions.)
Public propertyCode exampleDmlRenderingMode
Gets or sets a value determining how DrawingML shapes are rendered.
(Inherited from SaveOptions.)
Public propertyCode exampleExportCompactSize
Allows to make output RTF documents smaller in size, but if they contain RTL (right-to-left) text, it will not be displayed correctly. Default value is false.
Public propertyCode exampleExportImagesForOldReaders
Specifies whether the keywords for "old readers" are written to RTF or not. This can significantly affect the size of the RTF document. Default value is true.
Public propertyCode exampleMemoryOptimization
Gets or sets value determining if memory optimization should be performed before saving the document. Default value for this property is false.
(Inherited from SaveOptions.)
Public propertyCode examplePrettyFormat
When true, pretty formats output where applicable. Default value is false.
(Inherited from SaveOptions.)
Public propertyCode exampleSaveFormat
Specifies the format in which the document will be saved if this save options object is used. Can only be Rtf.
(Overrides SaveOptionsSaveFormat.)
Public propertyCode exampleSaveImagesAsWmf
When true all images will be saved as WMF.
Public propertyCode exampleTempFolder
Specifies the folder for temporary files used when saving to a DOC or DOCX file. By default this property is null and no temporary files are used.
(Inherited from SaveOptions.)
Public propertyUpdateCreatedTimeProperty
Gets or sets a value determining whether the CreatedTime property is updated before saving. Default value is false;
(Inherited from SaveOptions.)
Public propertyCode exampleUpdateFields
Gets or sets a value determining if fields of certain types should be updated before saving the document to a fixed page format. Default value for this property is true.
(Inherited from SaveOptions.)
Public propertyCode exampleUpdateLastPrintedProperty
Gets or sets a value determining whether the LastPrinted property is updated before saving.
(Inherited from SaveOptions.)
Public propertyCode exampleUpdateLastSavedTimeProperty
Gets or sets a value determining whether the LastSavedTime property is updated before saving.
(Inherited from SaveOptions.)
Public propertyCode exampleUpdateSdtContent
Gets or sets value determining whether content of StructuredDocumentTag is updated before saving.
(Inherited from SaveOptions.)
Public propertyCode exampleUseAntiAliasing
Gets or sets a value determining whether or not to use anti-aliasing for rendering.
(Inherited from SaveOptions.)
Public propertyCode exampleUseHighQualityRendering
Gets or sets a value determining whether or not to use high quality (i.e. slow) rendering algorithms.
(Inherited from SaveOptions.)

ExpandedMethods

  NameDescription
Public methodEquals (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodToString (Inherited from Object.)

ExpandedExamples

Shows how to save a document to .rtf with custom options.
Document doc = new Document(MyDir + "Rendering.docx");

// Create an "RtfSaveOptions" object to pass to the document's "Save" method to modify how we save it to an RTF.
RtfSaveOptions options = new RtfSaveOptions();

Assert.AreEqual(SaveFormat.Rtf, options.SaveFormat);

// Set the "ExportCompactSize" property to "true" to
// reduce the saved document's size at the cost of right-to-left text compatibility.
options.ExportCompactSize = true;

// Set the "ExportImagesFotOldReaders" property to "true" to use extra keywords to ensure that our document is
// compatible with pre-Microsoft Word 97 readers and WordPad.
// Set the "ExportImagesFotOldReaders" property to "false" to reduce the size of the document,
// but prevent old readers from being able to read any non-metafile or BMP images that the document may contain.
options.ExportImagesForOldReaders = exportImagesForOldReaders;

doc.Save(ArtifactsDir + "RtfSaveOptions.ExportImages.rtf", options);

ExpandedSee Also