pdfOCR 1.0.1 API
iText.Pdfocr.OcrPdfCreatorProperties Class Reference

Properties that will be used by the OcrPdfCreator. More...

Public Member Functions

 OcrPdfCreatorProperties ()
 Creates a new OcrPdfCreatorProperties instance. More...
 
 OcrPdfCreatorProperties (iText.Pdfocr.OcrPdfCreatorProperties other)
 Creates a new OcrPdfCreatorProperties instance based on another OcrPdfCreatorProperties instance (copy constructor). More...
 
Color GetTextColor ()
 Gets text color in output PDF document. More...
 
iText.Pdfocr.OcrPdfCreatorProperties SetTextColor (Color textColor)
 Sets text color in output PDF document. More...
 
ScaleMode GetScaleMode ()
 Gets scale mode for input images using available options from ScaleMode enumeration. More...
 
iText.Pdfocr.OcrPdfCreatorProperties SetScaleMode (ScaleMode scaleMode)
 Sets scale mode for input images using available options from ScaleMode enumeration. More...
 
Rectangle GetPageSize ()
 Gets required size for output PDF document. More...
 
iText.Pdfocr.OcrPdfCreatorProperties SetPageSize (Rectangle pageSize)
 Sets required size for output PDF document. More...
 
String GetImageLayerName ()
 Gets name of image layer. More...
 
iText.Pdfocr.OcrPdfCreatorProperties SetImageLayerName (String layerName)
 Sets name for the image layer. More...
 
String GetTextLayerName ()
 Gets name of text layer. More...
 
iText.Pdfocr.OcrPdfCreatorProperties SetTextLayerName (String layerName)
 Sets name for the text layer. More...
 
String GetPdfLang ()
 Gets PDF language. More...
 
iText.Pdfocr.OcrPdfCreatorProperties SetPdfLang (String language)
 Specify PDF natural language, and optionally locale. More...
 
String GetTitle ()
 Gets PDF document title. More...
 
iText.Pdfocr.OcrPdfCreatorProperties SetTitle (String title)
 Sets PDF document title. More...
 
virtual FontProvider GetFontProvider ()
 Returns FontProvider that was set previously or if it is null a new instance of PdfOcrFontProvider is returned. More...
 
virtual iText.Pdfocr.OcrPdfCreatorProperties SetFontProvider (FontProvider fontProvider)
 Sets font provider. More...
 
virtual iText.Pdfocr.OcrPdfCreatorProperties SetFontProvider (FontProvider fontProvider, String defaultFontFamily)
 Sets font provider and default font family. More...
 
virtual String GetDefaultFontFamily ()
 Gets preferred font family to be used when selecting font from iText.Layout.Font.FontProvider. More...
 

Detailed Description

Properties that will be used by the OcrPdfCreator.

Constructor & Destructor Documentation

◆ OcrPdfCreatorProperties() [1/2]

iText.Pdfocr.OcrPdfCreatorProperties.OcrPdfCreatorProperties ( )
inline

Creates a new OcrPdfCreatorProperties instance.

◆ OcrPdfCreatorProperties() [2/2]

iText.Pdfocr.OcrPdfCreatorProperties.OcrPdfCreatorProperties ( iText.Pdfocr.OcrPdfCreatorProperties  other)
inline

Creates a new OcrPdfCreatorProperties instance based on another OcrPdfCreatorProperties instance (copy constructor).

Parameters
otherthe other OcrPdfCreatorProperties instance

Member Function Documentation

◆ GetDefaultFontFamily()

virtual String iText.Pdfocr.OcrPdfCreatorProperties.GetDefaultFontFamily ( )
inlinevirtual

Gets preferred font family to be used when selecting font from iText.Layout.Font.FontProvider.

Returns
if default font family is not set or it is null or empty PdfOcrFontProvider.GetDefaultFontFamily() is returned

◆ GetFontProvider()

virtual FontProvider iText.Pdfocr.OcrPdfCreatorProperties.GetFontProvider ( )
inlinevirtual

Returns FontProvider that was set previously or if it is null a new instance of PdfOcrFontProvider is returned.

Returns

iText.Layout.Font.FontProvider object

◆ GetImageLayerName()

String iText.Pdfocr.OcrPdfCreatorProperties.GetImageLayerName ( )
inline

Gets name of image layer.

Returns
image layer's name as System.String if it was manually set, otherwise - null

◆ GetPageSize()

Rectangle iText.Pdfocr.OcrPdfCreatorProperties.GetPageSize ( )
inline

Gets required size for output PDF document.

Gets required size for output PDF document. Real size of the page will be calculated according to the selected ScaleMode

Returns
required page size as iText.Kernel.Geom.Rectangle

◆ GetPdfLang()

String iText.Pdfocr.OcrPdfCreatorProperties.GetPdfLang ( )
inline

Gets PDF language.

