PDFOptimizer Class Documentation
classPDFOptimizerNamespace:com::datalogics::PDFL
Detailed Description
Implementation of the PDF Optimizer function. Use the PDFOptimizer object to accumulate options for the Optimization, and to Optimize documents.
Constructor & Destructor Documentation
PDFOptimizer
PDFOptimizer()Construct a CPDFOptimizer, with default Options.
Member Function Documentation
DisposeChildren
voidDisposeChildren()Returns:
void[static initializer]
static void[static initializer]()delete
synchronized voiddelete(Booleandisposing)Parameters
disposing: Boolean
Returns:
synchronized voiddelete
synchronized voiddelete()Returns:
synchronized voidfinalize
voidfinalize()Returns:
voidgetCompressionQuality
CompressQualitygetCompressionQuality(CompressImageTypetype)Parameters
type: CompressImageTypeThe image color type (Color, Gray, or BW) to query.
Returns:
The compression quality level for the specified color model.Get the value of the Compression Quality for a given color model.
getMajorVersion
shortgetMajorVersion()Returns:
The major PDF version number, or 0 if the Optimizer will decide.Get the value of the Major Version of the optimized document.
getMaxResolution
intgetMaxResolution(CompressImageTypetype)Parameters
type: CompressImageTypeThe image color type (Color, Gray, or BW) to query.
Returns:
The maximum resolution in DPI above which images will be downsampled.Get the value of the Max DPI for a given color model.
getMinorVersion
shortgetMinorVersion()Returns:
The minor PDF version number.Get the value of the Minor Version of the optimized document.
getObjectCompression
ObjectCompressionTypegetObjectCompression()Returns:
The current object compression type setting.Get the value of the Object Compression of the optimized document.
getOption
booleangetOption(OptimizerOptionoption)Parameters
option: OptimizerOptionThe optimization option to query.
Returns:
true if the option is enabled, false if it is disabled.Get the value of a single Optimizer Option.
getRecompressionType
CompressionTypegetRecompressionType(CompressImageTypetype)Parameters
type: CompressImageTypeThe image color type (Color, Gray, or BW) to query.
Returns:
The compression type that will be applied to images of the specified color model.Get the value of the Recompression Type for a given color model.
getResampleToResolution
intgetResampleToResolution(CompressImageTypetype)Parameters
type: CompressImageTypeThe image color type (Color, Gray, or BW) to query.
Returns:
The target resolution in DPI to which images will be downsampled.Get the value of the Resample To DPI for a given color model.
optimize
voidoptimize(Documentdoc, javax.imageio.stream.ImageOutputStreamstream)Parameters
doc: Documentstream: javax.imageio.stream.ImageOutputStream
Returns:
voidoptimize
voidoptimize(Documentdoc, javax.imageio.stream.ImageOutputStreamstream, ProgressMonitorprogressMonitor, CancelProccancelProc)Parameters
doc: Documentstream: javax.imageio.stream.ImageOutputStreamprogressMonitor: ProgressMonitorcancelProc: CancelProc
Returns:
voidoptimize
voidoptimize(Documentdocument, JavaStreamFiledest)Parameters
document: DocumentThe document to optimize.
dest: JavaStreamFileThe stream file handle to write the optimized document to.
Returns:
voidPerform the Optimization of a single document, saving the result to a stream.
optimize
voidoptimize(Documentdocument, JavaStreamFiledest, ProgressMonitorprogressMonitor, CancelProccancelProc)Parameters
document: DocumentThe document to optimize.
dest: JavaStreamFileThe stream file handle to write the optimized document to.
progressMonitor: ProgressMonitorAn optional progress monitor callback, or NULL.
cancelProc: CancelProcAn optional cancellation callback, or NULL.
Returns:
voidPerform the Optimization of a single document, saving the result to a stream.
optimize
voidoptimize(Documentdocument, StringnewPath)Parameters
document: DocumentThe document to optimize.
newPath: StringThe file system path where the optimized document will be saved.
Returns:
voidPerform the Optimization of a single document, saving the result in a new file.
optimize
voidoptimize(Documentdocument, StringnewPath, ProgressMonitorprogressMonitor, CancelProccancelProc)Parameters
document: DocumentThe document to optimize.
newPath: StringThe file system path where the optimized document will be saved.
progressMonitor: ProgressMonitorAn optional progress monitor callback, or NULL.
cancelProc: CancelProcAn optional cancellation callback, or NULL.
Returns:
voidPerform the Optimization of a single document, saving the result in a new file.
setCompressionQuality
voidsetCompressionQuality(CompressImageTypetype, CompressQualityvalue)Parameters
type: CompressImageTypeThe image color type (Color, Gray, or BW) to set.
value: CompressQualityThe compression quality level to apply.
Returns:
voidSet 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.
setMajorVersion
voidsetMajorVersion(shortmajor)Parameters
major: shortThe major PDF version number.
Returns:
voidSet the value for the Major Version for the optimized document.
setMaxResolution
voidsetMaxResolution(CompressImageTypetype, intvalue)Parameters
type: CompressImageTypeThe image color type (Color, Gray, or BW) to set.
value: intThe maximum resolution in DPI.
Returns:
voidSet 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.
setMinorVersion
voidsetMinorVersion(shortminor)Parameters
minor: shortThe minor PDF version number.
Returns:
voidSet the value for the Minor Version for the optimized document.
setObjectCompression
voidsetObjectCompression(ObjectCompressionTypeobjectCompression)Parameters
objectCompression: ObjectCompressionTypeThe desired object compression type.
Returns:
voidSet the value for the Object Compression for the optimized document.
setOption
voidsetOption(OptimizerOptionoption, booleanvalue)Parameters
option: OptimizerOptionThe optimization option to set.
value: booleantrue to enable the option, false to disable it.
Returns:
voidSet the value of a single Optimizer option.
setRecompressionType
voidsetRecompressionType(CompressImageTypetype, CompressionTypevalue)Parameters
type: CompressImageTypeThe image color type (Color, Gray, or BW) to set.
value: CompressionTypeThe compression type to apply.
Returns:
voidSet 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.
setResampleToResolution
voidsetResampleToResolution(CompressImageTypetype, intvalue)Parameters
type: CompressImageTypeThe image color type (Color, Gray, or BW) to set.
value: intThe target resolution in DPI.
Returns:
voidSet 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.