OoxmlSaveOptionsCompressionLevel Property

Specifies the compression level used to save document. The default value is Normal.

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

ExpandedSyntax

public CompressionLevel CompressionLevel { get; set; }

Property Value

Type: CompressionLevel

ExpandedExamples

Shows how to specify the compression level used to save the OOXML document.
Document doc = new Document(MyDir + "Document.docx");

OoxmlSaveOptions saveOptions = new OoxmlSaveOptions(SaveFormat.Docx);
// DOCX and DOTX files are internally a ZIP-archive, this property controls
// the compression level of the archive
// Note, that FlatOpc file is not a ZIP-archive, therefore, this property does
// not affect the FlatOpc files
// Aspose.Words uses CompressionLevel.Normal by default, but MS Word uses
// CompressionLevel.SuperFast by default
saveOptions.CompressionLevel = CompressionLevel.SuperFast;

doc.Save(ArtifactsDir + "OoxmlSaveOptions.out.docx", saveOptions);

ExpandedSee Also