Returns
PDF document language as System.String

◆ GetScaleMode()

ScaleMode iText.Pdfocr.OcrPdfCreatorProperties.GetScaleMode ( )
inline

Gets scale mode for input images using available options from ScaleMode enumeration.

Returns
selected ScaleMode

◆ GetTextColor()

Color iText.Pdfocr.OcrPdfCreatorProperties.GetTextColor ( )
inline

Gets text color in output PDF document.

Returns
set text iText.Kernel.Colors.Color

◆ GetTextLayerName()

String iText.Pdfocr.OcrPdfCreatorProperties.GetTextLayerName ( )
inline

Gets name of text layer.

Returns
text layer's name as System.String if it was manually set, otherwise - null

◆ GetTitle()

String iText.Pdfocr.OcrPdfCreatorProperties.GetTitle ( )
inline

Gets PDF document title.

Returns
PDF title as System.String

◆ SetFontProvider() [1/2]

virtual iText.Pdfocr.OcrPdfCreatorProperties iText.Pdfocr.OcrPdfCreatorProperties.SetFontProvider ( FontProvider  fontProvider)
inlinevirtual

Sets font provider.

Sets font provider. Please note that passed FontProvider is not to be used in multithreaded environments or for any parallel processing. There will be set the following default font family: PdfOcrFontProvider.GetDefaultFontFamily()

Parameters
fontProviderselected iText.Layout.Font.FontProvider instance
Returns
the OcrPdfCreatorProperties instance

◆ SetFontProvider() [2/2]

virtual iText.Pdfocr.OcrPdfCreatorProperties iText.Pdfocr.OcrPdfCreatorProperties.SetFontProvider ( FontProvider  fontProvider,
String  defaultFontFamily 
)
inlinevirtual

Sets font provider and default font family.

Sets font provider and default font family. Please note that passed FontProvider is not to be used in multithreaded environments or for any parallel processing.

Parameters
fontProviderselected iText.Layout.Font.FontProvider instance
defaultFontFamilypreferred font family to be used when selecting font from iText.Layout.Font.FontProvider.
Returns
the OcrPdfCreatorProperties instance

◆ SetImageLayerName()

iText.Pdfocr.OcrPdfCreatorProperties iText.Pdfocr.OcrPdfCreatorProperties.SetImageLayerName ( String  layerName)
inline

Sets name for the image layer.

Sets name for the image layer. 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.

Parameters
layerNamename of the image layer as System.String
Returns
the OcrPdfCreatorProperties instance

◆ SetPageSize()

iText.Pdfocr.OcrPdfCreatorProperties iText.Pdfocr.OcrPdfCreatorProperties.SetPageSize ( Rectangle  pageSize)
inline

Sets required size for output PDF document.

Parameters
pageSizerequested page size as iText.Kernel.Geom.Rectangle
Returns
the OcrPdfCreatorProperties instance

◆ SetPdfLang()

iText.Pdfocr.OcrPdfCreatorProperties iText.Pdfocr.OcrPdfCreatorProperties.SetPdfLang ( String  language)
inline

Specify PDF natural language, and optionally locale.

Specify PDF natural language, and optionally locale. Language identifier shall either be the empty text string, to indicate that the language is unknown, or a Language-Tag as defined in BCP 47 (2009), Tags for the Identification of Languages.

Parameters
languagePDF document language as System.String , e.g. "en-US", etc.
Returns
the OcrPdfCreatorProperties instance

◆ SetScaleMode()

iText.Pdfocr.OcrPdfCreatorProperties iText.Pdfocr.OcrPdfCreatorProperties.SetScaleMode ( ScaleMode  scaleMode)
inline

Sets scale mode for input images using available options from ScaleMode enumeration.

Parameters
scaleModeselected ScaleMode
Returns
the OcrPdfCreatorProperties instance

◆ SetTextColor()

iText.Pdfocr.OcrPdfCreatorProperties iText.Pdfocr.OcrPdfCreatorProperties.SetTextColor ( Color  textColor)
inline

Sets text color in output PDF document.

Sets text color in output PDF document. Text will be transparent by default.

Parameters
textColorrequired text iText.Kernel.Colors.Color
Returns
the OcrPdfCreatorProperties instance

◆ SetTextLayerName()

iText.Pdfocr.OcrPdfCreatorProperties iText.Pdfocr.OcrPdfCreatorProperties.SetTextLayerName ( String  layerName)
inline

Sets name for the text layer.

Sets name for the text layer. 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.

Parameters
layerNameof the text layer as System.String
Returns
the OcrPdfCreatorProperties instance

◆ SetTitle()

iText.Pdfocr.OcrPdfCreatorProperties iText.Pdfocr.OcrPdfCreatorProperties.SetTitle ( String  title)
inline

Sets PDF document title.

Parameters
titlePDF title as System.String
Returns
the OcrPdfCreatorProperties instance