Package com.datalogics.PDFL
Class PDFOptimizer
java.lang.Object
com.datalogics.PDFL.PDFOptimizer
Implementation of the PDF Optimizer function. Use the PDFOptimizer object to accumulate options for the Optimization, and to Optimize documents.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Get the value of the Compression Quality for a given color model.shortGet the value of the Major Version of the optimized document.intGet the value of the Max DPI for a given color model.shortGet the value of the Minor Version of the optimized document.Get the value of the Object Compression of the optimized document.booleangetOption(OptimizerOption option) Get the value of a single Optimizer Option.Get the value of the Recompression Type for a given color model.intGet the value of the Resample To DPI for a given color model.voidvoidoptimize(Document document, com.datalogics.PDFL.JavaStreamFile dest, ProgressMonitor progressMonitor, CancelProc cancelProc) Perform the Optimization of a single document, saving the result in memory.voidvoidoptimize(Document document, String newPath, ProgressMonitor progressMonitor, CancelProc cancelProc) Perform the Optimization of a single document, saving the result in a new file.voidoptimize(Document doc, ImageOutputStream stream) voidoptimize(Document doc, ImageOutputStream stream, ProgressMonitor progressMonitor, CancelProc cancelProc) voidsetCompressionQuality(CompressImageType type, CompressQuality value) Set the value for the Compression Quality for a given color model.voidsetMajorVersion(short major) Set the value for the Major Version for the optimized document.voidsetMaxResolution(CompressImageType type, int value) Set the value for the Max DPI for a given color model.voidsetMinorVersion(short minor) Set the value for the Minor Version for the optimized document.voidsetObjectCompression(ObjectCompressionType objectCompression) Set the value for the Object Compression for the optimized document.voidsetOption(OptimizerOption option, boolean value) Set the value of a single Optimizer option.voidsetRecompressionType(CompressImageType type, CompressionType value) Set the value for the recompression Type for a given color model.voidsetResampleToResolution(CompressImageType type, int value) Set the value for the Resample To DPI for a given color model.
-
Constructor Details
-
PDFOptimizer
public PDFOptimizer()Construct a CPDFOptimizer, with default Options.
-
-
Method Details
-
delete
public void delete() -
optimize
- Throws:
IOException
-
optimize
public void optimize(Document doc, ImageOutputStream stream, ProgressMonitor progressMonitor, CancelProc cancelProc) throws IOException - Throws:
IOException
-
getOption
Get the value of a single Optimizer Option. -
setOption
Set the value of a single Optimizer option. -
getMaxResolution
Get the value of the Max DPI for a given color model. -
setMaxResolution
Set the value for the Max DPI for a given color model. Any image above this resolution will be down sampled, if the Downsampling option is true for this color model. -
getResampleToResolution
Get the value of the Resample To DPI for a given color model. -
setResampleToResolution
Set the value for the Resample To DPI for a given color model. Any image will be downsampled to this resolution, if the Downsampling option is true for this color model. -
getRecompressionType
Get the value of the Recompression Type for a given color model. -
setRecompressionType
Set the value for the recompression Type for a given color model. Any image that is downsampled will be compressed using this method, if the Downsampling option is true for this color model. Any image that is not downsampled, will be converted to this compression type, if it is not already compressed in this type, and the Recompression option for this color model is true. -
getCompressionQuality
Get the value of the Compression Quality for a given color model. -
setCompressionQuality
Set the value for the Compression Quality for a given color model. Any image that recompressed, regardless of the reason, will use this Quality for the Quality value of the specific compression type. -
getMajorVersion
public short getMajorVersion()Get the value of the Major Version of the optimized document.NOTE: A value of 0 indicates the Optimizer will decide what version it should be.
-
setMajorVersion
public void setMajorVersion(short major) Set the value for the Major Version for the optimized document. -
getMinorVersion
public short getMinorVersion()Get the value of the Minor Version of the optimized document. -
setMinorVersion
public void setMinorVersion(short minor) Set the value for the Minor Version for the optimized document. -
getObjectCompression
Get the value of the Object Compression of the optimized document. -
setObjectCompression
Set the value for the Object Compression for the optimized document. -
optimize
public void optimize(Document document, String newPath, ProgressMonitor progressMonitor, CancelProc cancelProc) Perform the Optimization of a single document, saving the result in a new file. -
optimize
-
optimize
public 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. -
optimize
-