Class Mrc
- java.lang.Object
-
- com.pdftools.internal.NativeBase
-
- com.pdftools.internal.NativeObject
-
- com.pdftools.optimization.profiles.Profile
-
- com.pdftools.optimization.profiles.Mrc
-
public class Mrc extends Profile
The optimization profile suitable for documents with Mixed Raster Content
Reduce the file size for documents containing large images, e.g. scanned pages, while maintaining the readability of text. This is accomplished by separating the images into a foreground, background and a mask layer. The foreground and background layers are heavily down-sampled and compressed. The textual information is stored in the mask with a lossless compression type. Additionally, redundant objects are removed, resources are optimized and embedded fonts are merged.
-
-
Constructor Summary
Constructors Constructor Description Mrc()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
getLayerCompressionQuality()
The image quality for MRC foreground and background layers (Getter)java.lang.Double
getLayerResolutionDPI()
The target resolution in DPI (dots per inch) for downsampling MRC foreground and background layers (Getter)boolean
getRecognizePictures()
The option to recognize photographic regions when doing MRC.void
setLayerCompressionQuality(double value)
The image quality for MRC foreground and background layers (Setter)void
setLayerResolutionDPI(java.lang.Double value)
The target resolution in DPI (dots per inch) for downsampling MRC foreground and background layers (Setter)void
setRecognizePictures(boolean value)
The option to recognize photographic regions when doing MRC.-
Methods inherited from class com.pdftools.optimization.profiles.Profile
getCopyMetadata, getFontOptions, getImageRecompressionOptions, getRemovalOptions, setCopyMetadata
-
Methods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
-
-
-
Method Detail
-
getLayerCompressionQuality
public double getLayerCompressionQuality()
The image quality for MRC foreground and background layers (Getter)
This is a value between
0
(lowest quality) and1
(highest quality).Default:
-
pdftools.optimization.CompressionAlgorithmSelection.PRESERVE_QUALITY
algorithm:1
. -
pdftools.optimization.CompressionAlgorithmSelection.BALANCED
algorithm:0.25
. -
pdftools.optimization.CompressionAlgorithmSelection.SPEED
algorithm:0.25
.
-
-
setLayerCompressionQuality
public void setLayerCompressionQuality(double value)
The image quality for MRC foreground and background layers (Setter)
This is a value between
0
(lowest quality) and1
(highest quality).Default:
-
pdftools.optimization.CompressionAlgorithmSelection.PRESERVE_QUALITY
algorithm:1
. -
pdftools.optimization.CompressionAlgorithmSelection.BALANCED
algorithm:0.25
. -
pdftools.optimization.CompressionAlgorithmSelection.SPEED
algorithm:0.25
.
- Throws:
java.lang.IllegalArgumentException
- The given value is smaller than0
or greater than1
.
-
-
getLayerResolutionDPI
public java.lang.Double getLayerResolutionDPI()
The target resolution in DPI (dots per inch) for downsampling MRC foreground and background layers (Getter)
Valid values are 1, or 10000, or in between. Set to
null
to deactivate downsampling of images.Default:
70
.
-
setLayerResolutionDPI
public void setLayerResolutionDPI(java.lang.Double value)
The target resolution in DPI (dots per inch) for downsampling MRC foreground and background layers (Setter)
Valid values are 1, or 10000, or in between. Set to
null
to deactivate downsampling of images.Default:
70
.- Throws:
java.lang.IllegalArgumentException
- The given value is smaller than 1 or greater than 10000.
-
getRecognizePictures
public boolean getRecognizePictures()
The option to recognize photographic regions when doing MRC. (Getter)
Regardless of this property’s setting, monochrome (grayscale) images are always treated as entire photographic regions (cutout pictures) by the MRC algorithm.
Default:
false
.
-
setRecognizePictures
public void setRecognizePictures(boolean value)
The option to recognize photographic regions when doing MRC. (Setter)
Regardless of this property’s setting, monochrome (grayscale) images are always treated as entire photographic regions (cutout pictures) by the MRC algorithm.
Default:
false
.
-
-