public class OcrPdfCreatorProperties extends Object
OcrPdfCreator
.
Constructor and Description |
---|
OcrPdfCreatorProperties()
Creates a new OcrPdfCreatorProperties instance.
|
OcrPdfCreatorProperties(OcrPdfCreatorProperties other)
Creates a new OcrPdfCreatorProperties instance based on another OcrPdfCreatorProperties instance (copy constructor).
|
Modifier and Type | Method and Description |
---|---|
String |
getDefaultFontFamily()
Gets preferred font family to be used when selecting font from FontProvider .
|
com.itextpdf.layout.font.FontProvider |
getFontProvider()
Returns FontProvider that was set previously or if it is null a new instance of PdfOcrFontProvider is returned.
|
String |
getImageLayerName()
Gets name of image layer.
|
IImageRotationHandler |
getImageRotationHandler()
Gets image rotation handler instance.
|
com.itextpdf.kernel.geom.Rectangle |
getPageSize()
Gets required size for output PDF document.
|
String |
getPdfLang()
Gets PDF language.
|
ScaleMode |
getScaleMode()
Gets scale mode for input images using available options from ScaleMode enumeration.
|
com.itextpdf.kernel.colors.Color |
getTextColor()
Gets text color in output PDF document.
|
String |
getTextLayerName()
Gets name of text layer.
|
String |
getTitle()
Gets PDF document title.
|
OcrPdfCreatorProperties |
setFontProvider(com.itextpdf.layout.font.FontProvider fontProvider)
Sets font provider.
|
OcrPdfCreatorProperties |
setFontProvider(com.itextpdf.layout.font.FontProvider fontProvider, String defaultFontFamily)
Sets font provider and default font family.
|
OcrPdfCreatorProperties |
setImageLayerName(String layerName)
Sets name for the image layer.
|
OcrPdfCreatorProperties |
setImageRotationHandler(IImageRotationHandler imageRotationDetector)
Sets image rotation handler instance.
|
OcrPdfCreatorProperties |
setMetaInfo(com.itextpdf.commons.actions.contexts.IMetaInfo metaInfo)
Set meta info for this OcrPdfCreatorProperties .
|
OcrPdfCreatorProperties |
setPageSize(com.itextpdf.kernel.geom.Rectangle pageSize)
Sets required size for output PDF document.
|
OcrPdfCreatorProperties |
setPdfLang(String language)
Specify PDF natural language, and optionally locale.
|
OcrPdfCreatorProperties |
setScaleMode(ScaleMode scaleMode)
Sets scale mode for input images using available options from ScaleMode enumeration.
|
OcrPdfCreatorProperties |
setTextColor(com.itextpdf.kernel.colors.Color textColor)
Sets text color in output PDF document.
|
OcrPdfCreatorProperties |
setTextLayerName(String layerName)
Sets name for the text layer.
|
OcrPdfCreatorProperties |
setTitle(String title)
Sets PDF document title.
|
public OcrPdfCreatorProperties()
OcrPdfCreatorProperties
instance.
public OcrPdfCreatorProperties(OcrPdfCreatorProperties other)
OcrPdfCreatorProperties
instance based on another OcrPdfCreatorProperties
instance (copy constructor).
other
- the other OcrPdfCreatorProperties
instance
public final com.itextpdf.kernel.colors.Color getTextColor()
Color
public final OcrPdfCreatorProperties setTextColor(com.itextpdf.kernel.colors.Color textColor)
textColor
- required text Color
OcrPdfCreatorProperties
instance
public final ScaleMode getScaleMode()
ScaleMode
enumeration.
ScaleMode
public final OcrPdfCreatorProperties setScaleMode(ScaleMode scaleMode)
ScaleMode
enumeration.
scaleMode
- selected ScaleMode
OcrPdfCreatorProperties
instance
public final com.itextpdf.kernel.geom.Rectangle getPageSize()
ScaleMode
Rectangle
public final OcrPdfCreatorProperties setPageSize(com.itextpdf.kernel.geom.Rectangle pageSize)
pageSize
- requested page size as Rectangle
OcrPdfCreatorProperties
instance
public final String getImageLayerName()
String
if it was manually set, otherwise - null
public final OcrPdfCreatorProperties setImageLayerName(String layerName)
null
by default. If null then image is placed directly in canvas instead of layer. If image layer name is equal to text layer name then text and image placed in one layer.
layerName
- name of the image layer as String
OcrPdfCreatorProperties
instance
public final String getTextLayerName()
String
if it was manually set, otherwise - null
public final OcrPdfCreatorProperties setTextLayerName(String layerName)
null
by default. If null then text is placed directly in canvas instead of layer. If text layer name is equal to image layer name then text and image placed in one layer.
layerName
- of the text layer as String
OcrPdfCreatorProperties
instance
public final String getPdfLang()
String
public final OcrPdfCreatorProperties setPdfLang(String language)
language
- PDF document language as String
, e.g. "en-US", etc.
OcrPdfCreatorProperties
instance
public final OcrPdfCreatorProperties setTitle(String title)
title
- PDF title as String
OcrPdfCreatorProperties
instance
public com.itextpdf.layout.font.FontProvider getFontProvider()
null
a new instance of PdfOcrFontProvider
is returned.
FontProvider
object
public OcrPdfCreatorProperties setFontProvider(com.itextpdf.layout.font.FontProvider fontProvider)
PdfOcrFontProvider.getDefaultFontFamily()
fontProvider
- selected FontProvider
instance
OcrPdfCreatorProperties
instance
public OcrPdfCreatorProperties setFontProvider(com.itextpdf.layout.font.FontProvider fontProvider, String defaultFontFamily)
fontProvider
- selected FontProvider
instance
defaultFontFamily
- preferred font family to be used when selecting font from FontProvider
.
OcrPdfCreatorProperties
instance
public String getDefaultFontFamily()
FontProvider
.
PdfOcrFontProvider.getDefaultFontFamily()
is returned
public IImageRotationHandler getImageRotationHandler()
public OcrPdfCreatorProperties setImageRotationHandler(IImageRotationHandler imageRotationDetector)
imageRotationDetector
- image rotation handler instance
OcrPdfCreatorProperties
instance
public OcrPdfCreatorProperties setMetaInfo(com.itextpdf.commons.actions.contexts.IMetaInfo metaInfo)
OcrPdfCreatorProperties
.
metaInfo
- meta info
OcrPdfCreatorProperties
Copyright © 1998–2022 iText Group NV. All rights reserved.