SaveOptionsCreateSaveOptions(SaveFormat) Method

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

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

ExpandedSyntax

public static SaveOptions CreateSaveOptions(
	SaveFormat saveFormat
)

Parameters

saveFormat
Type: Aspose.WordsSaveFormat
The save format for which to create a save options object.

Return Value

Type: SaveOptions
An object of a class that derives from SaveOptions.

ExpandedExamples

Shows an option to optimize memory consumption when you work with large documents.
Document doc = new Document(MyDir + "Rendering.docx");

// When set to true it will improve document memory footprint but will add extra time to processing
SaveOptions saveOptions = SaveOptions.CreateSaveOptions(SaveFormat.Pdf);
saveOptions.MemoryOptimization = true;

doc.Save(ArtifactsDir + "PdfSaveOptions.MemoryOptimization.pdf", saveOptions);

ExpandedSee Also