Package com.itextpdf.pdfocr
Enum ScaleMode
- All Implemented Interfaces:
-
Serializable
,Comparable<ScaleMode>
,java.lang.constant.Constable
Enumeration of the possible scale modes for input images.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionOnly height of the image will be proportionally scaled to fit required size that is set usingOcrPdfCreatorProperties.setPageSize(Rectangle)
method.The image will be scaled to fit within the page width and height dimensions that are set usingOcrPdfCreatorProperties.setPageSize(Rectangle)
method.Only width of the image will be proportionally scaled to fit required size that is set usingOcrPdfCreatorProperties.setPageSize(Rectangle)
method. -
Method Summary
-
Enum Constant Details
-
SCALE_WIDTH
Only width of the image will be proportionally scaled to fit required size that is set usingOcrPdfCreatorProperties.setPageSize(Rectangle)
method. Height will be equal to the page height that was set usingOcrPdfCreatorProperties.setPageSize(Rectangle)
method and width will be proportionally scaled to keep the original aspect ratio. -
SCALE_HEIGHT
Only height of the image will be proportionally scaled to fit required size that is set usingOcrPdfCreatorProperties.setPageSize(Rectangle)
method. Width will be equal to the page width that was set usingOcrPdfCreatorProperties.setPageSize(Rectangle)
method and height will be proportionally scaled to keep the original aspect ratio. -
SCALE_TO_FIT
The image will be scaled to fit within the page width and height dimensions that are set usingOcrPdfCreatorProperties.setPageSize(Rectangle)
method. Original aspect ratio of the image stays unchanged.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
-
name
- the name of the enum constant to be returned. - Returns:
- the enum constant with the specified name
- Throws:
-
IllegalArgumentException
- if this enum type has no constant with the specified name -
NullPointerException
- if the argument is null
-