Aspose::Words::Saving::SaveOptions Class Referenceabstract

This is an abstract base class for classes that allow the user to specify additional options when saving a document into a particular format. More...

#include "Model/Saving/SaveOptions.h"

Inherits System::Object.

Inherited by Aspose::Words::Saving::DocSaveOptions, Aspose::Words::Saving::FixedPageSaveOptions, Aspose::Words::Saving::HtmlSaveOptions, Aspose::Words::Saving::OdtSaveOptions, Aspose::Words::Saving::OoxmlSaveOptions, Aspose::Words::Saving::RtfSaveOptions, Aspose::Words::Saving::WordML2003SaveOptions, and Aspose::Words::Saving::XamlFlowSaveOptions.

Public Member Functions

virtual Aspose::Words::SaveFormat get_SaveFormat ()=0
 Specifies the format in which the document will be saved if this save options object is used. More...
 
virtual void set_SaveFormat (Aspose::Words::SaveFormat value)=0
 Setter for Aspose::Words::Saving::SaveOptions::get_SaveFormat. More...
 
System::String get_TempFolder () const
 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. More...
 
void set_TempFolder (System::String value)
 Setter for Aspose::Words::Saving::SaveOptions::get_TempFolder. More...
 
bool get_PrettyFormat () const
 When true, pretty formats output where applicable. Default value is false. More...
 
void set_PrettyFormat (bool value)
 Setter for Aspose::Words::Saving::SaveOptions::get_PrettyFormat. More...
 
bool get_UseAntiAliasing () const
 Gets or sets a value determining whether or not to use anti-aliasing for rendering. More...
 
void set_UseAntiAliasing (bool value)
 Setter for Aspose::Words::Saving::SaveOptions::get_UseAntiAliasing. More...
 
bool get_UseHighQualityRendering () const
 Gets or sets a value determining whether or not to use high quality (i.e. slow) rendering algorithms. More...
 
void set_UseHighQualityRendering (bool value)
 Setter for Aspose::Words::Saving::SaveOptions::get_UseHighQualityRendering. More...
 
bool get_UpdateSdtContent () const
 Gets or sets value determining whether content of Aspose::Words::Markup::StructuredDocumentTag is updated before saving. More...
 
void set_UpdateSdtContent (bool value)
 Setter for Aspose::Words::Saving::SaveOptions::get_UpdateSdtContent. More...
 
Aspose::Words::Saving::ColorMode get_ColorMode () const
 Gets or sets a value determining how colors are rendered. More...
 
void set_ColorMode (Aspose::Words::Saving::ColorMode value)
 Setter for Aspose::Words::Saving::SaveOptions::get_ColorMode. More...
 
Aspose::Words::Saving::DmlRenderingMode get_DmlRenderingMode () const
 Gets or sets a value determining how DrawingML shapes are rendered. More...
 
void set_DmlRenderingMode (Aspose::Words::Saving::DmlRenderingMode value)
 Setter for Aspose::Words::Saving::SaveOptions::get_DmlRenderingMode. More...
 
virtual Aspose::Words::Saving::DmlEffectsRenderingMode get_DmlEffectsRenderingMode ()
 Gets or sets a value determining how DrawingML effects are rendered. More...
 
virtual void set_DmlEffectsRenderingMode (Aspose::Words::Saving::DmlEffectsRenderingMode value)
 Setter for Aspose::Words::Saving::SaveOptions::get_DmlEffectsRenderingMode. More...
 
System::String get_DefaultTemplate () const
 Gets or sets path to default template (including filename). Default value for this property is empty string (System::String::Empty). More...
 
void set_DefaultTemplate (System::String value)
 Setter for Aspose::Words::Saving::SaveOptions::get_DefaultTemplate. More...
 
bool get_UpdateFields () const
 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. More...
 
void set_UpdateFields (bool value)
 Setter for Aspose::Words::Saving::SaveOptions::get_UpdateFields. More...
 
bool get_UpdateLastSavedTimeProperty () const
 Gets or sets a value determining whether the Aspose::Words::Properties::BuiltInDocumentProperties::get_LastSavedTime property is updated before saving. More...
 
void set_UpdateLastSavedTimeProperty (bool value)
 Setter for Aspose::Words::Saving::SaveOptions::get_UpdateLastSavedTimeProperty. More...
 
