com.spire.pdf.conversion.compression
Class PdfCompressor

java.lang.Object
  extended by com.spire.pdf.conversion.compression.PdfCompressor

public class PdfCompressor
extends java.lang.Object

The pdf document compressor.


Constructor Summary
PdfCompressor(java.io.InputStream stream)
          Initializes a new instance of the class.
PdfCompressor(java.io.InputStream stream, java.lang.String password)
          Initializes a new instance of the class.
PdfCompressor(java.lang.String filePath)
          Initializes a new instance of the class.
PdfCompressor(java.lang.String filePath, java.lang.String password)
          Initializes a new instance of the class.
 
Method Summary
 void compressToFile(java.lang.String filePath)
          Compress the document.
 void compressToStream(java.io.OutputStream outStream)
          Compress the document to the specified stream.
 OptimizationOptions getOptions()
          Gets the optimization options.
 void setOptions(OptimizationOptions value)
          Sets the optimization options.
 

Constructor Detail

PdfCompressor

public PdfCompressor(java.io.InputStream stream)
Initializes a new instance of the class.

Parameters:
stream - The pdf file stream.

PdfCompressor

public PdfCompressor(java.io.InputStream stream,
                     java.lang.String password)
Initializes a new instance of the class.

Parameters:
stream - The pdf file stream.
password - The password (user or owner) of the encrypted document.

PdfCompressor

public PdfCompressor(java.lang.String filePath)
Initializes a new instance of the class.

Parameters:
filePath - The pdf file path.

PdfCompressor

public PdfCompressor(java.lang.String filePath,
                     java.lang.String password)
Initializes a new instance of the class.

Parameters:
filePath - The pdf file path.
password - The password (user or owner) of the encrypted document.
Method Detail

getOptions

public OptimizationOptions getOptions()
Gets the optimization options.

Returns:
The optimization options.

setOptions

public void setOptions(OptimizationOptions value)
Sets the optimization options.

Parameters:
value - The optimization options.

compressToFile

public void compressToFile(java.lang.String filePath)
Compress the document.

Parameters:
filePath - The out file path.

compressToStream

public void compressToStream(java.io.OutputStream outStream)
Compress the document to the specified stream.

Parameters:
outStream - The out stream.