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.
|
int |
getMaxResoultion()
Specifies maximum resolution of images.
|
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 |
isRemovePrivateInfo()
Remove private information (page piece info).
|
boolean |
isResizeImages()
If this flag set to true and CompressImages is true images will be resized if image
Resolution is greater then specified MaxResolution parameter.
|
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)
Specifies level 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 |
setMaxResoultion(int value)
Specifies maximum resolution of images.
|
void |
setRemovePrivateInfo(boolean value)
Remove private information (page piece info).
|
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 |
setResizeImages(boolean value)
If this flag set to true and CompressImages is true images will be resized if image
Resolution is greater then specified MaxResolution parameter.
|
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 boolean isResizeImages()
If this flag set to true and CompressImages is true images will be resized if image Resolution is greater then specified MaxResolution parameter.
public void setResizeImages(boolean value)
If this flag set to true and CompressImages is true images will be resized if image Resolution is greater then specified MaxResolution parameter.
value
- boolean valuepublic int getImageQuality()
Specifie slevel of image compression when CompressIamges flag is used.
public void setImageQuality(int value)
Specifies level of image compression when CompressIamges flag is used.
value
- image qualitypublic int getMaxResoultion()
Specifies maximum resolution of images. If image has higher resolition it will be scaled
public void setMaxResoultion(int value)
Specifies maximum resolution of images. If image has higher resolition it will be scaled
value
- int valuepublic 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 boolean isRemovePrivateInfo()
Remove private information (page piece info).
public void setRemovePrivateInfo(boolean value)
Remove private information (page piece info).
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.
dimension
- image maximum dimensionCopyright © 2017 Aspose. All Rights Reserved.