bool get_MemoryOptimization () const
 Gets or sets value determining if memory optimization should be performed before saving the document. Default value for this property is false. More...
 
void set_MemoryOptimization (bool value)
 Setter for Aspose::Words::Saving::SaveOptions::get_MemoryOptimization. More...
 
- Public Member Functions inherited from System::Object
 Object ()
 Creates object. Initializes all internal data structures. More...
 
virtual ~Object ()
 Destroys object. Frees all internal data structures. More...
 
 Object (Object const &x)
 Copy constructor. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
Objectoperator= (Object const &x)
 Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More...
 
ObjectSharedRefAdded ()
 Increments shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int SharedRefRemovedSafe ()
 Decrements and returns shared reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
int RemovedSharedRefs (int count)
 Decreases shared reference count by specified value. More...
 
Detail::SmartPtrCounter * WeakRefAdded ()
 Increments weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
void WeakRefRemoved ()
 Decrements weak reference count. Shouldn't be called directly; instead, use smart pointers or ThisProtector. More...
 
Detail::SmartPtrCounter * GetCounter ()
 Gets reference counter data structure associated with the object. More...
 
int SharedCount () const
 Gets current value of shared refernce counter. More...
 
void Lock ()
 Implements C# lock() statement locking. Call directly or use LockContext sentry object. More...
 
void Unlock ()
 Implements C# lock() statement unlocking. Call directly or use LockContext sentry object. More...
 
virtual bool Equals (ptr obj)
 Compares objects using C# Object.Equals semantics. More...
 
virtual int GetHashCode () const
 Analog of C# Object.GetHashCode() method. Enables hashing of custom objects. More...
 
virtual String ToString () ASPOSE_CONST
 Analog of C# Object.ToString() method. Enables converting custom objects to string. More...
 
virtual ptr MemberwiseClone () const
 Analog of C# Object.MemberwiseClone() method. Enables cloning custom types. More...
 
virtual const TypeInfoGetType () const
 Gets actual type of object. Analog of C# System.Object.GetType() call. More...
 
virtual bool Is (const TypeInfo &targetType) const
 Check if object represents an instance of type described by targetType. Analog of C# 'is' operator. More...
 
virtual void SetTemplateWeakPtr (unsigned int argument)
 Set n'th template argument a weak pointer (rather than shared). Allows switching pointers in containers to weak mode. More...
 
template<>
bool Equals (float const &objA, float const &objB)
 
template<>
bool Equals (double const &objA, double const &objB)
 
template<>
bool ReferenceEquals (String const &str, std::nullptr_t)
 
template<>
bool ReferenceEquals (String const &str1, String const &str2)
 

Static Public Member Functions

static System::SharedPtr< Aspose::Words::Saving::SaveOptionsCreateSaveOptions (Aspose::Words::SaveFormat saveFormat)
 Creates a save options object of a class suitable for the specified save format. More...
 
static System::SharedPtr< Aspose::Words::Saving::SaveOptionsCreateSaveOptions (System::String fileName)
 Creates a save options object of a class suitable for the file extension specified in the given file name. More...
 
- Static Public Member Functions inherited from System::Object
static bool ReferenceEquals (ptr const &objA, ptr const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, T const &objB)
 Compares objects by reference. More...
 
template<typename T >
static std::enable_if<!IsSmartPtr< T >::value, bool >::type ReferenceEquals (T const &objA, std::nullptr_t)
 Reference-compares value type object with nullptr. More...
 
template<typename T1 , typename T2 >
static std::enable_if< IsSmartPtr< T1 >::value &&IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares reference type objects in C# style. More...
 
template<typename T1 , typename T2 >
static std::enable_if<!IsSmartPtr< T1 >::value &&!IsSmartPtr< T2 >::value, bool >::type Equals (T1 const &objA, T2 const &objB)
 Compares value type objects in C# style. More...
 
static const TypeInfoType ()
 Impleemnts C# typeof(System.Object) construct. More...
 

Additional Inherited Members

- Public Types inherited from System::Object
typedef SmartPtr< Objectptr
 Alias for smart pointer type. More...
 
typedef System::Details::SharedMembersType shared_members_type
 structure to keep list of shared pointers contained in object. More...
 

