USER’S GUIDE
ABBYY FineReader Engine 11: Table of Contents
1
Table of Contents
Introducing ABBYY FineReader Engine 11 ..................................................... 27
Basic Usage Scenarios Overview .................................................................................................. 28
Key Features .............................................................................................................................. 31
Document Scanning and Image Import .................................................................................. 33
Image Preprocessing ............................................................................................................ 34
Document Analysis ............................................................................................................... 36
OCR and Other Recognition Technologies .............................................................................. 37
PDF Conversion .................................................................................................................... 41
Advanced Development Tools ................................................................................................ 43
Receiving and Exporting Recognized Text .............................................................................. 44
Multi-CPU Recognition Architecture ........................................................................................ 45
Benefits ..................................................................................................................................... 45
Short Specifications .................................................................................................................... 45
Getting Started ........................................................................................................................... 46
Guided Tour ..................................................................................................... 47
Basic Usage Scenarios Implementation ........................................................................................ 47
Document Conversion ........................................................................................................... 48
Document Archiving .............................................................................................................. 55
Book Archiving ..................................................................................................................... 64
Text Extraction ..................................................................................................................... 72
Field-Level Recognition ......................................................................................................... 81
Barcode Recognition ............................................................................................................. 89
Business Card Recognition .................................................................................................... 97
Document Classification ...................................................................................................... 104
Image Preprocessing .......................................................................................................... 111
Scanning ............................................................................................................................ 117
Advanced Techniques ............................................................................................................... 124
Programming Aspects ......................................................................................................... 125
Different Ways to Load the Engine Object ............................................................................ 126
Using ABBYY FineReader Engine in Multi-Threaded Server Applications .................................. 131
Error Handling .................................................................................................................... 132
Working with Properties ...................................................................................................... 133
Working with Collections ..................................................................................................... 135
Working with Connectable Objects ....................................................................................... 139
Working with COM Interfaces from a Scripting Language ...................................................... 142
Using ABBYY FineReader Engine in Delphi ............................................................................ 143
Using ABBYY FineReader Engine in Java .............................................................................. 144
Using ABBYY FineReader Engine in C (Objective-C) .............................................................. 149
Using Visual Components in Different Versions of Visual Studio ............................................. 150
Working with Profiles .......................................................................................................... 151
Tuning Parameters of Page Preprocessing, Analysis, Recognition, and Synthesis .................... 154
Tuning Export Parameters ................................................................................................... 156
Parallel Processing with ABBYY FineReader Engine ............................................................... 158
Exporting Large Documents ................................................................................................ 163
Working with Images .......................................................................................................... 165
ABBYY FineReader Engine 11: Table of Contents
2
Working with Languages ..................................................................................................... 168
Working with Layout and Blocks .......................................................................................... 169
Working with Text .............................................................................................................. 171
Working with the Logical Structure of a Document................................................................ 173
Iterating Document Pages and Elements of Logical Structure ................................................ 179
Using Voting API ................................................................................................................ 182
Using Text Type Autodetection ............................................................................................ 185
Recognizing Checkmarks ..................................................................................................... 186
Recognizing Barcodes ......................................................................................................... 189
Recognizing Handprinted Texts ........................................................................................... 193
Recognizing Handprinted Arabic Digits ................................................................................. 194
Recognizing Chinese, Japanese, and Korean Languages ........................................................ 196
Working with Dictionaries .................................................................................................... 198
Working with ABBYY FineReader Engine Regular Expressions ................................................ 202
Recognizing Words with Spaces ........................................................................................... 204
ZUGFeRD-compliant electronic invoices ................................................................................ 207
Using Graphical User Interface Elements .............................................................................. 207
Creating an Application with a Graphical User Interface ........................................................ 208
Customizing the Context Menu and Toolbar of a Visual Component ....................................... 212
How Component Synchronizer Works ................................................................................... 215
Visual Components Localization ........................................................................................... 220
Recognizing with Training ................................................................................................... 221
Training User Patterns ........................................................................................................ 223
Best Practices ........................................................................................................................... 224
Improving Recognition Quality ............................................................................................. 225
Increasing Processing Speed ............................................................................................... 226
Source Image Recommendations ......................................................................................... 227
Tips for Taking Photos ........................................................................................................ 228
Tips for Document Scanning ................................................................................................ 230
Description of the ABBYY FineReader Engine Samples ................................................................ 231
API Reference ............................................................................................... 234
ABBYY FineReader Engine 11 Object Diagram ............................................................................ 235
Alphabetical List of the ABBYY FineReader Engine 11 Objects and Interfaces ............................... 236
Functions ................................................................................................................................. 244
GetEngineObject Function ................................................................................................... 244
GetEngineObjectEx Function ............................................................................................... 248
DeinitializeEngine Function .................................................................................................. 250
Engine Object (IEngine Interface).............................................................................................. 253
ConvertLanguageIdToLCID Method of the Engine Object ...................................................... 253
ConvertLCIDToLanguageId Method of the Engine Object ...................................................... 254
CreateEmptyUserPattern Method of the Engine Object .......................................................... 255
CreateExportFileWriter Method of the Engine Object ............................................................. 255
CreateFRDocumentFromImage Method of the Engine Object ................................................. 256
CreateMultipageImageWriter Method of the Engine Object .................................................... 257
CreateMultipageImageWriterEx Method of the Engine Object ................................................ 258
CreatePoint Method of the Engine Object ............................................................................. 259
CreateRectangle Method of the Engine Object ...................................................................... 260
CreateScanManager Method of the Engine Object ................................................................. 261
ABBYY FineReader Engine 11: Table of Contents
3
Creation Methods of the Engine Object ................................................................................ 262
EditUserPattern Method of the Engine Object ....................................................................... 262
The Character Properties Dialog Box .................................................................................... 263
The User Pattern Dialog Box ................................................................................................ 264
ExportPage Method of the Engine Object ............................................................................. 265
ExportPagesEx Method of the Engine Object ........................................................................ 266
GetAvailableLicenses Method of the Engine Object ............................................................... 267
GetNumberOfPagesInImageFile Method of the Engine Object................................................ 268
InjectTextLayer Method of Engine Object ............................................................................. 269
InjectTextLayerEx Method of Engine Object ......................................................................... 271
InjectTextLayerEx2 Method of Engine Object ....................................................................... 272
IsPdfWithTextualContent Method of Engine Object ............................................................... 274
IsPdfWithTextualContentFromStream Method of Engine Object ............................................. 275
LoadImageDoc Method of the Engine Object ........................................................................ 276
LoadImageDocFromFile Method of the Engine Object ........................................................... 277
LoadImageDocFromMemory Method of the Engine Object .................................................... 278
LoadModule Method of the Engine Object ............................................................................ 278
LoadPredefinedProfile Method of the Engine Object .............................................................. 280
LoadProfile Method of the Engine Object .............................................................................. 283
MergePatterns Method of the Engine Object ......................................................................... 284
OpenBitmap Method of the Engine Object ............................................................................ 285
OpenBitmapBits Method of the Engine Object....................................................................... 286
OpenClassificationEtalon Method of the Engine Object .......................................................... 288
OpenClassificationTrainer Method of the Engine Object ......................................................... 288
OpenDib Method of the Engine Object ................................................................................. 289
OpenImageFile Method of Engine Object ............................................................................. 290
OpenImageFileFromMemory Method of the Engine Object .................................................... 292
OpenMemoryImageFormat10 Method of the Engine Object ................................................... 293
PrepareBitmap Method of the Engine Object ........................................................................ 294
PrepareBitmapBits Method of the Engine Object ................................................................... 296
PrepareDib Method of the Engine Object .............................................................................. 297
PrepareImageFile Method of the Engine Object .................................................................... 298
ProcessPage Method of the Engine Object ............................................................................ 300
ProcessPagesEx Method of the Engine Object ....................................................................... 301
RecognizeImageFile Method of the Engine Object ................................................................. 302
RestartLicensing Method of the Engine Object ...................................................................... 304
SetCurrentLicense Method of the Engine Object ................................................................... 305
SetLicensingConnectionRecoveryCallback Method of the Engine Object .................................. 305
SetParallelProcessingCallback Method of the Engine Object ................................................... 306
StartLogging Method of the Engine Object ........................................................................... 307
StopLogging Method of the Engine Object ............................................................................ 307
SynthesizePagesEx Method of the Engine Object .................................................................. 308
TrainUserPattern Method of the Engine Object ..................................................................... 309
Properties of the Engine Object ........................................................................................... 310
Creation Methods of the Engine Object ................................................................................ 313
Supplementary Methods of the Engine Object ...................................................................... 314
Processing Methods of the Engine Object ............................................................................. 315
Engine Loaders ......................................................................................................................... 317
ABBYY FineReader Engine 11: Table of Contents
4
IEngineLoader Interface ...................................................................................................... 317
ExplicitlyUnload Method of the IEngineLoader Interface ........................................................ 318
GetEngineObject Method of the IEngineLoader Interface ...................................................... 318
GetEngineObjectEx Method of the IEngineLoader Interface ................................................... 319
InprocLoader Object ........................................................................................................... 321
OutprocLoader Object ......................................................................................................... 321
IHostProcessControl Interface ............................................................................................. 322
SetClientProcessId Method of the IHostProcessControl Interface ........................................... 323
SetPriorityClass Method of the IHostProcessControl Interface ................................................ 323
Image-Related Objects ............................................................................................................. 324
ImageDocument Object (IImageDocument Interface) ........................................................... 325
ChangeResolution Method of the ImageDocument Object ..................................................... 330
CorrectSkew Method of the ImageDocument Object ............................................................. 331
CropImage Method of the ImageDocument Object ............................................................... 332
DitherImage Method of the ImageDocument Object ............................................................. 332
EnhanceLocalContrast Method of the ImageDocument Object ............................................... 333
EqualizeBrightness Method of the ImageDocument Object .................................................... 334
GetTextBackgroundColor Method of the ImageDocument Object ........................................... 334
Modify Method of the ImageDocument Object ...................................................................... 336
RemoveColorObjects Method of the ImageDocument Object ................................................. 336
RemoveColorObjectsEx Method of the ImageDocument Object ............................................. 337
RemoveGarbage Method of the ImageDocument Object ....................................................... 339
RemoveGarbageEx Method of the ImageDocument Object .................................................... 339
RemoveMotionBlur Method of the ImageDocument Object .................................................... 340
RemoveNoise Method of the ImageDocument Object ............................................................ 341
SaveImageRegionTo Method of the ImageDocument Object ................................................. 342
SaveModified Method of the ImageDocument Object ............................................................ 343
SaveTo Method of the ImageDocument Object ..................................................................... 343
SaveToFile Method of the ImageDocument Object ................................................................ 344
SaveToMemory Method of the ImageDocument Object ......................................................... 344
SmoothImage Method of the ImageDocument Object ........................................................... 345
SmoothTexture Method of the ImageDocument Object ......................................................... 346
SuppressColorObjects Method of the ImageDocument Object................................................ 346
Transform Method of the ImageDocument Object ................................................................ 347
IImageDocumentEvents Interface ....................................................................................... 348
TransformationMade Method of the IImageDocumentEvents Interface .................................. 349
Image Object (IImage Interface) ......................................................................................... 350
EstimateBitmapSize Method of the Image Object .................................................................. 351
GetBitmap Method of the Image Object ............................................................................... 351
WriteToFile Method of the Image Object .............................................................................. 353
ImageProcessingParams Object (IImageProcessingParams Interface) .................................... 354
PrepareImageMode Object (IPrepareImageMode Interface) .................................................. 355
JpegExtendedParams Object (IJpegExtendedParams Interface) ............................................. 359
TiffExtendedParams Object (ITiffExtendedParams Interface) ................................................. 360
PngExtendedParams Object (IPngExtendedParams Interface) ............................................... 361
ImageModification Object (IImageModification Interface) ..................................................... 362
AddClipRegion Method of the ImageModification Object ........................................................ 364
AddInvertRegion Method of the ImageModification Object .................................................... 364