DocSaveOptionsAlwaysCompressMetafiles Property
When false, small metafiles are not compressed for performance reason. Default value is true, all metafiles are compressed regardless of its size.

Namespace: Aspose.Words.Saving
Assembly: Aspose.Words (in Aspose.Words.dll) Version: 19.9
Syntax
public bool AlwaysCompressMetafiles { get; set; }

Property Value

Type: Boolean
Examples
Shows how to change metafiles compression in a document while saving.
[C#]

// The document has a mathematical formula
Document doc = new Document(MyDir + "Document.AlwaysCompressMetafiles.doc");

// Large metafiles are always compressed when exporting a document in Aspose.Words, but small metafiles are not
// compressed for performance reason. Some other document editors, such as LibreOffice, cannot read uncompressed
// metafiles. The following option 'AlwaysCompressMetafiles' was introduced to choose appropriate behavior
DocSaveOptions saveOptions = new DocSaveOptions();
// False - small metafiles are not compressed for performance reason
// True - all metafiles are compressed regardless of its size
saveOptions.AlwaysCompressMetafiles = isAlwaysCompressMetafiles;

doc.Save(ArtifactsDir + "Document.AlwaysCompressMetafiles.doc", saveOptions);
See Also