CompressionLevel

XpsSaveOptions.CompressionLevel property

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

public CompressionLevel CompressionLevel { get; set; }

Examples

Shows how to control the compression level when saving a document to XPS format.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.Writeln("Sample document for XPS compression test.");

// Create an XpsSaveOptions object and set the compression level.
XpsSaveOptions options = new XpsSaveOptions();
options.CompressionLevel = CompressionLevel.Maximum;

doc.Save(ArtifactsDir + "XpsSaveOptions.CompressionLevelXps.xps", options);

See Also