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 "Aspose.Words.Cpp/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::TxtSaveOptionsBase, 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... | |
![]() | |
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... | |
Object & | operator= (Object const &x) |
Assignment operator. Doesn't copy anything, really, just initializes new object and enables copy constructing subclasses. More... | |
Object * | SharedRefAdded () |
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 TypeInfo & | GetType () 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... | |
Static Public Member Functions | |
static System::SharedPtr< Aspose::Words::Saving::SaveOptions > | CreateSaveOptions (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::SaveOptions > | CreateSaveOptions (System::String fileName) |
Creates a save options object of a class suitable for the file extension specified in the given file name. More... | |
![]() | |
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 TypeInfo & | Type () |
Impleemnts C# typeof(System.Object) construct. 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) |
Additional Inherited Members | |
![]() | |
typedef SmartPtr< Object > | ptr |
Alias for smart pointer type. More... | |
typedef System::Details::SharedMembersType | shared_members_type |
structure to keep list of shared pointers contained in object. More... | |
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.
|
static |
Creates a save options object of a class suitable for the specified save format.
saveFormat | The save format for which to create a save options object. |
|
static |
Creates a save options object of a class suitable for the file extension specified in the given file name.
fileName | The extension of this file name determines the class of the save options object to create. |
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.
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.
|
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.
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.
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.
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.
|
pure virtual |
Specifies the format in which the document will be saved if this save options object is used.
Implemented in Aspose::Words::Saving::HtmlSaveOptions, Aspose::Words::Saving::ImageSaveOptions, Aspose::Words::Saving::OoxmlSaveOptions, Aspose::Words::Saving::PdfSaveOptions, Aspose::Words::Saving::HtmlFixedSaveOptions, Aspose::Words::Saving::SvgSaveOptions, Aspose::Words::Saving::OdtSaveOptions, Aspose::Words::Saving::DocSaveOptions, Aspose::Words::Saving::PclSaveOptions, Aspose::Words::Saving::XamlFixedSaveOptions, Aspose::Words::Saving::PsSaveOptions, Aspose::Words::Saving::XamlFlowSaveOptions, Aspose::Words::Saving::XpsSaveOptions, Aspose::Words::Saving::WordML2003SaveOptions, Aspose::Words::Saving::RtfSaveOptions, and Aspose::Words::Saving::TxtSaveOptions.
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.
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.
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.
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
.
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.
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.
void Aspose::Words::Saving::SaveOptions::set_ColorMode | ( | Aspose::Words::Saving::ColorMode | value | ) |
void Aspose::Words::Saving::SaveOptions::set_DefaultTemplate | ( | System::String | value | ) |
|
virtual |
Setter for Aspose::Words::Saving::SaveOptions::get_DmlEffectsRenderingMode.
Reimplemented in Aspose::Words::Saving::PdfSaveOptions.
void Aspose::Words::Saving::SaveOptions::set_DmlRenderingMode | ( | Aspose::Words::Saving::DmlRenderingMode | value | ) |
void Aspose::Words::Saving::SaveOptions::set_MemoryOptimization | ( | bool | value | ) |
void Aspose::Words::Saving::SaveOptions::set_PrettyFormat | ( | bool | value | ) |
|
pure virtual |
Setter for Aspose::Words::Saving::SaveOptions::get_SaveFormat.
Implemented in Aspose::Words::Saving::HtmlSaveOptions, Aspose::Words::Saving::ImageSaveOptions, Aspose::Words::Saving::OoxmlSaveOptions, Aspose::Words::Saving::PdfSaveOptions, Aspose::Words::Saving::HtmlFixedSaveOptions, Aspose::Words::Saving::SvgSaveOptions, Aspose::Words::Saving::OdtSaveOptions, Aspose::Words::Saving::DocSaveOptions, Aspose::Words::Saving::PclSaveOptions, Aspose::Words::Saving::XamlFixedSaveOptions, Aspose::Words::Saving::PsSaveOptions, Aspose::Words::Saving::XamlFlowSaveOptions, Aspose::Words::Saving::XpsSaveOptions, Aspose::Words::Saving::WordML2003SaveOptions, Aspose::Words::Saving::RtfSaveOptions, and Aspose::Words::Saving::TxtSaveOptions.
void Aspose::Words::Saving::SaveOptions::set_TempFolder | ( | System::String | value | ) |
void Aspose::Words::Saving::SaveOptions::set_UpdateFields | ( | bool | value | ) |
void Aspose::Words::Saving::SaveOptions::set_UpdateLastSavedTimeProperty | ( | bool | value | ) |
void Aspose::Words::Saving::SaveOptions::set_UpdateSdtContent | ( | bool | value | ) |
void Aspose::Words::Saving::SaveOptions::set_UseAntiAliasing | ( | bool | value | ) |
void Aspose::Words::Saving::SaveOptions::set_UseHighQualityRendering | ( | bool | value | ) |