Detailed Description

This is an abstract base class for classes that allow the user to specify additional options when saving a document into a particular format.

An instance of the SaveOptions class or any derived class is passed to the stream Aspose::Words::Document::Save(System::SharedPtr<$System::IO::Stream>, System::SharedPtr<Aspose::Words::Saving::SaveOptions>) or string Aspose::Words::Document::Save(System::String, System::SharedPtr<Aspose::Words::Saving::SaveOptions>) overloads for the user to define custom options when saving a document.

Member Function Documentation

◆ CreateSaveOptions() [1/2]

static System::SharedPtr<Aspose::Words::Saving::SaveOptions> Aspose::Words::Saving::SaveOptions::CreateSaveOptions ( Aspose::Words::SaveFormat  saveFormat)
static

Creates a save options object of a class suitable for the specified save format.

Parameters
saveFormatThe save format for which to create a save options object.
Returns
An object of a class that derives from Aspose::Words::Saving::SaveOptions.

◆ CreateSaveOptions() [2/2]

static System::SharedPtr<Aspose::Words::Saving::SaveOptions> Aspose::Words::Saving::SaveOptions::CreateSaveOptions ( System::String  fileName)
static

Creates a save options object of a class suitable for the file extension specified in the given file name.

Parameters
fileNameThe extension of this file name determines the class of the save options object to create.
Returns
An object of a class that derives from Aspose::Words::Saving::SaveOptions.

◆ get_ColorMode()

Aspose::Words::Saving::ColorMode Aspose::Words::Saving::SaveOptions::get_ColorMode ( ) const

Gets or sets a value determining how colors are rendered.

The default value is Aspose::Words::Saving::ColorMode::Normal.

This property is used when the document is exported to fixed page formats.

◆ get_DefaultTemplate()

System::String Aspose::Words::Saving::SaveOptions::get_DefaultTemplate ( ) const

Gets or sets path to default template (including filename). Default value for this property is empty string (System::String::Empty).

If specified, this path is used to load template when Aspose::Words::Document::get_AutomaticallyUpdateSyles is true, but Aspose::Words::Document::get_AttachedTemplate is empty.

◆ get_DmlEffectsRenderingMode()

virtual Aspose::Words::Saving::DmlEffectsRenderingMode Aspose::Words::Saving::SaveOptions::get_DmlEffectsRenderingMode ( )
virtual

Gets or sets a value determining how DrawingML effects are rendered.

The default value is Aspose::Words::Saving::DmlEffectsRenderingMode::Simplified.

This property is used when the document is exported to fixed page formats.

Reimplemented in Aspose::Words::Saving::PdfSaveOptions.

◆ get_DmlRenderingMode()

Aspose::Words::Saving::DmlRenderingMode Aspose::Words::Saving::SaveOptions::get_DmlRenderingMode ( ) const

Gets or sets a value determining how DrawingML shapes are rendered.

The default value is Aspose::Words::Saving::DmlRenderingMode::Fallback.

This property is used when the document is exported to fixed page formats.

◆ get_MemoryOptimization()

bool Aspose::Words::Saving::SaveOptions::get_MemoryOptimization ( ) const

Gets or sets value determining if memory optimization should be performed before saving the document. Default value for this property is false.

Setting this option to true can significantly decrease memory consumption while saving large documents at the cost of slower saving time.

◆ get_PrettyFormat()

bool Aspose::Words::Saving::SaveOptions::get_PrettyFormat ( ) const

When true, pretty formats output where applicable. Default value is false.

Set to true to make HTML, MHTML, EPUB, WordML, RTF, DOCX and ODT output human readable. Useful for testing or debugging.

◆ get_SaveFormat()

◆ get_TempFolder()

System::String Aspose::Words::Saving::SaveOptions::get_TempFolder ( ) const

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.

When Aspose.Words saves a document, it needs to create temporary internal structures. By default, these internal structures are created in memory and the memory usage spikes for a short period while the document is being saved. When saving is complete, the memory is freed and reclaimed by the garbage collector.

