com.aspose.words
Class CompressionLevel

java.lang.Object
    extended by com.aspose.words.CompressionLevel

public class CompressionLevel 
extends java.lang.Object

Utility class containing constants. Compression level for OOXML files.

(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.)

Example:

Shows how to specify the compression level used to save the OOXML document.
Document doc = new Document(getMyDir() + "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.setCompressionLevel(CompressionLevel.SUPER_FAST);

doc.save(getArtifactsDir() + "OoxmlSaveOptions.out.docx", saveOptions);

Field Summary
static final intNORMAL = 0
           Normal compression level. Default compression level used by Aspose.Words.
static final intMAXIMUM = 1
           Maximum compression level.
static final intFAST = 2
           Fast compression level.
static final intSUPER_FAST = 3
           Super Fast compression level. Microsoft Word uses this compression level.
 

Field Detail

NORMAL = 0

public static final int NORMAL
Normal compression level. Default compression level used by Aspose.Words.

MAXIMUM = 1

public static final int MAXIMUM
Maximum compression level.

FAST = 2

public static final int FAST
Fast compression level.

SUPER_FAST = 3

public static final int SUPER_FAST
Super Fast compression level. Microsoft Word uses this compression level.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.