public class PDFOptimizer
extends java.lang.Object
| Constructor and Description |
|---|
PDFOptimizer()
Construct a CPDFOptimizer, with default Options.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete() |
CompressQuality |
getCompressionQuality(CompressImageType type)
Get the value of the Compression Quality for a given color model.
|
short |
getMajorVersion()
Get the value of the Major Version of the optimized document.
|
int |
getMaxResolution(CompressImageType type)
Get the value of the Max DPI for a given color model.
|
short |
getMinorVersion()
Get the value of the Minor Version of the optimized document.
|
ObjectCompressionType |
getObjectCompression()
Get the value of the Object Compression of the optimized document.
|
boolean |
getOption(OptimizerOption option)
Get the value of a single Optimizer Option.
|
CompressionType |
getRecompressionType(CompressImageType type)
Get the value of the Recompression Type for a given color model.
|
int |
getResampleToResolution(CompressImageType type)
Get the value of the Resample To DPI for a given color model.
|
void |
optimize(Document doc,
javax.imageio.stream.ImageOutputStream stream) |
void |
optimize(Document doc,
javax.imageio.stream.ImageOutputStream stream,
ProgressMonitor progressMonitor,
CancelProc cancelProc) |
void |
optimize(Document document,
com.datalogics.PDFL.JavaStreamFile dest) |
void |
optimize(Document document,
com.datalogics.PDFL.JavaStreamFile dest,
ProgressMonitor progressMonitor,
CancelProc cancelProc)
Perform the Optimization of a single document, saving the result in memory.
|
void |
optimize(Document document,
java.lang.String newPath) |
void |
optimize(Document document,
java.lang.String newPath,
ProgressMonitor progressMonitor,
CancelProc cancelProc)
Perform the Optimization of a single document, saving the result in a new file.
|
void |
setCompressionQuality(CompressImageType type,
CompressQuality value)
Set the value for the Compression Quality for a given color model.
|
void |
setMajorVersion(short major)
Set the value for the Major Version for the optimized document.
|
void |
setMaxResolution(CompressImageType type,
int value)
Set the value for the Max DPI for a given color model.
|
void |
setMinorVersion(short minor)
Set the value for the Minor Version for the optimized document.
|
void |
setObjectCompression(ObjectCompressionType objectCompression)
Set the value for the Object Compression for the optimized document.
|
void |
setOption(OptimizerOption option,
boolean value)
Set the value of a single Optimizer option.
|
void |
setRecompressionType(CompressImageType type,
CompressionType value)
Set the value for the recompression Type for a given color model.
|
void |
setResampleToResolution(CompressImageType type,
int value)
Set the value for the Resample To DPI for a given color model.
|
public PDFOptimizer()
public void delete()
public void optimize(Document doc, javax.imageio.stream.ImageOutputStream stream) throws java.io.IOException
java.io.IOExceptionpublic void optimize(Document doc, javax.imageio.stream.ImageOutputStream stream, ProgressMonitor progressMonitor, CancelProc cancelProc) throws java.io.IOException
java.io.IOExceptionpublic boolean getOption(OptimizerOption option)
public void setOption(OptimizerOption option, boolean value)
public int getMaxResolution(CompressImageType type)
public void setMaxResolution(CompressImageType type, int value)
public int getResampleToResolution(CompressImageType type)
public void setResampleToResolution(CompressImageType type, int value)
public CompressionType getRecompressionType(CompressImageType type)
public void setRecompressionType(CompressImageType type, CompressionType value)
public CompressQuality getCompressionQuality(CompressImageType type)
public void setCompressionQuality(CompressImageType type, CompressQuality value)
public short getMajorVersion()
NOTE: A value of 0 indicates the Optimizer will decide what version it should be.
public void setMajorVersion(short major)
public short getMinorVersion()
public void setMinorVersion(short minor)
public ObjectCompressionType getObjectCompression()
public void setObjectCompression(ObjectCompressionType objectCompression)
public void optimize(Document document, java.lang.String newPath, ProgressMonitor progressMonitor, CancelProc cancelProc)
public void optimize(Document document, java.lang.String newPath)
public void optimize(Document document, com.datalogics.PDFL.JavaStreamFile dest, ProgressMonitor progressMonitor, CancelProc cancelProc)
public void optimize(Document document, com.datalogics.PDFL.JavaStreamFile dest)