If you are saving a very large document (thousands of pages) and/or processing many documents at the same time, then the memory spike during saving can be significant enough to cause the system to throw System::OutOfMemoryException. Specifying a temporary folder using Aspose::Words::Saving::SaveOptions::get_TempFolder will cause Aspose.Words to keep the internal structures in temporary files instead of memory. It reduces the memory usage during saving, but will decrease the save performance.

The folder must exist and be writable, otherwise an exception will be thrown.

Aspose.Words automatically deletes all temporary files when saving is complete.

◆ get_UpdateFields()

bool Aspose::Words::Saving::SaveOptions::get_UpdateFields ( ) const

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.

Allows to specify whether to mimic or not MS Word behaviour.

◆ get_UpdateLastSavedTimeProperty()

bool Aspose::Words::Saving::SaveOptions::get_UpdateLastSavedTimeProperty ( ) const

Gets or sets a value determining whether the Aspose::Words::Properties::BuiltInDocumentProperties::get_LastSavedTime property is updated before saving.

◆ get_UpdateSdtContent()

bool Aspose::Words::Saving::SaveOptions::get_UpdateSdtContent ( ) const

Gets or sets value determining whether content of Aspose::Words::Markup::StructuredDocumentTag is updated before saving.

The default value is true.

◆ get_UseAntiAliasing()

bool Aspose::Words::Saving::SaveOptions::get_UseAntiAliasing ( ) const

Gets or sets a value determining whether or not to use anti-aliasing for rendering.

The default value is false. When this value is set to true anti-aliasing is used for rendering.

This property is used when the document is exported to the following formats: Aspose::Words::SaveFormat::Tiff, Aspose::Words::SaveFormat::Png, Aspose::Words::SaveFormat::Bmp, Aspose::Words::SaveFormat::Jpeg, Aspose::Words::SaveFormat::Emf. When the document is exported to the Aspose::Words::SaveFormat::Html, Aspose::Words::SaveFormat::Mhtml and Aspose::Words::SaveFormat::Epub formats this option is used for raster images.

◆ get_UseHighQualityRendering()

bool Aspose::Words::Saving::SaveOptions::get_UseHighQualityRendering ( ) const

Gets or sets a value determining whether or not to use high quality (i.e. slow) rendering algorithms.

The default value is false.

This property is used when the document is exported to image formats: Aspose::Words::SaveFormat::Tiff, Aspose::Words::SaveFormat::Png, Aspose::Words::SaveFormat::Bmp, Aspose::Words::SaveFormat::Jpeg, Aspose::Words::SaveFormat::Emf.

◆ set_ColorMode()

void Aspose::Words::Saving::SaveOptions::set_ColorMode ( Aspose::Words::Saving::ColorMode  value)

◆ set_DefaultTemplate()

void Aspose::Words::Saving::SaveOptions::set_DefaultTemplate ( System::String  value)

◆ set_DmlEffectsRenderingMode()

virtual void Aspose::Words::Saving::SaveOptions::set_DmlEffectsRenderingMode ( Aspose::Words::Saving::DmlEffectsRenderingMode  value)
virtual

◆ set_DmlRenderingMode()

void Aspose::Words::Saving::SaveOptions::set_DmlRenderingMode ( Aspose::Words::Saving::DmlRenderingMode  value)

◆ set_MemoryOptimization()

void Aspose::Words::Saving::SaveOptions::set_MemoryOptimization ( bool  value)

◆ set_PrettyFormat()

void Aspose::Words::Saving::SaveOptions::set_PrettyFormat ( bool  value)

◆ set_SaveFormat()

◆ set_TempFolder()

void Aspose::Words::Saving::SaveOptions::set_TempFolder ( System::String  value)

◆ set_UpdateFields()

void Aspose::Words::Saving::SaveOptions::set_UpdateFields ( bool  value)

◆ set_UpdateLastSavedTimeProperty()

void Aspose::Words::Saving::SaveOptions::set_UpdateLastSavedTimeProperty ( bool  value)

◆ set_UpdateSdtContent()

void Aspose::Words::Saving::SaveOptions::set_UpdateSdtContent ( bool  value)

◆ set_UseAntiAliasing()

void Aspose::Words::Saving::SaveOptions::set_UseAntiAliasing ( bool  value)

◆ set_UseHighQualityRendering()

void Aspose::Words::Saving::SaveOptions::set_UseHighQualityRendering ( bool  value)