SaveOptionsMemoryOptimization Property |
Gets or sets value determining if memory optimization should be performed before saving the document.
Default value for this property is false.
Namespace:
Aspose.Words.Saving
Assembly:
Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntaxpublic bool MemoryOptimization { get; set; }Public Property MemoryOptimization As Boolean
Get
Set
public:
property bool MemoryOptimization {
bool get ();
void set (bool value);
}member MemoryOptimization : bool with get, set
Property Value
Type:
Boolean
Remarks
Setting this option to true can significantly decrease memory consumption while saving large documents at the cost of slower saving time.
ExamplesShows an option to optimize memory consumption when you work with large documents.
Document doc = new Document(MyDir + "Rendering.docx");
SaveOptions saveOptions = SaveOptions.CreateSaveOptions(SaveFormat.Pdf);
saveOptions.MemoryOptimization = true;
doc.Save(ArtifactsDir + "PdfSaveOptions.MemoryOptimization.pdf", saveOptions);
See Also