SaveOptionsMemoryOptimization Property |
Gets or sets value determining if memory optimization should be performed before saving the document.
Default value for this property is false.
Syntax
public 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.
Examples
Shows an option to optimize memory consumption when rendering large documents to PDF.
Document doc = new Document(MyDir + "Rendering.docx");
SaveOptions saveOptions = SaveOptions.CreateSaveOptions(SaveFormat.Pdf);
saveOptions.MemoryOptimization = memoryOptimization;
doc.Save(ArtifactsDir + "PdfSaveOptions.MemoryOptimization.pdf", saveOptions);
See Also