Constructor and Description |
---|
Document.OptimizationOptions() |
Modifier and Type | Method and Description |
---|---|
static Document.OptimizationOptions |
all()
Creates optimization strategy will all options activated.
|
boolean |
getAllowReusePageContent()
If true page contents will be reused when document is optimized for equal pages.
|
int |
getImageQuality()
Specifie slevel of image compression when CompressIamges flag is used.
|
boolean |
getLinkDuplcateStreams()
If this flag is set to true, Resource streams will be analyzed.
|
int |
getMaximumImageDimension()
Specifies maximum image dimension.
|
boolean |
getRemoveUnusedObjects()
If this flag is set to true, all document objects will be checked and unused objects
(i.e.
|
boolean |
getRemoveUnusedStreams()
If this flag set to true, every resource is checked on it's usage.
|
int |
getResolution()
Specifies new image dpi when CompressIamges flag is used.
|
boolean |
isCompressImages()
If this flag is set to true images will be compressed in the document.
|
boolean |
isUnembedFonts()
Make fonts not embedded if set to true.
|
void |
setAllowReusePageContent(boolean value)
If true page contents will be reused when document is optimized for equal pages.
|
void |
setCompressImages(boolean value)
If this flag is set to true images will be compressed in the document.
|
void |
setImageQuality(int value)
Specifie slevel of image compression when CompressIamges flag is used.
|
void |
setLinkDuplcateStreams(boolean value)
If this flag is set to true, Resource streams will be analyzed.
|
void |
setMaximumImageDimension(int dimension)
Specifies maximum image dimension.
|
void |
setRemoveUnusedObjects(boolean value)
If this flag is set to true, all document objects will be checked and unused objects
(i.e.
|
void |
setRemoveUnusedStreams(boolean value)
If this flag set to true, every resource is checked on it's usage.
|
void |
setResolution(int dpi)
Specifies new image dpi when CompressIamges flag is used.
|
void |
setUnembedFonts(boolean value)
Make fonts not embedded if set to true.
|
public boolean getLinkDuplcateStreams()
If this flag is set to true, Resource streams will be analyzed. If duplicate streams are found (i.e. if stream contents is equal), then thes streams will be stored as one object. This allows to decrease document size in some cases (for example, when same document was concatenedted multiple times).
public void setLinkDuplcateStreams(boolean value)
If this flag is set to true, Resource streams will be analyzed. If duplicate streams are found (i.e. if stream contents is equal), then thes streams will be stored as one object. This allows to decrease document size in some cases (for example, when same document was concatenedted multiple times).
value
- boolean valuepublic boolean getAllowReusePageContent()
If true page contents will be reused when document is optimized for equal pages.
public void setAllowReusePageContent(boolean value)
If true page contents will be reused when document is optimized for equal pages.
value
- boolean valuepublic boolean getRemoveUnusedStreams()
If this flag set to true, every resource is checked on it's usage. If resource is never used, then resources is removed. This may decrease document size for example when pages were extracted from document.
public void setRemoveUnusedStreams(boolean value)
If this flag set to true, every resource is checked on it's usage. If resource is never used, then resources is removed. This may decrease document size for example when pages were extracted from document.
value
- boolean valuepublic boolean getRemoveUnusedObjects()
If this flag is set to true, all document objects will be checked and unused objects (i.e. objects which does not have any reference) are removed from document.
public void setRemoveUnusedObjects(boolean value)
If this flag is set to true, all document objects will be checked and unused objects (i.e. objects which does not have any reference) are removed from document.
value
- boolean valuepublic boolean isCompressImages()
If this flag is set to true images will be compressed in the document. compression level is specfied with ImageQuality property.
public void setCompressImages(boolean value)
If this flag is set to true images will be compressed in the document. compression level is specfied with ImageQuality property.
value
- boolean valuepublic int getImageQuality()
Specifie slevel of image compression when CompressIamges flag is used.
public void setImageQuality(int value)
Specifie slevel of image compression when CompressIamges flag is used.
value
- image qualitypublic boolean isUnembedFonts()
Make fonts not embedded if set to true.
public void setUnembedFonts(boolean value)
Make fonts not embedded if set to true.
value
- boolean valuepublic static Document.OptimizationOptions all()
Creates optimization strategy will all options activated.
public int getResolution()
Specifies new image dpi when CompressIamges flag is used.
public void setResolution(int dpi)
Specifies new image dpi when CompressIamges flag is used.
dpi
- image resolutionpublic int getMaximumImageDimension()
Specifies maximum image dimension. If the image width or height of the existing image is greater than this value - the image size will be proportionally reduced.
public void setMaximumImageDimension(int dimension)
Specifies maximum image dimension. If the image width or height of the existing image is greater than this value - the image size will be proportionally reduced.
Copyright © 2016 Aspose. All Rights Reserved.