RecAPI: Introducing RecAPI

RecAPI
  • Main Page
  • Related Pages
  • Topics
  • Namespaces
  • Classes
Introducing RecAPI

RecAPI is the core component of OmniPage Capture SDK 2025.1. For details on other API modules and CSDK in general, refer to the following documentation page: https://docshield.tungstenautomation.com/Portal/Products/en_US/OmniPageCaptureSDK/2025.1.0-m7NwYtqyAo/OmniPageCaptureSDK.htm

Throughout the RecAPI documentation we frequently refer to CSDK as Engine meaning all the modules of RecAPI.

The full functionality of the OmniPage Capture SDK is available only in Windows 64-bit operating systems. On other platforms (Windows 32-bit, Linux, Embedded Linux, Android, MacOS) there are different limitations. Documentation of some features list the supported platforms. If the description of a feature does not give such a list, the feature is supported on all platforms. Non-specified Windows means both 32 and 64-bit. Linux means desktop Linux on x64 processors. For MacOS OmniPage Capture SDK contains Universal binaries, which means an x86_64 version for Intel-based Macs and an arm64 version for Apple Silicons. There are some features not supporting arm64, they are said to support MacOS x64 only. For more information see the page Platforms.

RecAPI is a traditional, standard native "C" API separated into two layers: KernelAPI and RecAPIPlus. This simplifies the architecture and also makes the toolkit's offering more flexible: higher speed processing to simple text output or more thorough processing with formatted output. RecAPI also provides a base for RecAPI P/Invoke assembly for .NET managed applications.

A higher layer set of services is provided by IPRO and RecIPRO - with an updated object model. IPRO serves as the base for a range of visual components. To access IPRO and Visual Components documentation, use their own Help systems.

On Windows, RecAPI supports the macro _UNICODE. Thus depending on this macro User can use the RecAPI as an ANSI (current code page) or a Unicode API. On Linux and MacOS, RecAPI has an UTF-8 API.

Here are the main RecAPI components:

  • KernelAPI - This is a page-oriented interface providing plain text output (DirectTXT) with high throughput. It has three page parsing choices: Legacy, Fast and Standard. The latter is the default and gives the most thorough and accurate results.
    • KernelAPIS - This is a wrapper for KernelAPI to provide it with dynamic linking, so the application and the CSDK engine can be separated, to provide more robust functioning.
  • RecAPIPlus - This is a document-oriented extension to KernelAPI that provides a full range of formatted outputs. It includes document-level layout consolidation and has the same page parsing choices as KernelAPI. It allows multi-page high-volume processing to be done efficiently, particular on multi-core systems. It offers composite one-step functions to perform a succession of tasks from just one command.
    • RecAPIPlusS - This is a wrapper for RecAPIPlus to provide it with dynamic linking, so the application and the CSDK engine can be separated.
  • RecAPI .NET support - This is a P/Invoke .NET Assembly to bridge between native and managed applications. It allows the functionality of KernelAPI and RecAPIPlus to be presented through a unified interface.

The KernelAPI part of RecAPI is useful when processing speed is a critical factor and/or there is no need for layout retention. This is the basic API with page-level functions. Therefore, this is very similar to APIs of earlier CSDK versions. We recommend that you use it for applications that do not require total format retention and rich output formats. KernelAPI generates its simple outputs directly from HPAGE. Here you can choose TXT, CSV, two different XML types, or PDF (image on text). Since page formatting is not present here, page-oriented processing on the KernelAPI level will be faster.

The RecAPIPlus part of RecAPI contains a user interface based on a documentoriented approach. You can implement functionality similar to that of OmniPage 2025 via just a handful of functions. When exporting multi-page documents you can use a series of output converters to provide layout retention quality equal to that in OmniPage 2025. Use the RecProcessPagesEx function to process many multi-page image files in one step. In this case, CSDK runs processing on several image preprocessing and OCR threads (multi-threading is supported on: Windows, Linux), enabling you to make the most of HyperThread and MultiCore processors and multi-processor computers. Getting high quality page layout retention and document level formatting adds somewhat to total processing time.

In both cases you can choose between three page parsing algorithms: Fast, Legacy or Standard. The latter is default and requires more time but delivers the best possible result, improving both recognition accuracy and format retention. Since the Standard page parsing package occupies some 20 MB, the Distribution Wizard offers it as a separate component.

Detailed descriptions

Index
OCR Engines
Platforms
Tutorial


RecAPI: Index

  • Topics
  • Namespaces
  • Classes
  • Introducing RecAPI
Index

Numbers A B C D E F G H I J K L M N O P Q R S T U V W X Z

Numbers

24/7 architecture
3D deskew
3D deskew for digital camera images - Sample 41
Top of page

A

Accented characters

Characters, languages, modules
Non-Asian languages and characters

Accessing checkmark recognition results - Sample 34
Accessing confidence data - Sample 29
Accessing enum setting elements
Accessing form data stored in memory - Sample 12
Accessing table zone data - Sample 49
Accuracy vs. speed for engine combinations
Accuracy vs. speed setting - Sample 27
Accurate trade-off setting

BAR barcode recognition module - 2D barcodes
HNR handprinted numeral recognition module
Speed/Accuracy choices of MOR engine
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module
Performance comparison of Engine combinations

Activating PDF file links
Adaptive Cell Analysis
Adaptive Thresholding - Sample 33
Adding items to user dictionaries - Sample 32
Adding pages to documents - Samples 44-47
ADF for scanning - Sample 21
Adjusting scanner settings - Samples 18 and 20
AES encryption for PDF files
American paper sizes
ANSI code pages
ANSI output converters
API extension for PDF manipulation
Appearance of accented characters
Appending pages to PDF files
Applying filters and FilterPlus characters - Sample 10
Arabic language

Arabic recognition module
Language identifiers

Arabic OCR integration
Asian OCR integration
Asian recognition module
Attributes for zones

ZONE structure
Page-level processing - Zoning

Attributes of images - Sample 2
Audio converters
Auto code page
Automatic Adaptive Thresholding from grayscale images - Sample 15
Automatic language detection
Automatic zoning

Zone Handling Module
Page-level processing - Zoning

Auto-rotation of images - Sample 3
Auto-zoning - Samples 23-25
Top of page

B

Balanced trade-off setting

Speed/Accuracy choices of MOR engine
PLUS2W and PLUS3W omnifont recognition modules
Performance comparison of Engine combinations

Baltic code pages
BAR barcode recognition module

BAR barcode recognition module
BAR Recognition Engine Module
Tips for easier use of BAR module

Barcode recognition - Sample 35
Binary images
Binary output from barcodes

BAR barcode recognition module

Bit depth of images
Book scanning
BW scanning - Samples 18 and 19
Top of page

C

Camera image preprocessing - Sample 41
Catalan dictionary support

DOT 9-pin draft dot-matrix recognition module
MOR multi-lingual omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

CCJK character sets
Cell information for tables
Changing image file types - Sample 5
Character coding in PDF files
Character positions for numeric handprint recognition
Character properties
Character set definition
Character set filtering - Sample 10
Character sets valid for recognition
Characters enabled for each language
Characters supported for 9-pin dot matrix recognition
Characters, languages, modules
Checking spelling - Sample 26
Checkmark frame grouping
Checkmark recognition

OMR optical mark recognition module
OMR Recognition Engine Module

Checkmark recognition - Sample 34
Chinese language

Asian recognition module
Language identifiers

CMC7 character recognition
Cocoa sample project for MacOS
Code page listing - Sample 28
Code page setting - Samples 13 and 14
Code page specification - Sample 8
Code pages
Code pages for each language
Code Pages for export
Code pages in FRX recognition module
Code pages per character
Codes for languages

Language identifiers
LANGUAGE_INFO

Color image loading and conversion - Sample 2
Color images
Color scanning - Sample 36
Colored lines
Coloring for zones
Compressed image data in HPAGE
Compressing font data in PDF files
Compression in PDF files
Compression level
Compression methods for image files
Compression trade-off
Confidence data

Spell Checking Module
LETTER::err
Tutorial - Page-level processing - Recognition

Confidence data - Sample 29
Confidence data for Asian languages
Confidence level data - Sample 39
Content copying from PDF files

Handling Encrypted PDF Files
Saving new encrypted PDF files

Conversions performed on image load/save
Converter settings in RecAPIPlus
Converting images to B/W - Sample 2
Converting character codes to Unicode - Sample 8
Converting characters to Unicode - Sample 32
Counting pages in documents - Sample 45
CPP wrapper API settings handling - Sample 47
Creating a form template - Sample 12
Creating a user dictionary - Sample 32
Creating a user dictionary - tutorial
Creating multi-page image files - Sample 6
Creating PDF files
Customizing code pages
Cutting two-page scans from books
Cyrillic languages
Czech dictionary support

FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Top of page

D

Danish dictionary support

DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Dash-digit recognition
DataRule handling
DataRule handling - Sample 73
DataStream
Decomposition time
Default formatting levels
Default scanner settings - Sample 19
Default speed-accuracy settings
Defining a reject symbol - Sample 8
Definition of RecAPI components
Deleting pages from documents - Sample 45
Deleting zones - Sample 25
Deskewing images

Image Handling Module
Page-level processing - Preprocessing

Deskewing images - Sample 3 and 4
Despeckling images

Image Handling Module
Page-level processing - Preprocessing

Detecting tables - Sample 49
Dictionary listing - Sample 28
Dictionary support
Digital camera input
Digital camera recognition - Sample 41
Direct TXT Output Converter Module (KernelAPI)
Display of statistics - Sample 11
Displaying images - Sample 7
Displaying progress information

kRecSetCBProgMon
PROGRESSMONITOR

Distortion removal from camera images - Sample 41
Document identifiers in legal documents
Document marking
Document-level character filtering
Document-level processing

Tutorial - Document-level processing
Tutorial - Document-level processing - Document
Tutorial - Document-level processing - Output

Document-level processing - Samples 43-48
Document-level settings handling - Sample 46
DOTNET sample viewer
Dot-digit recognition
Dot-matrix recognition
DOTNET support

RecAPI .NET Support
Overview

Draft dot-matrix recognition
Dropout colors

kRecSetDropoutColorWeights
OMR optical mark recognition module
RER handprint recognition module

Dropout colors - Sample 20
Dropping pleading numbers in legal documents
Dutch dictionary support

DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Top of page

E

E-13B character recognition - Sample 40
East European code pages
Embedded systems
Embedding fonts in PDF files
Encrypted PDF files

Handling Encrypted PDF Files
Saving new encrypted PDF files

Engine combinations - comparative performance
Engine initialization and parameters - Sample 1
Engineering paper sizes
English dictionary support

DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

English texts embedded in Asian languages
Enhancing OCR performance
Enquiring modules, languages, codepages - Sample 28
Enquiring scanner abilities - Sample 16
Enumeration setting formats
Enumeration of code pages and output formats - Sample 8
Envelope sizes (American)
Error Handling Module (KernelAPI)
Error handling - tutorial
Error information acquisition - Sample 2
Esperanto dictionary support

MOR multi-lingual omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules

Essay mode converters
Essay mode converters - Sample 74
European paper sizes
Excluding pleading numbers from searches
Exporting recognition results
Exporting recognition results - Samples 8-10
Extensible Markup Language output
Extensions of output file types

OUTPUTCONVERTERINFOA
OUTPUTCONVERTERINFOW

Top of page

F

Failed module initialization

kRecInit
KRECMODULEINFO

Fast mode recognition - Samples 46 and 47
Fast page parsing

Both in KernelAPI and RecAPIPlus
IMG_DECOMP

Fast trade-off setting

BAR barcode recognition module - 2D barcodes
HNR handprinted numeral recognition module
Speed/Accuracy choices of MOR engine
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module
Performance comparison of Engine combinations

Faxed images

kRecSetFaxCorrection
MOR multi-lingual omnifont recognition module

File types for image files
File types for output

OUTPUTCONVERTERINFOA
OUTPUTCONVERTERINFOW

Fillable PDF forms
Filled-in-error checkmark feature
Filling method support

Arabic recognition module
Asian recognition module
BAR barcode recognition module
DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
HNR handprinted numeral recognition module
MAT matrix matching recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
OMR optical mark recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Filling methods

FILLINGMETHOD
Recognition

Filling methods for each recognition module
Filling methods for zones
Filter support

DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
HNR handprinted numeral recognition module
MAT matrix matching recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Filtering character sets - Sample 10
Filtering for numbers-only recognition - Sample 30
Filtering the character set
Filtering zone contents

CHR_FILTER
ZONE

Financial dictionaries
Finding text
Finnish dictionary support

DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Flowing Page
FM-RM pairing

Filling method - Recognition module combinations
ZONE
Zone Handling Module

Font information
Fonts for PDF files under Linux
Forcing image inversion, rotation and deskewing - Sample 3
Form Data Extraction (FDE in RecAPIPlus)
Form handling

Form Recognition Module
Form Data Extraction Module

Form Recognition Module (KernelAPI)
Form processing - Sample 12
Format retention (a.k.a. Layout retention)
Format retention on output - Sample 9
Formatted output
Formatted Text
Formatting levels for each output converter
Forms in PDF format
Frame shapes for checkmarks
Frameworks for MacOS applications
French dictionary support

DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

FRX recognition module
Top of page

G

General Operations Module (KernelAPI)
General Service Functions (RecAPIPlus)
German dictionary support

DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Getting textual and supplementary error information - Sample 2
Global character set filters
Grayscale image input - Sample 15
Grayscale images
Grayscale scanning - Samples 20 and 33
Greek code pages
Greek dictionary support

DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules

Greek language
Grouping OMR zones
Top of page

H

Half-width katakana characters
Handling settings - tutorial

Page-level processing - Tutorial
Document-level processing - Tutorial

Handprint number recognition
Handprint recognition
Handprint recognition - Samples 30 and 31
Handwritten numbers
Headers in legal documents
Hebrew language

Recognition of Hebrew text
Language identifiers

HNR recognition module

HNR handprinted numeral recognition module
HNR Recognition Engine Module

Hong Kong character set
Horizontal CCJK text
HTML file output

List of all the Converter settings of RecAPI
Output Converters and Output Levels
Vertical text support of the converters

Hungarian dictionary support

FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Hyperthreading

Multi-threading in RecAPI
Overview

Top of page

I

Identifiers for languages
Identifying tables in legal documents
Image area saving - Sample 5
Image display - Sample 7
Image file conversions
Image File Format List
Image File Handling Module (KernelAPI)
Image Handling Module (KernelAPI)
Image input without decompression
Image preprocessing - tutorial
Image rotation, manual or automatic - Samples 3 and 4
Image saving - tutorial
Image size and resolution
Image substitutes in PDF files
Image transfer line-by-line - Sample 22
Imaged character shapes
Image-only PDF files
Image-on-text (searchable) PDF files
Individual character validation
Initialization - tutorial

Page-level processing
Document-level processing

Initialization of Engine - Sample 1
Initialization of modules

kRecInit
KRECMODULEINFO

Initializing scanners

Initialization
Page-level processing - Loading from a scanner

Initializing scanners - Sample 16
Input from multiple image files - Sample 13
Input from PDF files
Inquiring number of pages - Sample 6
Inserting zones - Sample 25
Int format for enumeration settings
Introduction to OmniPage Capture SDK 2025.1
Inverse text
Inverting images

Image Handling Module
Page-level processing - Preprocessing

Inverting images - Samples 3 and 4
Irregular text wrapping in PDF files
Irregular zones
ISO paper sizes
ISO-compliant language identifiers
ISO-compliant PDF/A standard
Italian dictionary support

DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Top of page

J

Japanese language

Asian recognition module
Language identifiers

Japanese paper sizes
JBIG2 and JPEG2000 compression in PDF files
JPEG image file formats
Top of page

K

KernelAPI definition

KernelAPI
Overview

KernelAPIS definition

KernelAPIS
Overview

Knowledge base files

DOT 9-pin draft dot-matrix recognition module
HNR handprinted numeral recognition module
MAT matrix matching recognition module
MOR multi-lingual omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Korean language

Asian recognition module
Language identifiers

Top of page

L

Lands where languages are spoken
Language, Character Set and Code Page Handling Module (KernelAPI)
Language detection
Language dictionaries

Language Dictionary List
Spell Checking Module
Tutorial - Page-level processing - Checking

Language environment

Character Set in the Engine
Tutorial - Page-level processing - Recognition

Language environment - Samples 9 and 10
Language identifiers
Language listing - Sample 28
Language locations
Languages

LANGUAGES
LANGUAGE_INFO

Languages and characters
Languages and modules
LanguagesPlus characters - Sample 9
Languages, geography, Code Pages
Layer resolutions in PDF files
Layout decomposition for PDF files
Layout retention

Overview
Layout Retention Output Module

Layout Retention Output (RecAPIPlus)
Left-rotated vertical text support
Legacy page parsing

Both in KernelAPI and RecAPIPlus
IMG_DECOMP

Legal dictionaries
Legal documents
LETTER array available for Asian languages
Letter names
Letter shapes
LETTER structure

LETTER structure
BAR barcode recognition module
Tutorial - Page-level processing - Recognition

LETTER structure usage - Samples 29 34 39
Letters-only recognition
Limitations in barcode reading (BAR module - 1D barcodes)
Limiting the character set
Line structure
Linearized PDF files
Line-by-line image transfer - Sample 22
Links in PDF files
Linux sample project
Linux support
List of all converter settings in RecAPI
Listing modules, languages, codepages - Sample 28
Listing output formats - Sample 43
Loading and recognizing filled forms - Sample 12
Loading images - Sample 3
Loading page images - tutorial
Loading zone templates - Sample 23
Local character set filters
Logical Form Recognition (LFR) - Sample 12
Top of page

M

Macintosh code pages
MacOS sample project
MacOS support
Main dictionaries
Managed environments

RecAPI .NET Support
Overview

Manual preprocessing of images - Sample 4
Manual zoning - Sample 25
Manual zoning

Zone Handling Module
Page-level processing - Zoning

Marking sensitivity for checkmarks
MAT matrix matching recognition module
MAT recognition module - Sample 40
Medical dictionaries
Memory as loading source - tutorial
Memory as recognition result target - Sample 29
Memory as saving target - tutorial
Memory as target for form data - Sample 12
MICR special OCR characters
Microsoft HD Photo support
Microsoft language identifiers
Microsoft Office output

List of all the Converter settings of RecAPI
Output Converters and Output Levels
Vertical text support of the converters

Microsoft Word as export target - Sample 9
MICR-specific characters - Sample 40
Miscellaneous characters

Characters (punctuation/miscellaneous) and modules

Modifying pages in documents - Sample 45
Modifying recognition results in memory - Sample 39
Modifying zones - Sample 25
Modifying zones - tutorial
Module initialization

kRecInit
KRECMODULEINFO

Module listing - Sample 28
Modules - language support

Characters, languages, modules
Languages and modules

Modules - support for punctuation characters
Modules of the Engine - Sample 1
MOR recognition module

MOR multi-lingual omnifont recognition module
MOR Recognition Engine Module

MRC compression in PDF files

PDF Output in KernelAPI
Saving MRC PDF files in KernelAPI

MTX recognition module
Multi-core computer use

In RecAPIPlus

Multi-lingual recognition

DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Multi-lingual recognition - Sample 9
Multi-page image files - Sample 6
Multi-page image files as input - Sample 14
Multi-page processing
Multi-page processing - tutorial
Multiple image files as input - Sample 13
Multi-Raster Content (MRC) for PDF compression
Top of page

N

Names of accented letters
Names of miscellaneous characters
Names of punctuation characters
Native (non-managed) environments

RecAPI .NET Support
Overview

Newer image formats
Non-omnifont recognition engines

OCR engines
BAR barcode recognition module
DOT 9-pin draft dot-matrix recognition module
HNR handprinted numeral recognition module
MAT matrix matching recognition module
OMR optical mark recognition module
RER handprinted recognition module

Non-rotated vertical text output
Non-standard encoding in PDF files
Normal PDF output format
Norwegian dictionary support

DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Number of recognized characters
Numbers-only recognition
Numbers-only recognition - Sample 30
Numeric handprint recognition
Top of page

O

OCR character recognition - Sample 40
OCR Engines
OCR language
OCR on PDF files as backup
OCR performance issues
OCR special filling methods
OCR zones generated from user zones

Zone Handling Module

OCR-A and -B characters
Office 2007 support
Omnifont recognition engines

OCR engines
FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules

OmniPage Capture SDK 2025.1 - introduction
OMR Recognition Engine Module

OMR optical mark recognition module
OMR Recognition Engine Module

One-dimensional barcodes

BAR barcode recognition module
BAR module - 1D barcodes

One Step Functions (RecAPIPlus)
One-step processing
OPD files
Open passwords for PDF files

Handling Encrypted PDF Files
Saving new encrypted PDF files

Optical mark recognition (OMR) - Sample 34
Optimizing OCR from grayscale images - Sample 15
Optical mark recognition

OMR optical mark recognition module
OMR Recognition Engine Module

Optimizing PDF files for fast web view
Orientation of page at saving a PDF
Original orientation retention for PDF files
Outline trees and page thumbnails in PDF files
Output conversion
Output converter information

OUTPUTCONVERTERINFOA
OUTPUTCONVERTERINFOW

Output Converters and Formatting Levels
Output format listing - Sample 43
Output format listing - Sample 28
Output format selection - Sample 8
Output format selection - tutorial
Output from checkmark recognition
Output to PDF
Top of page

P

P/Invoke .NET assembly

Overview
RecAPI .NET Support

Page consolidation
Page image loading - tutorial
Page image saving - tutorial
Page layout analysis - Sample 23
Page parsing algorithms

Both in KernelAPI and RecAPIPlus
IMG_DECOMP
Zone Handling Module

Page parsing for PDF files
Page scanning - tutorial
page-level manipulation of PDF files
Page-level processing
Pages appended to PDF files
Paper sizes for scanning
Password protection for PDF files

Handling Encrypted PDF Files
Saving new encrypted PDF files

PDF creation with image substitutes
PDF edited output format
PDF file creation formatting levels
PDF file fonts under Linux
PDF file output
PDF file vertical text handling
PDF files
PDF manipulation
PDF page orientation
PDF/A compliance
Pending setting
Performance comparison of Engine combinations
Performance issues for OCR
Permissions passwords for PDF files

Handling Encrypted PDF Files
Saving new encrypted PDF files

Permitted zone shapes

Zone Handling Module
ZONE

Plain Text
Plain text output
Pleading numbers
PLUS2W module
PLUS3W module
Polish dictionary support

FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Portuguese dictionary support

DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Preprocessing camera images - Sample 41
Preprocessing images - tutorial
Preprocessing PDF files
Preprocessing time
Prevention auto-rotation of PDF files
Printing PDF files allowed or prohibited

Handling Encrypted PDF Files
Saving new encrypted PDF files

Processing a page - tutorial
Processing with workflows - Sample 48
Professional dictionaries

Vertical Dictionary List
Spell Checking Module
Tutorial - Page-level processing - Checking

Progress indication

kRecSetCBProgMon
Tutorial

Prohibited combinations in barcode reading
Prohibited zone shapes

Zone Handling Module
ZONE

Punctuation characters

Characters (punctuation/miscellaneous) and modules

Top of page

Q

Quality levels for saving to PDF
Quick recognition - Samples 11 and 26
Top of page

R

RecAPI .NET support

RecAPI .NET Support
Overview

RecAPIPlus

RecAPIPlus
Tutorial - Document-level processing

RecAPIPlus - full list of settings
RecAPIPlus definition

RecAPIPlus
Overview

RecAPIPlus usage - Samples 43 and 44
RecAPIPlusS definition

Overview
RecAPIPlusS

Recognition Data Handling Module (KernelAPI)
Recognition engines
Recognition export - Samples 8-10
Recognition Module (KernelAPI)
Recognition module associated with zone
Recognition modules

OCR Engines
Recognition Module
RECOGNITIONMODULE
Tutorial

Recognition of Arabic language
Recognition of Asian languages
Recognition of barcodes
Recognition of checkmarks

OMR optical mark recognition module
OMR Recognition Engine Module

Recognition of handprint
Recognition of handprinted numbers only
Recognition of Hebrew language

Recognition of Hebrew text
Language identifiers

Recognition of OCR special characters
Recognition of Thai language

Language identifiers

Recognition of Vietnamese language
Recognition statistics
Recognition with dictionary support

Spell Checking Module
Language Dictionary List

Recognizing barcodes - Sample 35
Recognizing checkmarks - Sample 34
Recognizing filled forms - Sample 12
Recognizing handprint - Samples 30 and 31
Recognizing PDF files
Recognizing tables - Sample 49
RecPDF
Rectangular zones
Redaction

Text Marking and Redaction Module
FoundText

Reject characters

UNICODE_REJECTED
STATISTIC::iChrRejected

Rejection symbol definition - Sample 8
Removing distortion from camera images - Sample 41
Removing header lines for legal documents
RER handprint recognition module
Resident status of recognition modules - Sample 1
Resolution
Resolution enhancement

Image Handling Module
Page-level processing - Preprocessing

Resolution Enhancement - Sample 2
Resolution for scanning - Sample 20
Resolution in PDF files
Retaining original orientation in PDF files
Retaining pleading numbers in legal documents
Retaining quality in PDF file creation
Retrieving zone properties - Sample 24
Right-rotated vertical text support
RM-FM pairing

Filling method - Recognition module combinations
Tutorial - Page-level processing - Recognition

Rotating images

Image Handling Module
Tutorial - Page-level processing - Preprocessing

Rotating images - Samples 3 and 4
Rotations of English characters in Arabic texts
Running workflows
Russian dictionary support

FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules

Top of page

S

Sample viewer application

Summary of the RecAPI Samples for Windows
On the sample project for Linux
On the sample project for MacOS

Samples for Linux
Samples for MacOS
Samples for Windows
Saving and embedding a form template - Sample 12
Saving documents
Saving form data to text files - Sample 12
Saving image areas - Sample 5
Saving images - tutorial
Saving images to PNG format - Sample 2
Saving pre-processed images - Sample 3
Saving recognition results from memory - Sample 29
Saving to a settings file - Sample 10
Saving zone templates - Sample 23
Scanner capabilities - Sample 16
Scanner Wizard

Initialization
Page-level processing - Loading from a scanner

Scanner setting synchronization
Scanning - paper sizes
Scanning books
Scanning in BW - Samples 18 and 19
Scanning in color - Sample 36
Scanning in grayscale - Sample 20
Scanning Module (KernelAPI)
Scanning pages - tutorial
Scanning time
Scanning with Adaptive Thresholding - Sample 33
Scanning with ADF - Sample 21
Searchable (image-on-text) PDF files
Searching text
Security settings in PDF files
Sensitivity for checkmark recognition
Setting handling in CSDK

Settings Manager Module
Page-level processing - Tutorial
Document-level processing - Tutorial

Setting synchronization in scanning system
Settings collections - Sample 42
Settings files - Sample 10
Settings handling - Samples 46 and 47
Settings Manager Module (KernelAPI)
Settings Manager Module - settings list

List of all the RecAPI settings
List of all the Converter settings of RecAPI

Shapes for checkmark frames
Simple Multipage Document handling (RecAPIPlus)
Single language detection
Single-file saving of recognition results
Size and location of characters
Size of images
Sizes of paper for scanning
Slovenian dictionary support

MOR multi-lingual omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules

Smaller file size during PDF creation
Space character information

LSPC
LETTER::spcInfo

Spanish dictionary support

DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Specifying code pages - Sample 8
Specifying the Language environment - Samples 9 and 10
Speed vs. accuracy for engine combinations
Speed vs. accuracy setting - Sample 27
Speedy processing
Spell checking - Sample 26
Spell checking

Spell Checking Module
Tutorial - Page-level processing - Checking

Spell Checking Module (KernelAPI)

Spell Checking Module
Tutorial - Page-level processing - Checking

Standard barcode recognition

BAR barcode recognition module
Recognition of 1D barcodes with the BAR module
Recognition of 2D barcodes

Standard page parsing

Both in KernelAPI and RecAPIPlus
IMG_DECOMP

Standard paper sizes
Standardizing identifier tables in legal documents
Statistics

STATISTIC
Tutorial - Page-level processing - Recognition

Statistics display - Sample 11
String format for enumeration settings
Structure of lines
Summary of RecAPI Samples for Windows
Support for .NET

RecAPI .NET Support
Overview

Supported languages per module
Suspect level data - Sample 39
Suspicious word marking
Swedish dictionary support

DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Synchronizing scanner settings
Top of page

T

Table handling

Table Recognition Module
Page-level processing

Table Recognition Module (KernelAPI)
Table structure information - Sample 49
Tables as identifiers in legal documents
Tagged PDF files
Template zoning - Sample 23
Template zoning - tutorial
Template zoning for barcodes - Sample 35
Termination of the Engine - Sample 1
Text attributes in PDF files
Text extraction from PDF files
Text marking
Text Marking and Redaction (RecAPIPlus)
Text wrapping in PDF files
Thai language
Thai recognition
Threading in CSDK 2025.1

Multi-threading in RecAPI
Page-level processing
Document-level processing

Three-way voting
Thumbnails in PDF files
TIFF image file formats
Time information
Timeout

General Operations Module
Tutorial - Page-level processing - Basics
Timeout for engines - Sample 1

Trade-off setting - Sample 27
Trade-off settings

RMTRADEOFF
Performance comparison of Engine combinations
Tutorial - Page-level processing - Recognition

Trade-off support

BAR barcode recognition module - 2D barcodes
HNR handprinted numeral recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules
RER handprinted recognition module

Training support

DOT 9-pin draft dot-matrix recognition module
FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules

Transferring images line-by-line - Sample 22
True Page
Turkish dictionary support

FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules

Tutorials
Two-dimensional barcodes

BAR barcode recognition module
BAR module - 2D barcodes

Two-page scanning
Two-way voting
Types of barcodes - Sample 35
Top of page

U

Uncertain character marking - Sample 39
Unicode as output character set - Sample 8
Unicode character coding

Non-Asian languages and characters
Characters, languages, modules
Characters (punctuation/miscellaneous) and modules
LETTER::code
Tutorial - Page-level processing - Output

Unicode code pages
Unicode output

List of all the Converter settings of RecAPI
Output Converters and Output Levels
Vertical text support of the converters

Unicode output converters
Unicode output from barcodes

BAR barcode recognition module

Unicode usage - Samples 32 and 40
Universality of PDF files (PDF/A)
Updating zones - Sample 25
Uppercase-only recognition
Uppercase-only recognition - Sample 31
User dictionaries

Spell Checking Module
Tutorial - Page-level processing - Checking

User dictionary usage - Samples 32 and 37
User zones and OCR zones

Zone Handling Module

Using settings collections - Sample 42
Top of page

V

Validating characters individually
Validating individual characters for recognition - Sample 9
Version and Serial numbers - Sample 1
Version numbers of modules
Vertical CCJK text
Vertical dictionaries

Vertical Dictionary List
Spell Checking Module
Tutorial - Page-level processing - Checking

Vertical text support
Vertical text support in output converters
Vietnamese language
Visibility of checkmark frames
Top of page

W

Web viewing of PDF files
Windows code pages
Word accuracies for engine combinations
WordPerfect file output
Workflow-based processing - Sample 48
Workflows
Top of page

X

XML file output

List of all the Converter settings of RecAPI
Output Converters and Output Levels
Vertical text support of the converters

XML output format
XPS file output

List of all the Converter settings of RecAPI
Output Converters and Output Levels
Vertical text support of the converters

XPS file support
Top of page

Z

Zone Handling Module (KernelAPI)
Zone handling - Samples 23-25
Zone property display - Sample 24
Zone template for barcodes - Sample 35
Zone template saving and loading - Sample 23
Zone-level character filtering
Zones

Zone Handling Module
ZONE

Zoning pages

Zone Handling Module
Page-level processing - Zoning

Top of page


RecAPI: OCR Engines

  • Introducing RecAPI
OCR Engines

Introduction

OmniPage Capture SDK has multiple OCR engines, which can be applied on a per-zone basis. This allows a wide range of different types of textual and non-textual data to be recognized, even if they all appear on the same page. For each zone, the application can assign any module available in the configuration, or the choice of module can be left to the Engine.

Using the recognition services of any of these modules for development purposes requires license activation. The different engines require individual licenses, but of course these licenses can be combined and can be made usable with one activation. For more information see the licensing topics of the General Information help system.

Omnifont recognition modules

FRX multi-lingual omnifont recognition module
MOR multi-lingual omnifont recognition module
MTX omnifont recognition module
PLUS2W and PLUS3W omnifont recognition modules

Other recognition modules

BAR barcode recognition module
DOT 9-pin draft dot-matrix recognition module
HNR handprinted numeral recognition module
MAT matrix matching recognition module
OMR optical mark recognition module
RER handprint recognition module
Asian recognition module
Arabic recognition module

NOTE: the recognition modules MTX, DOT, HNR, MAT are supported on: Windows, RER is supported on: Windows, Linux and MacOS x64.

Filling method - Recognition module combinations

When the value RM_AUTO is set, either by default or explicitly, the Engine takes care of recognition module selection depending on the filling method. When setting specific values for filling methods and recognition modules, it is the programmer’s responsibility to specify a valid recognition module-filling method pair. Any incorrectly set zones will have no recognition results. The following table shows which modules are considered by the automatic recognition module selection, called up by the RM_AUTO value. The order of the recognition modules in the second column shows the priority order for the automatic recognition module selection.

Filling method | Permissible Recognition modules
FM_OMNIFONT | RM_OMNIFONT_PLUS3W, RM_OMNIFONT_PLUS2W, RM_OMNIFONT_MOR, RM_OMNIFONT_FRX, RM_OMNIFONT_MTX
FM_DRAFTDOT9 | RM_OMNIFONT_PLUS3W, RM_OMNIFONT_PLUS2W, RM_DOT, RM_OMNIFONT_MTX
FM_BARCODE | RM_BAR
FM_OMR | RM_OMR
FM_HANDPRINT | RM_RER, RM_HNR
FM_DRAFTDOT24 | RM_OMNIFONT_PLUS3W, RM_OMNIFONT_PLUS2W, RM_OMNIFONT_MOR, RM_OMNIFONT_FRX, RM_OMNIFONT_MTX
FM_OCRA | RM_OMNIFONT_PLUS3W, RM_OMNIFONT_PLUS2W, RM_OMNIFONT_MOR, RM_OMNIFONT_FRX, RM_OMNIFONT_MTX
FM_OCRB | RM_OMNIFONT_PLUS3W, RM_OMNIFONT_PLUS2W, RM_OMNIFONT_MOR, RM_OMNIFONT_FRX, RM_OMNIFONT_MTX
FM_MICR | RM_MAT, RM_RER
FM_BARCODE2D | RM_BAR
FM_DOTDIGIT | RM_MAT
FM_DASHDIGIT | RM_MAT
FM_CMC7 | RM_MAT, RM_RER
FM_NO_OCR | -
Note
The FM_AUTO_HAND filling method is special: it can work together with RM_AUTO only. The zones having this filling method will be checked and the real filling method (either FM_OMNIFONT or FM_HANDPRINT) detected. The recognition module will be chosen dependig on the detected filling method.
Some important details about filling method detection can be found in the section Detection of filling method of zones.

Recognition modules and setting of their performance

Character recognition is a rather complex process involving many different modules, like Pre-processing, Zoning and Recognition. Most of these modules can work in several ways using different algorithms for performing their tasks. The different algorithms may affect the performance of the whole OCR process. OmniPage CSDK provides several settings for selecting the algorithms of each part, so quite fine balancing can be achieved. However, the huge number of combinations require huge amount of testing for finding the best one.

There is an accuracy/speed trade-off setting specified by kRecSetRMTradeoff, having 3 different values: TO_ACCURATE, TO_BALANCED and TO_FAST. Five recognition modules can interpret these. Precise information appears in the sub-heading for each module. Other modules (Pre-processing and Zoning) can also be affected by this setting; see Kernel.OcrMgr.TradeOff.Preprocess and DCM_AUTO. Theoretically you can use this setting to specify 3 different Speed/Acccuracy prcessing modes, but this setting has a serious issue: it does change the functioning of a given recognition module, but you still have to select this recognition module (like RM_OMNIFONT_FRX, RM_OMNIFONT_PLUS3W, RM_ASIAN, etc.). The problem is that recognition modules are language dependent, you can not use the same module both for Western text and Asian. Another problem is that a single recognition module does not give you the broadest speed/accuracy range. You might need different modules for the Fast and Accurate workflows: for example for the fastest Western processing you could use the RM_OMNIFONT_FRX module, while for the most accurate one you should use RM_OMNIFONT_PLUS3W.

CSDK provides three settings (Kernel.OcrMgr.PreferAccurateEngine, Kernel.OcrMgr.PreferFastEngine and Kernel.OcrMgr.EmbeddedEngine) for selecting predefined combinations of the algorithms for all the modules. The most accurate algorithms are used when only PreferAccurateEngine is true, while the fastest algorithms are chosen when both EmbeddedEngine and PreferFastEngine are true. These settings have effect on the different parts of the workflow only when the given parts are working in auto mode; thus fine-tuning the functioning of those modules is still possible.

The following sample code is our suggestion for a 3-mode performance handling:

// OmniPage has 3 large modules that have different "tradeoff" setting possibilities: Pre-processing, Zoning and Recognition.
// If \c EmbeddedEngine is true, all three modules could be affected by the below code, while on desktop/server systems the
// "Prefer..." settings change the Recognition module only.
// Generally, every other settings (like default recognition module, default filling method, etc.) should be left at their
// default value. The language or languages must be specified of course.
if (... Prefer speed) {
kRecSetIntSetting(sid, "Kernel.OcrMgr.PreferFastEngine", TRUE); // a fast RM_OMNIFONT_PLUS2W engine combination is used
kRecSetIntSetting(sid, "Kernel.OcrMgr.PreferAccurateEngine", FALSE);
} else if (... Balanced) {
kRecSetIntSetting(sid, "Kernel.OcrMgr.PreferFastEngine", FALSE);
kRecSetIntSetting(sid, "Kernel.OcrMgr.PreferAccurateEngine", FALSE); // an accurate RM_OMNIFONT_PLUS2W engine combination is used
} else { // Most accurate
kRecSetIntSetting(sid, "Kernel.OcrMgr.PreferFastEngine", FALSE);
kRecSetIntSetting(sid, "Kernel.OcrMgr.PreferAccurateEngine", TRUE); // RM_OMNIFONT_PLUS3W is used
}
kRecSetIntSetting
RECERR RECAPIKRN kRecSetIntSetting(int sid, LPCTSTR setting, int new_value)
Setting the value of an STS_INT or STS_ENUM or STS_BOOL setting.

Differences on Embedded Systems

The default value of the below performance settings depends on the OmniPage CSDK platform:

 | Embedded Linux, Android | Windows, Linux, MacOS
Kernel.OcrMgr.EmbeddedEngine | TRUE | FALSE
Kernel.OcrMgr.PreferFastEngine | TRUE | FALSE
Kernel.OcrMgr.PreferAccurateEngine | FALSE | TRUE

If you are creating an application for your embedded system with a relatively slow CPU, we suggest to change the Kernel.OcrMgr.EmbeddedEngine setting to TRUE to compensate the performance difference between the CPUs. In this case the PreferFastEngine's TRUE value has an effect on several modules:

  • Image Pre-processing:
    [only if Kernel.OcrMgr.TradeOff.PreProc is default (-1)]
    • Resolution Enhancement: RE_LEGACY instead of RE_STANDARD
      [only if Kernel.Img.ResolutionEnhancement is default (RE_AUTO)]
    • Binarization: faster adaptive algorithm is used.
    • Deskew:
      • Performed on the BW image, not the original
      • Color/Gray image deskewed without interpolation
      • Minimal slope is a bit larger
    • Despeckle:
      • A faster algorithm is used
      • Halftone despeckle detection is not done
        [only if Kernel.Img.Despeckle.Halftone is default (-1)]
  • Zoning:
    • DCM_LEGACY is used instead of DCM_STANDARD
      [only if Kernel.Decomp.Method is default (DCM_AUTO)]
  • Recognition:
    • non-Asian languages: RM_OMNIFONT_FRX is used instead of RM_OMNIFONT_PLUS2W
      [only if Kernel.OcrMgr.DefaultRecognitionModule is default (RM_AUTO)]
  • Post-processing:
    [only if Kernel.OcrMgr.DisableFullPostProc is default (-1))
    • Background and Foreground color detection is not done
    • Rule lines and frames are not detected
    • Bullet recognition is limited
    • Font attribute detection is limited
    • DropCap and Superscript/Subscript attributes are not detected
    • Paragraphs are not marked with R_ENDOFPARA
    • Language consolidation is not done (e.g. hyphenated words may not be marked as dictionary words)

If you want more accurate recognition you may disable the Kernel.OcrMgr.PreferFastEngine setting by changing it to FALSE, or you can fine tune processing by choosing individual module specific algorithms, e.g. RM_OMNIFONT_PLUS3W instead of RM_AUTO. See the [only if ... is default] comments above.

Recognition modules and the checking module

The checking module has two basic services. It can flag unacceptable recognition results without changing them or it can be permitted to modify recognition results using checking module feedback. The available acceptance rules can come from the following:

  • Language and/or Vertical dictionaries,
  • User dictionaries containing precise entries.

These two sources may be combined freely. The checking module and each of its two parts can be enabled or disabled on a per-zone basis. The integrator should try to match the particular parts of the checking module to the contents and recognition modules of individual zones, e.g. allowing checking changes with a language dictionary enabled will be either pointless or even harmful for the modules RM_BAR, RM_OMR and RM_HNR, since it could change their numerical solutions to letters.

Recognition modules and the widest available character set

The correct assignment of a recognition module and a filling method to a zone should mean that the recognition module is able to satisfactorily process the contents of that zone. But it does not guarantee that the recognition module will be able to process every possible character. Most recognition modules recognize only a subset of the characters. Even if we restrict the Character Set to a limited Language Environment e.g. selecting the German language, the recognition module may not be able to process all the enabled characters. E.g. RM_HNR is able to process hand printed numerals but does not recognize letters. Automatic recognition module selection takes Character Set support of modules into consideration. Selecting a recognition module directly, it is the programmer’s responsibility to select a recognition module capable of supporting the widest character set enabled in the zone. Otherwise this zone may have an incomplete recognition result. The precise character and language support for each module is given in the appropriate recognition module specifications.

Recognition modules and filters

Narrowing the Character Set has two effects:

  • it influences the automatic recognition module selection
  • it may increase accuracy.

The filtering system allows the Language environment to be narrowed, by enabling only certain character classes, and also by enabling individual characters. A filter is built up from filter elements, as detailed under CHR_FILTER.

Each filter element name tells which character class is enabled, e.g. FILTER_ALL means no filtering. Not all recognition modules interpret all filter elements. Precise information appears in the sub-heading for each module.

Applying a filter may not always enable the same number of characters. E.g. FILTER_MISCELLANEOUS can enable only those miscellaneous characters supported by the recognition module assigned to the zone.

Using training data

Training of recognition modules is supported on: Windows, Linux.

The text recognition modules are trainable, allowing the application to achieve greater accuracy, particularly on stylized fonts, and whenever certain characters are being repeatedly mis-recognized in the same way. Training files can be created as a result of a training session performed in a Capture SDK based application, which incorporates the training feature of the OmniPage application or the TEC Text Editor Control of the CSDK. The created training file can be set calling kRecSetTrainingFileName.

Performance data (engine comparison test)

A simple comparison diagram can be seen here. Any other accuracy and time information of the different engine and trade-off configurations can be accessible through the Technical Support. For more details about our Technical Support please see the General Information help system.


RecAPI: FRX multi-lingual omnifont recognition module

  • Introducing RecAPI
  • OCR Engines
FRX multi-lingual omnifont recognition module
Module name: | FRX
Module identifier: | RM_OMNIFONT_FRX
Filling methods supported: | FM_OMNIFONT
Filters supported: | all filter elements
Trade-off supported: | none
Knowledge base files: | none
Training file supported: | yes (supported on: Windows, Linux)

The PLUS2W and PLUS3W recognition modules require the presence of this module. This module is supplied in the Western OCR Kit. See the topic on Licensing in the General Information help system.

Its associated files are:

baltic.shp | Frx shape pack (code page) file.
cyrillic.shp | Frx shape pack (code page) file.
greek.shp | Frx shape pack (code page) file.
latin1.shp | Frx shape pack (code page) file.
latin2.shp | Frx shape pack (code page) file.
turkish.shp | Frx shape pack (code page) file.
charsettable.chr |
asciieng.lng | Frx language dictionary. Used in case of multi-language selection.
czech.lng | Frx language dictionary data file.
danish.lng | Frx language dictionary data file.
dutch.lng | Frx language dictionary data file.
english.lng | Frx language dictionary data file.
finnish.lng | Frx language dictionary data file.
french.lng | Frx language dictionary data file.
german.lng | Frx language dictionary data file.
greek.lng | Frx language dictionary data file.
hungar.lng | Frx language dictionary data file.
italian.lng | Frx language dictionary data file.
norsk.lng | Frx language dictionary data file.
polish.lng | Frx language dictionary data file.
port.lng | Frx language dictionary data file.
russian.lng | Frx language dictionary data file.
spanish.lng | Frx language dictionary data file.
swedish.lng | Frx language dictionary data file.
turkish.lng | Frx language dictionary data file.

Application areas

This module recognizes machine printed text; i.e. from printed publications, laser or ink-jet printers and electric typewriters. Output from mechanical typewriters in good condition may also be acceptable. It should also be used for letter or near letter quality (NLQ, LQ) output from dot-matrix printers.

Range of characters

This module supports the recognition of Latin, Greek and Cyrillic alphabets with enough accented letters to recognize the 54 languages (Languages and modules).

Multi-lingual language support

The language support of this module is based on the module's internal code pages, which contain characters from a related group of languages. The internal code pages of this module are American/European (Latin 1, 1252), Baltic (1257), Central-European (Latin 2, 1250), Cyrillic (1251), Greek (1253) and Turkish (1254).

The module supports multi-language selection for recognition, though it may not recognize languages from different language groups properly. It supports only language combinations within the same Code Page. For example, it properly processes the English, German and Italian language combination, since all these languages belong to the Latin 1 (1252) code page. However, when specifying e.g. both the French and Czech languages, RM_OMNIFONT_FRX may fail to properly recognize some accented characters in the Czech alphabet, since these languages are not in the same code page. The following table contains the languages by code pages supported by FRX.

Latin 2 (1250) | Polish, Czech, Hungarian, Romanian, Albanian, Croatian, Wend (Sorbian), Slovak, Slovenian
Cyrillic (1251) | Russian, Ukrainian, Byelorussian, Bulgarian, Macedonian, Serbian
Latin 1 (1252) | English, German, French, Spanish, Italian, Dutch, Swedish, Norwegian, Finnish, Danish, Portuguese, Portuguese (Brasilian), Catalan, Afrikaans, Aymara, Basque, Breton, Faroese, Friulian, Gaelic, Galician, Eskimo, Icelandic, Indonesian, Latin, Malaysian, Pidgin English, Swahili, Tahitian, Welsh, Frisian, Zulu
Greek (1253) | Greek
Turkish (1254) | Turkish, Kurdish (written in Latin alphabet)
Baltic (1257) | Estonian, Hawaiian, Latvian, Lithuanian

Character attributes

The omnifont recognition module can detect and transmit character attributes: bold, italic or underlined text (or any combination of them). It can also detect and transmit character size, and can classify font types into three broad categories: serif, sans serif and monospaced.

Performance issues

Please consult the topic Performance comparison for information on the balance between speed and accuracy for the most common engine combinations and trade-off settings.


RecAPI: MOR multi-lingual omnifont recognition module

  • Introducing RecAPI
  • OCR Engines
MOR multi-lingual omnifont recognition module
Module name: | MOR
Module identifier: | RM_OMNIFONT_MOR
Filling methods supported: | FM_OMNIFONT, FM_DRAFTDOT24, FM_OCRA, FM_OCRB
Filters supported: | all filter elements
Trade-off supported: | TO_FAST, TO_BALANCED, TO_ACCURATE
Knowledge base files: | RECOGN.BCT and RECOGN24.BCT
Training file supported: | yes

This recognition module is supported on: Windows, Linux and MacOS x64.

On Windows, the PLUS2W and PLUS3W recognition modules also require the presence of this module. This module is supplied in the Western OCR Kit. See the topic on Licensing in the General Information help system.

Application areas

This module recognizes machine printed text; i.e. from printed publications, laser or ink-jet printers and electric typewriters. Output from mechanical typewriters in good condition may also be acceptable. It could also be used for letter or near letter quality (NLQ, LQ) output from dot-matrix printers. For Draft quality 24-pin dot-matrix documents use the FM_DRAFTDOT24 filling method. NLQ or LQ quality output can usually be better recognized without using FM_DRAFTDOT24.

See kRecSetMorFaxed for reading standard mode (about 200 x 100 DPI) faxed documents.

The max. number of zones defined on an image that this module can handle is 500.

Range of characters

This module can recognize about 500 characters, termed Engine’s Total Character Set. It includes the letters of the Latin, Greek and Cyrillic alphabets with enough accented letters to recognize the non-Asian Languages supported by the Engine

The set is classified as follows:

 | Non-accented | Accented
Latin alphabet upper case letters | 26 | 89
Latin alphabet lower case letters | 26 | 91
Digits | 10 |
Punctuation | 29 |
Miscellaneous (maths symbols etc.) | 55 |
Cyrillic upper case letters | 33 | 14
Cyrillic lower case letters | 33 | 14
Greek upper case letters | 24 | 9
Greek lower case letters | 25 | 11
OCR (OCR-A / MICR) characters | 3 |

These are the character categories used by the filter elements. The pre-trained OCR characters are: OCR Chair, OCR Hook, OCR Fork.

Character attributes

The omnifont recognition module can detect and transmit character attributes: bold, italic or underlined text (or any combination of them). It can also detect and transmit character size, and can classify font types into three broad categories: serif, sans serif and monospaced.

Speed/Accuracy choices

The multi-lingual omnifont recognition module basically uses contour analysis, but can supplement this with an innovative form of pattern matching not requiring enormous pre-stored shape libraries.

This module interprets all three page-level recognition trade-off settings: TO_ACCURATE, TO_BALANCED and TO_FAST.

The module is tightly integrated with the checking module, giving a total of five speed/accuracy choices.

  • Level 1: TO_FAST without checking.
    Fastest. The module reads text once and uses feature extraction only. Even this setting can give excellent accuracy on high-quality documents. Recommended also when accuracy is not a big issue (e.g. when OCR is only to allow fuzzy keyword searching in a document retrieval system) or for high-volume work when processing speed is most important.
  • Level 2: TO_FAST with checking.
    The recognition module reads text only once, with feature extraction, but sends words containing suspect or reject characters to a checker, together with its first and second guesses for unsure characters. The checker tries to find solutions based only on those characters. It also tries to repair other typical OCR faults (e.g. di9its embedded in words) and will flag all non-dictionary words it was unable to solve. Recommended e.g. when a Language dictionary is available and the texts are mono-lingual and liable to contain normal language (if not, a User dictionary could be employed).
  • Level 3: TO_BALANCED without checking.
    Two-pass recognition. During the first pass with feature extraction, the program builds up a library of sample characters and ligatured character pairs from the page, whose recognition was very sure. During the second reading pass it stops on all reject and unsure characters, consults its library and uses pattern matching to try and find solutions. That’s why the second pass is not very useful for pages with very little text – the library is too small. Recommended for multi-lingual documents or when a checker is not available.
  • Level 4: TO_BALANCED with checking.
    Two-pass recognition. Reading is a combination of the two processes used in levels 2 and 3. More accurate but processing will take more time.
  • Level 5: TO_ACCURATE with checking compulsory.
    Most accurate but slowest. Designed for use on very degraded mono-lingual documents or when maximum accuracy is very important. It involves two-pass recognition with Adaptive Cell Analysis. This is used to get a bigger library for the pattern matching: uniformly highly degraded documents typically can’t yield enough surely recognized characters to form a useful library. With ACA recognition, characters with somewhat lower certainty are accepted, provided they fall within words accepted by the checking module. This allows the pattern matching to work more successfully.
    Note
    See MOR Recognition Engine Module.


RecAPI: MTX omnifont recognition module

  • Introducing RecAPI
  • OCR Engines
MTX omnifont recognition module
Module name: | MTX
Module identifier: | RM_OMNIFONT_MTX
Filling methods supported: | FM_OMNIFONT, FM_DRAFTDOT9, FM_DRAFTDOT24, FM_OCRA, FM_OCRB
Filters supported: | FILTER_ALL, FILTER_DIGIT and FILTER_ALPHA
Trade-off supported: | TO_FAST, TO_ACCURATE (TO_BALANCED is equal to this)
Knowledge base files: | N / A
Training file supported: | yes

This recognition module is supported on: Windows.

The PLUS2W and PLUS3W recognition modules also require the presence of this module. This module is supplied in the Western OCR Kit. See the topic on Licensing in the General Information help system.

Recognition module language binaries are xi*.bin, as follows:

  • For recognizing an English document, the filenames include the identifier ENG:
    • xiengb.bin
    • xiengc.bin
    • xiengd.bin
    • xienge.bin
    • xiengf.bin (used unaltered for all languages)
    • xiengl.bin (used unaltered for all languages)
    • xiengp.bin
    • xiengs.bin
    • xiengz.bin

The files xiengf.bin and xiengl.bin are required, unaltered, for all languages. All other languages have language-specific equivalents of the remaining seven files. The identifier eng is changed as follows:

  • French: frn
  • Italian: itl
  • German: grm
  • Dutch: dut
  • Spanish: spn
  • Portuguese: prt
  • Swedish: swd
  • Norwegian: nrw
  • Danish: dan
  • Finnish: fin
  • Portuguese (Brazilian): brz

Application areas

This recognition module recognizes machine printed text; i.e. from printed publications, laser or ink-jet printers and electric typewriters. Output from mechanical typewriters in good condition may also be acceptable. It should also be used for Letter or Near Letter Quality output from dot-matrix printers, and can also be used for Draft Quality.

Range of characters

This module supports the characters of the following languages

Language | Language identifier
English | LANG_ENG
French | LANG_FRE
Spanish | LANG_SPA
Italian | LANG_ITA
German | LANG_GER
Norwegian | LANG_NOR
Portuguese | LANG_POR
Danish | LANG_DAN
Dutch | LANG_DUT
Finnish | LANG_FIN
Swedish | LANG_SWE
Brazilian | LANG_BRA

Any of these languages can be combined.

Accuracy issues

This module is influenced by the page-level trade-off setting, but reduces the three settings to two: TO_FAST is respected, while TO_BALANCED and TO_ACCURATE are merged to one value.

Character attributes

The omnifont recognition module can detect and transmit character attributes: bold, italic or underlined text (or any combination of them). It can also detect and transmit character size, and can classify font types into three broad categories: serif, sans serif and monospaced.


RecAPI: PLUS2W and PLUS3W omnifont recognition modules

  • Introducing RecAPI
  • OCR Engines
PLUS2W and PLUS3W omnifont recognition modules
Module name: | PLUS2W and PLUS3W
Module identifier: | RM_OMNIFONT_PLUS2W and RM_OMNIFONT_PLUS3W
Filling methods supported: | FM_OMNIFONT
Filters supported: | FILTER_ALL, FILTER_DIGIT and FILTER_ALPHA
Trade-off supported: | TO_FAST, TO_BALANCED, TO_ACCURATE
Knowledge base files: | RECOGN.BCT, RECOGN24.BCT
Training file supported: | yes (supported on: Windows, Linux)

PLUS2W and PLUS3W engines are voting engines combining the results of other OMNIFONT OCR engines of the CSDK. In different trade-off modes they use different engine combination. These modules are supplied in the estern Kit. See the topic on Licensing in the General Information help system.

PLUS3W module is supported on: Windows, Linux, MacOS. The FAST mode of PLUS2W and PLUS3W modules is supported on: Windows.

Application areas

This recognition module recognizes machine printed text; i.e. from printed publications, laser or ink-jet printers and electric typewriters. Output from mechanical typewriters in good condition may also be acceptable.

Range of characters

This module supports the same set of characters as the RM_OMNIFONT_MOR module.

Accuracy issues

The PLUS2W and PLUS3W modules use voting technology to provide improved recognition results. The PLUS2W and PLUS3W modules use the results from one or more of FRX, MOR and MTX modules according to the trade-off. With either of these two voting modules, the accuracy is considerably better, but the recognition may need significantly more time than any single module.

Please consult the topic Performance comparison for information on the balance between speed and accuracy for the most common engine combinations and trade-off settings.

Suspicious marking

With these modules, the suspicious character and word marking feature is different from that used in MOR, MTX or FRX. These modules do not mark characters as suspicious if all the voting modules provided the same recognition result, even if they were suspiciously recognized in any of them. Consequently, there are likely to be fewer words marked as non-dictionary.

Character attributes

The omnifont recognition module can detect and transmit character attributes: bold, italic or underlined text (or any combination of them). It can also detect and transmit character size, and can classify font types into three broad categories: serif, sans serif and monospaced.


RecAPI: BAR barcode recognition module

  • Introducing RecAPI
  • OCR Engines
BAR barcode recognition module

The module can recognize particular 1D and 2D barcodes.

The module BAR requires the Recognition Add-on. See the topic on Licensing in the General Information help system.

The parts of the BAR barcode recognition module are 1D barcode recognition and 2D barcode recognition. This topic presents only information common to 1D and 2D BAR modules. The following two topics present information unique to each module.

Module name: | BAR
Module identifier: | RM_BAR
Filling methods supported: | FM_BARCODE, FM_BARCODE2D
Filters supported: | ignores all filter settings
Knowledge base files: | none
Training file supported: | no

Output

In LETTER structure output, the character size (width, height), the character position (top, left) and confidence data (err) information for each recognized character present barcode-level information, i.e. these values will be identical for all characters deriving from the barcode.

Coordinates (top, left, width, height) of all characters correspond to those of the barcode that contains them.

Barcode type is stored in the info member of the LETTER structure for each character.

Barcode orientation is stored in the makeup field of the LETTER structure for each character. See R_TEXT_ORIENT_MASK and related makeup bits.

Of course, the general rules are applied also by this module, i.e. the LETTER array contains zero pixel wide end-line spaces (see handling of spaces) and the character codes read from the barcode are converted to Unicode (see Barcode code page handling). EOL control codes (0x0d, 0x0a) are converted to R_ENDOFLINE makeup flags (see end-position letters). Other control codes (0x00 .. 0x1F and 0x7F .. 0x9F) are shifted to another Unicode range as defined by the setting Kernel.OcrMgr.Codes.CtrlOffset. In rare cases, even a 0x20 space code may be shifted! (This shift is necessary when the recognized text is saved in an XML file because control codes, including zero bytes, are not allowed there.)

There is a special format for avoiding conversions: This is the binary output, see below.

The end of the barcode is marked with the flag R_ENDOFPARA on the latest 0-width dummy space of the barcode. This way even multi-line barcodes (mainly 2D barcodes) can be processed: each text line is marked with R_ENDOFLINE, while the latest 0-width space of the barcode is marked with both flags.

If the barcode is empty (it could happen with some 2D barcodes), a single UNICODE_MISSING code (0xfffc) is returned, followed by the dummy space.

Barcode code page handling

One dimensional barcodes return digits or ASCII codes only, but 2D ones support more. They all have direct support for encoding accented characters in the ISO 8859-1 code page covering most Western languages. QR Code supports non-latin scripts like Japanese by design, and in practice all 2D barcodes are used (sometimes unofficially) to encode any Unicode characters.

In its default configuration OmniPage tries to detect the used code page automatically. This detection can sometimes fail, especially if a country specific 8-bit code page is used. The user can force using a specific code page the following way:

  • PDF417 barcode: kRecSetCodePage can be used to specify the code page to use. Alternatively, starting with version 22.1, the Kernel.Ocr.BAR.bar2D.PDF417.CodePage setting is also available.
  • QR Code: kRecSetCodePage does not affect the used code page! Starting with version 22.1, the Kernel.Ocr.BAR.bar2D.QR.CodePage setting is available.
  • Data Matrix: kRecSetCodePage does not affect the used code page! Starting with version 22.1, the Kernel.Ocr.BAR.bar2D.DMATRIX.CodePage setting is available.

The above mentioned 3 CodePage settings work similarly:

  • Their default value is an empty string, meaning that automatic code page detection is to be performed. Note that PDF417 does auto detection only when kRecSetCodePage is not called.
  • If the value is "Auto", automatic code page detection is to be performed even if kRecSetCodePage is used.
  • If the value is "Byte", no code page conversion is to be done. All control codes and spaces are shifted with Kernel.OcrMgr.Codes.CtrlOffset, other byte values are left unchanged.
  • The value can also be any code page name known by CSDK; see Code Pages in the Engine. Either hard-coded or derived code pages can be used. The derived code page can be a user-customized one also!

The different default value handling for PDF417 is to maintain backwards compatibility. In new application we suggest you use kRecSetStringSetting(sid, "Kernel.Ocr.BAR.bar2D.PDF417.CodePage", "Auto") to enable automatic code page detection in all cases.

Binary output

The binary output can be forced globally by changing the setting Kernel.OcrMgr.BarBinary to true, or can be specified zone by zone with the kRecSetZoneBarTypes function. In binary mode the module supposes that the barcode contains binary data and skips the conversion of the result, i.e. it does not convert the codes to Unicode (e.g. a 2-byte long UTF-8 sequence will occupy 2 LETTERs), and control codes are also kept unchanged (e.g. even binary 0 can return in a LETTER). Note that the LETTER array contains a dummy zero pixel wide end-line space even in this case. This output is recommended to be used together with the DTXT output method DTXT_BINARY or the kRecGetOCRZoneText function (which remove these end-line spaces).

Different barcode types in one zone

OPSDK provides a function (kRecCheckBarTypes) to check whether elements of the enabled barcode type set are compatible each other or not. The details about the incompatible barcode types can be found in notes of this function.

Zone-by-zone barcode type enabling

OmniPage SDK 19 introduced the possibility of enabling barcode type set not only globally, but zone by zone. This can be performed by the function kRecSetZoneBarTypes for the specified user zone. The enabled barcode type selection can be retrieved for both user and OCR zones (kRecGetZoneBarTypes, kRecGetOCRZoneBarTypes).

Batch separation support

In document processing workflows special pages can be used for batch separation of different page flows. If the workflow uses barcodes for separation on such a special page, OPSDK provides a faster operation mode of BAR Module. To be enough fast and accurate this mode requires stricter dimension and quality conditions (if the image resolution is 300 DPI, bar height should be between 75 and 600 pixels). This batch separation mode can be switched on using the setting Kernel.OcrMgr.BarFastMode.

Tips for easier use of BAR module

  1. Recognizing 1D and 2D barcode types is allowed in one step in a zone: it is no more needed to use filling method FM_BARCODE and FM_BARCODE2D separately. Use of FM_BARCODE filling method makes possible to search and recognize 1D and 2D barcodes together at the same time in the same zone. See setting Kernel.OcrMgr.BarEnable1D2D.
  2. If you do not know your barcode type, we recommend to use kRecGetAutoBarTypes function. This function gets the largest set of barcode types that can be used simultaneously for an automatic detection.
  3. Full-page barcode zones: If the default recognition module is RM_BAR and there is no user zone and OCR zone at all, the engine puts a full-page barcode zone on the page and searches barcodes within it.
  4. Some non trivial barcode combinations are also possible:
    1. 1D and 2D barcode types can be used together
    2. Some not typical barcode types can be used together with 2D barcodes. E.g. BAR_PATCH barcode can be used together with any 2D barcodes.
    3. BAR_EAN, BAR_UPC_A and BAR_BOOKLAND can be used together. An automatic detection specifies the real type.
    4. BAR_C39 and BAR_C39_EXT can be used together. An automatic detection specifies the real type. (Can be disabled with the setting Kernel.OcrMgr.BarCheckBarTypes.Enable.C39_C39EXT.)
    5. BAR_C39 and BAR_C32 can be used together if the setting Kernel.OcrMgr.BarCheckBarTypes.Enable.C39_C32 is enabled. In that case an automatic detection specifies the real type. Note that some 6-character long C39 barcodes can be misdetected as C32 due to the nature of C32 encoding.
    6. BAR_C128, BAR_UCC128, BAR_EAN14 and BAR_SSCC18 can be used together. An automatic detection specifies the real type.
  5. If the real barcode type is not enabled but one of its family is, the engine can recognize the barcode. In such a case it is more useful to give a result of type within the family than not to give anything, thus the "main" member of the family can be retrieved as recognized type. If this "main" member was not enabled, the return value of the recognition is BAR_FAMILY_FORCED_WARN. For disabling this working mode set the setting Kernel.OcrMgr.BarEnableFamily to FALSE.
    For example:
    1. EAN Family - BAR_EAN ("main" member), BAR_UPC_A, BAR_BOOKLAND:
      If only BAR_UPC_A type is enabled and the real barcode type is BAR_BOOKLAND, the result of the recognition will be a BAR_EAN type barcode (instead of NO_TXT_WARN) with BAR_FAMILY_FORCED_WARN. If BAR_EAN is also enabled the return value will be REC_OK.
      For instance the barcode on the page is "9787442521744" (which is a Bookland), but only BAR_UPC_A is enabled (which always starts with '0'), then the recognition result will be "9787442521744" with type BAR_EAN and with return value BAR_FAMILY_FORCED_WARN.
    2. Code-128 Family - BAR_C128 ("main" member), BAR_UCC128, BAR_SSCC18, BAR_EAN14:
      If the barcode starts with "FNC1" function code, it has special meaning: it indicates that the barcode is a BAR_UCC128 and the following 2, 3 or 4 digits are an application identifier assigned by the Uniform Code Council. The "FNC1" string is not visible in the recognition result, but it is encoded in the barcode.
      For instance this string is written below the barcode: "(8003)09412345123452" and the barcode is encoded as: "FNC1800309412345123452". This indicates that the barcode is a BAR_UCC128 and the OCR result is "800309412345123452". (The '(' and ')' characters are not encoded in the barcode lines). The engine detects the "FNC1" prefix. If neither BAR_UCC128 nor BAR_C128 types are enabled (but any other family member is), the result depends on the setting BarEnableFamily. If it is set to TRUE, the recognition result is "FNC1800309412345123452" with type BAR_C128 and with return value BAR_FAMILY_FORCED_WARN. If it is FALSE, the return value is NO_TXT_WARN and there is no recognition result. If BAR_UCC128 is enabled the engine retrieves "800309412345123452" with the return value REC_OK.
    3. Code-39 Family - BAR_C39 ("main" member), BAR_C39_EXT, BAR_C32: BAR_C39_EXT can contain special characters with special meaning. For instance '+' character followed by a capital letter indicates the lower case pair of that letter if BAR_C39_EXT is enabled. But the '+' character followed by a number is not a valid combination for BAR_C39_EXT, but is valid for BAR_C39. If BAR_C39_EXT is enabled but BAR_C39 is not enabled, the result contains both the '+' and the following character with the type BAR_C39 and with the return value BAR_FAMILY_FORCED_WARN. However if the setting BarEnableFamily is set to FALSE, the return value is NO_TXT_WARN and there is no recognition result for the invalid character combinations.
  6. kRecCheckBarTypes works according to the below table of barcode type combinations. Yellow items depend on different settings, see above.
 | EAN | UPC_A | UPC_E | ITF | C39 | C39_EXT | C128 | CB | POSTNET | A2of5 | UCC128 | 2of5 | C93 | PATCH | PDF417 | PLANET | Code32 | DMATRIX | C39_NSS | QR | MAT25 | CODE11 | ITAPOST25 | MSI | BOOKLAND | ITF14 | EAN14 | SSCC18 | DB_LTD | DB_EXP | 4S_USPS | 4S_AUSPOST
EAN | + | + | + | + | + | + | + | + | - | + | + | + | + | - | + | - | + | + | - | + | - | + | + | - | + | + | + | + | - | - | - | -
UPC_A | + | + | + | + | + | + | + | + | - | + | + | + | + | - | + | - | + | + | - | + | - | + | + | - | + | + | + | + | - | - | - | -
UPC_E | + | + | + | + | + | + | + | + | - | + | + | + | + | - | + | - | + | + | - | + | - | + | + | - | + | + | + | + | - | - | - | -
ITF | + | + | + | + | + | + | + | + | - | - | + | - | + | - | + | - | + | + | - | + | - | + | - | - | + | - | + | + | - | - | - | -
C39 | + | + | + | + | + | + | + | + | - | + | + | + | + | - | + | - | + | + | - | + | - | + | + | - | + | + | + | + | - | - | - | -
C39_EXT | + | + | + | + | + | + | + | + | - | + | + | + | + | - | + | - | + | + | - | + | - | + | + | - | + | + | + | + | - | - | - | -
C128 | + | + | + | + | + | + | + | + | - | + | + | + | + | - | + | - | + | + | - | + | - | + | + | - | + | + | + | + | - | - | - | -
CB | + | + | + | + | + | + | + | + | - | + | + | + | + | - | + | - | + | + | - | + | - | + | + | - | + | + | + | + | - | - | - | -
POSTNET | - | - | - | - | - | - | - | - | + | - | - | - | - | - | + | - | - | + | - | + | - | - | - | - | - | - | - | - | - | - | + | +
A2of5 | + | + | + | - | + | + | + | + | - | + | + | - | + | - | + | - | + | + | - | + | - | + | - | - | + | - | + | + | - | - | - | -
UCC128 | + | + | + | + | + | + | + | + | - | + | + | + | + | - | + | - | + | + | - | + | - | + | + | - | + | + | + | + | - | - | - | -
2of5 | + | + | + | - | + | + | + | + | - | - | + | + | + | - | + | - | + | + | - | + | - | + | - | - | + | - | + | + | - | - | - | -
C93 | + | + | + | + | + | + | + | + | - | + | + | + | + | - | + | - | + | + | - | + | - | + | + | - | + | + | + | + | - | - | - | -
PATCH | - | - | - | - | - | - | - | - | - | - | - | - | - | + | + | - | + | + | - | + | - | - | - | - | - | - | - | - | - | - | - | -
PDF417 | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | - | + | + | - | + | + | + | + | + | + | - | -
PLANET | - | - | - | - | - | - | - | - | - | - | - | - | - | - | + | + | - | + | - | + | - | - | - | - | - | - | - | - | - | - | + | +
Code 32 | + | + | + | + | + | + | + | + | - | + | + | + | + | + | + | - | + | + | - | + | - | + | + | - | + | + | + | + | - | - | - | -
DMATRIX | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | - | + | + | - | + | + | + | + | + | + | - | -
C39_NSS | - | - | - | - | - | - | - | - | - | - | - | - | - | - | + | - | - | + | + | + | - | - | - | - | - | - | - | - | - | - | - | -
QR | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | + | - | + | + | - | + | + | + | + | + | + | - | -
MAT25 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | + | - | - | - | - | - | - | - | - | - | - | -
CODE11 | + | + | + | + | + | + | + | + | - | + | + | + | + | - | + | - | + | + | - | + | - | + | + | - | + | + | + | + | - | - | - | -
ITAPOST25 | + | + | + | - | + | + | + | + | - | - | + | - | + | - | + | - | + | + | - | + | - | + | + | - | + | - | + | + | - | - | - | -
MSI | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | + | - | - | - | - | - | - | - | -
BOOKLAND | + | + | + | + | + | + | + | + | - | + | + | + | + | - | + | - | + | + | - | + | - | + | + | - | + | + | + | + | - | - | - | -
ITF14 | + | + | + | - | + | + | + | + | - | - | + | - | + | - | + | - | + | + | - | + | - | + | - | - | + | + | + | + | - | - | - | -
EAN14 | + | + | + | + | + | + | + | + | - | + | + | + | + | - | + | - | + | + | - | + | - | + | + | - | + | + | + | + | - | - | - | -
SSCC18 | + | + | + | + | + | + | + | + | - | + | + | + | + | - | + | - | + | + | - | + | - | + | + | - | + | + | + | + | - | - | - | -
DATABAR_LTD | - | - | - | - | - | - | - | - | - | - | - | - | - | - | + | - | - | + | - | + | - | - | - | - | - | - | - | - | + | + | - | -
DATABAR_EXP | - | - | - | - | - | - | - | - | - | - | - | - | - | - | + | - | - | + | - | + | - | - | - | - | - | - | - | - | + | + | - | -
4STATE_USPS | - | - | - | - | - | - | - | - | + | - | - | - | - | - | - | + | - | - | - | - | - | - | - | - | - | - | - | - | - | - | + | -
4STATE_AUSPOST | - | - | - | - | - | - | - | - | + | - | - | - | - | - | - | + | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - | +
Note
See BAR Recognition Engine Module.


RecAPI: Recognition of 1D barcodes with the BAR module

  • Introducing RecAPI
  • OCR Engines
  • BAR barcode recognition module
Recognition of 1D barcodes with the BAR module
Filling methods supported: | FM_BARCODE
Filters supported: | ignores all filter settings
Trade-off supported: | none

Application areas

Recognition of one-dimensional barcodes.

Supported basic barcode types

  • BAR_CB Codabar (on by default),
  • BAR_C128 Code 128 (on by default),
  • BAR_C39 Code 39 (on by default),
  • BAR_EAN EAN 8/13 (on by default),
  • BAR_ITF ITF (2 of 5 interleaved) (on by default),
  • BAR_POSTNET Postnet (off by default),
  • BAR_UPC_A, BAR_UPC_E UPC (off by default)
  • BAR_UCC128 UCC Code 128 (off by default),
  • BAR_A2of5 Airline 2 of 5 (off by default),
  • BAR_2of5 Standard 2 of 5 (off by default),
  • BAR_C93 Code 93 (off by default),
  • BAR_C32 Code 32 Italian Pharmacode (off by default),
  • BAR_C39_NSS Code 39 without start-stop characters (off by default),
  • BAR_MAT25 Matrix 2 of 5 (off by default),
  • BAR_CODE11 Code 11 (off by default),
  • BAR_ITAPOST25 Italian Postal 2 of 5 (off by default),
  • BAR_MSI Modified Plessey code (off by default),
  • BAR_BOOKLAND Bookland EAN (off by default),
  • BAR_ITF14 ITF 14 (off by default).

Conditions

If the number of bars in a barcode is less than the value of Kernel.Ocr.BAR.bar1D.MinBarLines, the barcode is omitted.

One zone can include up to 25 barcodes by default, but it can be adjusted using the setting Kernel.Ocr.BAR.bar1D.MaxBars.

The position of the barcode can be in any direction (except the Postnet code, where the maximum allowable skew of the barcode is 10°)

The zone can contain other elements besides the barcode. The program is able to detect the barcode(s) inside a zone. If, however, there are many other objects (text, figures, etc.) in the zone, recognition will be slower.

Barcode checksum handling

Some of the barcode types always include a checksum digit or digits. This checksum is always verified. The barcode is returned only if the checksum is correct. Some of the barcode types may include a checksum digit or digits (BAR_ITF, BAR_C39, BAR_MSI, BAR_2of5, BAR_MAT25). This checksum information is not verified at the default settings. If you know that the barcode to be recognized does contain cheksum you can enable its verification with different settings:

In case of BAR each barcode type has its own checksum verification setting: these are the Kernel.Ocr.BAR.bar1D.*.CDX settings.

When checksum verification is enabled the engine does not return barcodes with wrong checksum.

Deprecated barcode types

Some special barcode types have been removed from the enum BAR_TYPE formerly. They are still supported, but not through individual enum types, but through settings extending the functionality of the main barcode types. See the list below:

  • The BAR_EAN_SUPPL barcode type has been removed. If you want to recognize the supplement part of EAN/UPC barcode type family:
    • Use the setting Kernel.Ocr.BAR.bar1D.EAN.SUPPL together with barcode type BAR_EAN.
    • Use the setting Kernel.Ocr.BAR.bar1D.UPCA.SUPPL together with barcode type BAR_UPC_A.
    • Use the setting Kernel.Ocr.BAR.bar1D.UPCE.SUPPL together with barcode type BAR_UPC_E.
  • The BAR_ITF_CDT barcode type has been removed. If you want to check the optional checksum in your ITF barcode use the setting Kernel.Ocr.BAR.bar1D.ITF.CDX together with barcode type BAR_ITF.
  • The BAR_C39_CDT barcode type has been removed. If you want to check the optional checksum in your C39 barcode use the setting Kernel.Ocr.BAR.bar1D.C39.CDX together with barcode type BAR_C39.
  • The BAR_C39_SST barcode type has been removed. If you want to transmit the '*' start/stop character of C39 barcode use the setting Kernel.Ocr.BAR.bar1D.C39.SST together with barcode type BAR_C39.
  • The BAR_C39_FA barcode type has been removed. If you want to convert the result string to full ASCII format use the setting Kernel.Ocr.BAR.bar1D.C39.FA together with barcode type BAR_C39.
  • The BAR_C39_FA barcode type has been renamed to BAR_C39_EXT. If you want to convert the result string to full ASCII format use this barcode type.
  • The Kernel.Ocr.BAR.bar1D.C39.FA setting is still supported but do not use it in new applications. Use the BAR_C39_EXT barcode type directly instead.
  • The BAR_C128_CDT barcode type has been removed. If you want to transmit the check digit of C128 barcode use the setting Kernel.Ocr.BAR.bar1D.C128.CDT together with barcode type BAR_C128.

There are some removed old barcode types that are not supported at all:

  • BAR_4STATE
  • BAR_4STATE_DK1
  • BAR_AZTEC


RecAPI: Recognition of 2D barcodes

  • Introducing RecAPI
  • OCR Engines
  • BAR barcode recognition module
Recognition of 2D barcodes
Filling methods supported: | FM_BARCODE2D
Filters supported: | ignores all filter settings
Trade-off supported: | TO_FAST, TO_ACCURATE

Application areas

Recognition of two-dimensional barcodes.

The supported barcode types are PDF417, QR and Datamatrix.

Conditions

The single zone can contain more than one barcode.

The barcode can be in any direction and can be surrounded by text. The module can read truncated PDF417 barcodes as well.

Balancing

The true value of the setting Kernel.Ocr.BAR.bar2D.OneBarInZones means that there is only one 2D barcode in the zone. Its default value is false.


RecAPI: DOT 9-pin draft dot-matrix recognition module

  • Introducing RecAPI
  • OCR Engines
DOT 9-pin draft dot-matrix recognition module
Module name: | DOT
Module identifier: | RM_DOT
Filling methods supported: | FM_DRAFTDOT9
Filters supported: | all filter elements
Trade-off supported: | none
Knowledge base files: | TUDAS.FA
Training file supported: | yes

This module is supported on: Windows.

This module is supplied in the Western OCR Kit. See the topic on Licensing in the General Information help system.

Application areas

This module is designed for ONLY draft-quality 9-pin dot-matrix texts. For NLQ or LQ texts, the RM_OMNIFONT_PLUS2W, RM_OMNIFONT_PLUS3W, RM_OMNIFONT_MTX, RM_OMNIFONT_FRX or RM_OMNIFONT_MOR modules are likely to give better results. The module MTX is also supported on: Windows.

Range of characters

This module supports 76 languages, of which 14 have dictionary support: Catalan, Danish, Dutch, English, Finnish, French, German, Greek, Hungarian, Italian, Norwegian, Portuguese, Spanish and Swedish. It can read multiple languages. It can read 18 of the 29 punctuation characters. (The Low Double Comma Quotation Mark is missing). It supports 24 of the 55 miscellaneous characters. (Some missing ones are: the Euro Sign, the Small Script F, the Copyright Sign, Registered Trade Mark Sign and the Degree Sign.)

The following table lists all accented letters this module can recognize. The range of uppercase ones supported by this module is limited, since in 9-pin dot-matrix text, there is difficulty in printing these letters. Those with lowercase support only are listed separately:

Upper & Lowercase | Lowercase only
Cap.&Small A Acute (A’) | Small A Circumflex (a^)
Cap.&Small AE (Ae) | Small A Macron (a-)
Cap.&Small A Ring (Ao) | Small A Grave (a`)
Cap.&Small A Umlaut (A:) | Small E Umlaut (e:)
Cap.&Small A Tilde (A~) | Small E Circumflex (e^)
Cap.&Small C Cedilla (C,) | Small E Grave (e`)
Cap.&Small E Acute (E’) | Small I Umlaut (I:)
Cap.&Small I Acute (I’) | Small I Circumflex (I^)
Cap.&Small N Tilde (N~) | Small I Grave (I`)
Cap.&Small O Double Acute (O") | Small O Circumflex (O^)
Cap.&Small O Acute (O’) | Small O Macron (O-)
Cap.&Small O Umlaut (O:) | Small O Grave (O`)
Cap.&Small O Tilde (O~) | Small S Hacek (Sv)
Cap.&Small O Slash (O/) | Small U Circumflex (U^)
Cap.&Small AE(OE) | Small U Grave (U`)
Cap.&Small U Double Acute (U") |
Cap.&Small U Acute (U’) |
Cap.&Small U Umlaut (U:) |

Accuracy issues

This module does not interpret the recognition trade-off setting and cannot be trained.

Character attributes

Since this module recognizes draft dot-matrix texts, character attributes are not applicable. Expanded characters are not recognized, condensed printout can be, but the accuracy is liable to be low.

Conditions

This module is used if it is directly specified in a zone structure.

If FM_DRAFTDOT9 filling method is set together with RM_AUTO, RM_OMNIFONT_MTX is used, provided that all characters (or languages or filters) validated for the zone are supported by it. If any are not supported, this module is used.

It can generate confidence data on recognized characters and can interpret all filter values.


RecAPI: HNR handprinted numeral recognition module

  • Introducing RecAPI
  • OCR Engines
HNR handprinted numeral recognition module
Module name: | HNR
Module identifier: | RM_HNR
Filling methods supported: | FM_HANDPRINT
Filters supported: | FILTER_ALL, FILTER_DIGIT, FILTER_PUNCTUATION and FILTER_MISCELLANEOUS
Trade-off supported: | TO_FAST, TO_ACCURATE (includes TO_BALANCED)
Knowledge base files: | KEZIRSTR.TBS
Training file supported: | no

This recognition module is supported on: Windows.

This module requires the Recognition Add-on See the topic on Licensing in the General Information help system.

Application areas

This recognition module can be used for recognition of handprinted numerals and four additional signs. If further handprinted characters are to be recognized, the use of the RM_RER recognition module is recommended, which is supported on: Windows, Linux and MacOS x64.

Range of characters

This recognition module can recognize the following handprinted characters:

  • the digits (0-9),
  • the Plus Sign (+)
  • the Minus Sign (–)
  • the Period or Full-stop (.)
  • the Comma (,).

The filter FILTER_DIGIT can be used to exclude the last four characters. The filters FILTER_PUNCTUATION and FILTER_MISCELLANEOUS function, other filters have no effect.

Accuracy issues

The functioning of the module can be influenced with the following parameters:

  • Recognition trade-off settings: The page-level trade-off value TO_FAST is respected, while TO_ACCURATE and TO_BALANCED are merged to a single value.
  • Writing style:
    • STYLE_EURO: lets you specify European styled numbers,
    • STYLE_US: lets you specify North-American styled numbers.
  • Character box flag: This lets you pass information to the recognition module on the positions of characters to be recognized, which is likely to improve accuracy. If a zero value is given, the recognition module will determine the positions automatically.
  • Space inclusion flag: This lets you set whether spaces detected between the recognized characters should be transmitted or not.

Conditions

For successful recognition, the characters should not touch each other. Each character can be zoned individually or a zone may contain several lines of characters. Each character must have a height of 30-180 pixels. Well-formed numbers written in pen are best recognized. Pencil and felt-tip pens give poorer results. When reading from pre-printed forms, dropout colored boxes can be useful to encourage respondents to write numbers of even size and spacing. But then, they mustn’t use a pen with the dropout color!

Optimum box size for such cases is 5 x 6 mm separated by 3 mm.

Maximum number of characters in a zone: 3000. Maximum number of lines in a zone: 40. Maximum number of characters in a line: 600.

Output

This can consist of the digits, the four additional characters, rejection symbols and, if requested, spaces. The RM_HNR module can benefit from the checking module to improve recognition accuracy, by encouraging output to conform to the systems’ pre-defined requirements. But note that spell checking from a language dictionary should be disabled. For zones whose contents are known to be limited in some way, a set of permitted numerical strings pre-defined in a User dictionary could be very useful.

Note
See HNR Recognition Engine Module.


RecAPI: MAT matrix matching recognition module

  • Introducing RecAPI
  • OCR Engines
MAT matrix matching recognition module
Module name: | MAT
Module identifier: | RM_MAT
Filling methods supported: | FM_OCRA, FM_OCRB, FM_MICR, FM_DOTDIGIT, FM_DASHDIGIT
Filters supported: | all elements except FILTER_LOWERCASE
Trade-off supported: | none
Knowledge base files: | SFOCR.TUD
Training file supported: | no

This module is supported on: Windows.

This module is supplied in the Western OCR Kit. See the topic on Licensing in the General Information help system.

Application areas

This module is designed to read certain groups of fixed-font characters specially designed for OCR or imaging applications, in which no two characters have similar shapes. Each character group has its own filling method. Application areas are in banking, check or waybill handling, product distribution and document validation, where high accuracy can be vital. It also handles some non-fixed print styles.

Range of characters

The above-mentioned supported filling methods cover the ranges of characters the MAT engine knows. The description of these ranges can be found in OCR special filling methods.

Accuracy issues

When this module is handling fixed fonts, well printed on a firm surface, with a limited number of possible characters, it should provide high accuracy recognition. This module doesn’t interpret the page-level recognition trade-off settings. This recognition is fairly tolerant of differing resolution settings. The dot- and dash-digit symbols are typically printed onto product containers, which may be curved or molded; furthermore many different standards are used. For high accuracy here, the texts to be read should be found on flat surfaces (on packing documents rather than product containers).

If the application does not need spell checking it can be switched off using kRecSetSpell, this may increase the module's performance.

Conditions

This module supports the checking module fully, and also all filter elements (however, FILTER_LOWERCASE will have no effect). Characters should be at least 4 x 8 pixels large and should not be touching. FM_OCRA and FM_OCRB support both single and multi-line zones, the other filling methods (FM_MICR, FM_DOTDIGIT and FM_DASHDIGIT) do not: each line must be zoned separately. MICR strings found on checks are usually single-line only.

Zones with FM_OCRA or FM_OCRB filling method can have either single or multi-line content. By default, for these types of zones, the MAT recognition modules assume multi-line content, but it can be controlled from an INI file like this

[Parameters]
; SingleRow specifies whether the zone contains one text-line only.
; Parameter range: [0, 1]
; This parameter has an effect with FM_OCRA or FM_OCRB fillingmethods.
SingleRow = 0
FM_OCRB
@ FM_OCRB
Definition KernelApi.h:573
FM_OCRA
@ FM_OCRA
Definition KernelApi.h:572

The path of this INI file can be specified in a setting Kernel.Ocr.MAT.SpecParam.


RecAPI: OMR optical mark recognition module

  • Introducing RecAPI
  • OCR Engines
OMR optical mark recognition module
Module name: | OMR
Module identifier: | RM_OMR
Filling methods supported | FM_OMR
Filters supported: | ignores all filter settings
Trade-off supported: | none
Knowledge base files: | none
Training file supported: | no

This module requires the Recognition Add-on. See the topic on Licensing in the General Information help system.

Application areas

This recognition module is used for recognizing optical marks (checkmarks). Typical application areas are in questionnaires, ballot papers, educational tests and reporting or ordering sheets, where the documents to be processed are form-like and filled by respondents, usually by hand.

IMPORTANT NOTE: Autozoning can not find OMR zones, therefore manually (programmatically) created user zones (see FM_OMR and RM_OMR) or pre-defined form templates (see how to use form templates) can be used.

Accuracy issues

Checkmark zones must contain the whole checkbox including the bounding printed frame.

Usually the zones are specified to be a bit larger than the checkbox (frame); it is not a problem if a zone contains some of the text next to the checkbox, but make sure that the covered text is not larger than the checkbox itself.

In some cases the frame is not visible on the scanned image, e.g. when a dropout color is used during scanning. Such checkboxes are much harder to recognize correctly, so do not use dropout color for OMR. If you must process such checkboxes (e.g. when you do not have control on the scanning process) there are some settings to make recognition as accurate as possible, see kRecSetOmrParams:

  • specify in advance how the module will handle frame detection (are the frames visible or invisible)
  • specify the "marking sensitivity" of the module, i.e. how strongly an OMR zone must be marked to count as filled.

While it is strongly discouraged to specify zones that cut into the frames, sometimes it is hard to avoid. In such cases setting Kernel.Ocr.OMR.ZoneCorrection to true may help: The correction algorithm checks a bit larger area around the border of the zone for processing. Note however that even this area does not necessarily include the whole frame (because correction must be careful not to misdetect nearby content), so the best way to get the accurate results is to specify the most accurate zones possible.

This recognition module is not influenced by the recognition trade-off setting. By default the visibility of a frame is detected automatically, but specifying if they are visible or not may make accuracy higher (see kRecSetOmrParams).

See also the topic Instructions to respondents below.

Conditions

The frame can be a rectangle, a circle, an ellipse, etc.; it can be shaded. It may be visible or invisible in the image sent for recognition. The dimension of the frame should be at least 45-50 pixels in each direction, that is 3.5 to 4 mm (0.2 inch) in the case of 300 dpi resolution.

  • If there is a frame visible in the image and the filled-in-error feature is disabled:
    it can be filled in by any shape such as an X, a tick, non-solid hatching, horizontal or vertical lines, etc.). The recommended filling shape is an X or a tick. A small number of contiguous black pixels falling within the checkmark area will lead to a value "filled". The recommended scanner brightness setting is slightly darker than 50%.
  • If there is no frame visible in the image or the filled-in-error feature is enabled:
    it should be filled so that the checkmark shape could not be mixed with a frame or half-frame, i.e. no lines parallel to the invisible zone borders. The filling shape should be a clear X or a tick. The dimensions of the OMR mark should be at least 45-50 pixels in both directions, which is 3.5-4 mm (0.2 inch) in the case of 300 dpi resolution.

This module has been tested on an image with more than 1300 OMR zones.

Output

An OMR (optical mark) zone is unique in that its output always consists of precisely one digit. It can be defined to be one of two or one of three values. When there are two possible values, these are zero (0) for unfilled, one (1) for filled. When three values are possible, the additional value is two (2) for "filled-in-error" (see below).

The safest way to link the output values with the checkboxes, which generated them, is through the LETTER structure output, which contains the zone number and the coordinates (zone, left, top, width, height). This can also help prevent checkmark data being confused with barcode values or other non-checkmark data coming from the same page.

If a page contains mainly or only checkmark data, the output converters "Text - Tab Delimited", "Text - Comma Delimited" or "Excel 97, 2000" can be used to load the data into a spreadsheet program for further analysis and presentation.

Filled-in-error

The filled-in-error feature allows the application to handle checkboxes that were filled by mistake. This feature is available only with the KernelAPI.

The respondent in this case should completely blacken the frame or checkmark area before marking a new choice. It is not essential that the area be completely blackened, but it must be significantly darker and denser than a "filled" (checked) zone. A "filled-in-error" zone generates an output value 2. This feature functions only if two conditions are met:

  • kRecSetOmrParams must be called with the value pFill set to TRUE.
  • Sets of OMR zones relating to one question must be grouped.

The filled-in-error feature functions only on grouped zones. Recognition results for each zone in a group will be 0, 1 or 2. There should be only one filled zone per group plus optionally one filled-in-error. When designing a checkmark document, all zones in a group should have the same checkbox style and size. Up to 32 OMR zones can be grouped.

Grouping OMR zones

In CSDK versions earlier than v15 the OMR zones could be grouped by modifying the seq field in the zone structure. From v15 this is not necessary, due to the notion of pizzabox zones. OMR zones can be groupped by collecting them in one pizzabox zone even they are not touching (i.e. one criterion of pizzabox shape is not fulfilled).

Instructions to respondents

OMR processing requires a high degree of accuracy. The two-value detection is inherently accurate; three-value detection is more difficult. Good document design and clear instructions to respondents are very important in getting high accuracy. Printing model samples of ideally filled and filled-in-error checkboxes in the instructions is recommended. Respondents should be urged to fill in the document with a dark blue or black pen. Pencils are to be avoided, as are pens with an ink color close to a dropout color on the scanner to be used.)

Note
See OMR Recognition Engine Module.


RecAPI: RER handprinted recognition module

  • Introducing RecAPI
  • OCR Engines
RER handprinted recognition module
Module name: | RER
Module identifier: | RM_RER
Filling methods supported: | FM_HANDPRINT, FM_CMC7, FM_OCRA, FM_OCRB, FM_MICR FM_OMNIFONT (Hebrew)
Filters supported: | all filter elements
Trade-off supported: | TO_ACCURATE, TO_FAST (includes TO_BALANCED)
Knowledge base files: | hand_s.rec, numplus.rec, and the below language-specific kb-files.
Knowledge base file for Hebrew OCR: | ttf_s_il.rec.
Training file supported: | no

This module is supported on: Windows, Linux and MacOS x64.

This module requires the Recognition Add-on for handprint recognition. Hebrew OCR requires the Asian Plus Add-on. See the topic on Licensing in the General Information help system.

This is a third-party recognition module from re Recognition GmbH (www.rerecognition.com). The Engine contains its KADMOS recognition engine.

Application areas

This recognition module can be used for recognition of handprinted alphanumerical characters, i.e. upper and lower case letters, the digits and some others. Although it can be used to read flowing text, its main application area is in form-like situations, where the form designer has great control over the content and maybe length of handprinted information given in each zone.

In addition this module recognizes Hebrew text. It can handle short embedded English texts within such language text. See details below.

Recognition of handprinted text

Range of characters

Selecting the filling method FM_HANDPRINT this module can differentiate 159 characters. These are the digits, 28 punctuation and miscellaneous characters (listed below), letters of the English alphabet plus all accented characters necessary for 98 languages. Fifteen languages have dictionary support: Catalan, Czech, Danish, Dutch, English, Finnish, French, German, Hungarian, Italian, Norwegian, Polish, Portuguese, Spanish and Swedish. Other supported languages include Croatian (with one limitation), Estonian, Gaelic, Indonesian, Latvian, Lithuanian, Slovak, Slovenian, Swahili, Tagalog, Turkish and Welsh (the last two with minor limitations). Cyrillic languages and Greek are not supported. These languages can be freely combined, but then dictionary support is not available.

The following punctuation characters can be recognized:

! Exclamation Mark
? Question Mark
‘ Apostrophe-Quote

" </TD><TD> Quotation Mark </TD></TR> <TR><TD> : </TD><TD> Semicolon </TD></TR> <TR><TD> , </TD><TD> Comma </TD></TR> <TR><TD> : </TD><TD> Colon </TD></TR> <TR><TD> . </TD><TD> Period (Full-stop) </TD></TR> <TR><TD> - </TD><TD> Hyphen-Minus </TD></TR> <TR><TD> ( </TD><TD> Opening Parenthesis </TD></TR> <TR><TD> ) </TD><TD> Closing Parenthesis </TD></TR> <TR><TD> [ </TD><TD> Opening Square Bracket </TD></TR> <TR><TD> ] </TD><TD> Closing Square Bracket </TD></TR> <TR><TD> { </TD><TD> Opening Curly Bracket </TD></TR> <TR><TD> } </TD><TD> Closing Curly Bracket </TD></TR> </TABLE> The following miscellaneous characters can be recognized: <TABLE BORDER="0" cellspacing="0" cellpadding="5"> <TR><TD> # </TD><TD> Number Sign </TD></TR> <TR><TD> % </TD><TD> Percent Sign </TD></TR> <TR><TD> @ </TD><TD> Commercial At </TD></TR> <TR><TD> & </TD><TD> Ampersand </TD></TR> <TR><TD> | </TD><TD> Vertical Bar </TD></TR> <TR><TD> $ </TD><TD> Dollar Sign </TD></TR> <TR><TD> * </TD><TD> Asterisk </TD></TR> <TR><TD> + </TD><TD> Plus Sign </TD></TR> <TR><TD> = </TD><TD> Equals Sign </TD></TR> <TR><TD> _ </TD><TD> Spacing Underscore </TD></TR> <TR><TD> / </TD><TD> Slash </TD></TR> <TR><TD> \ </TD><TD> Backslash </TD></TR> <TR><TD> < </TD><TD> Less-Than Sign </TD></TR> <TR><TD> > </TD><TD> Greater-Than Sign </TD></TR> </TABLE> Other supported filling methods gives additional character ranges to the capability of RER engine. The description of these ranges can be found in \ref CHR_OCRSPECFM "OCR special filling methods". @subsection RER_KBFILES Knowledge base files The files with <tt>.rec</tt> extension are optional, removable, selectable and combinable with each other manually. The general knowledge base file \c hand_s.rec is installed with the module during installation of OmniPage Capture SDK v2025.1. In addition, two language/country-specific knowledge base files are installed: \c hand_s_us.rec, \c hand_s_de.rec and the knowledge about numbers and some miscellaneous characters: \c numplus.rec. Other language/country-specific knowledge base files can be found in the folder \c RER_KBFiles of the install ZIP. (The installed files are also here.) These files are distributed as listed in the table below. Their names are in the form <tt>hand_s_??.rec</tt>, where the double question mark within the filename should be replaced by a country code as follows: <TABLE BORDER="0" cellspacing="0" cellpadding="5"> <TR><TD> Code</TD><TD> Language(s) / Country </TD></TR> <TR><TD> al </TD><TD> Albanian </TD></TR> <TR><TD> at </TD><TD> Austrian, German </TD></TR> <TR><TD> be </TD><TD> Belgian, Dutch, French, German </TD></TR> <TR><TD> ch </TD><TD> Swiss, French, German, Italian </TD></TR> <TR><TD> cs </TD><TD> Czech, Slovakian </TD></TR> <TR><TD> cz </TD><TD> Czech </TD></TR> <TR><TD> de </TD><TD> German </TD></TR> <TR><TD> dk </TD><TD> Danish </TD></TR> <TR><TD> ee </TD><TD> Estonian </TD></TR> <TR><TD> es </TD><TD> Spanish </TD></TR> <TR><TD> eu </TD><TD> West-European </TD></TR> <TR><TD> fi </TD><TD> Finnish </TD></TR> <TR><TD> fr </TD><TD> French </TD></TR> <TR><TD> hr </TD><TD> Croatian </TD></TR> <TR><TD> hu </TD><TD> Hungarian </TD></TR> <TR><TD> ie </TD><TD> Irish, English, Gaelic Irish </TD></TR> <TR><TD> it </TD><TD> Italian </TD></TR> <TR><TD> lt </TD><TD> Lithuanian </TD></TR> <TR><TD> lv </TD><TD> Latvian </TD></TR> <TR><TD> nl </TD><TD> Dutch </TD></TR> <TR><TD> no </TD><TD> Norwegian </TD></TR> <TR><TD> pl </TD><TD> Polish </TD></TR> <TR><TD> pt </TD><TD> Portuguese </TD></TR> <TR><TD> ro </TD><TD> Romanian </TD></TR> <TR><TD> se </TD><TD> Swedish </TD></TR> <TR><TD> sf </TD><TD> Scandinavia </TD></TR> <TR><TD> si </TD><TD> Slovenian </TD></TR> <TR><TD> sk </TD><TD> Slovakian </TD></TR> <TR><TD> uk </TD><TD> UK </TD></TR> <TR><TD> us </TD><TD> USA </TD></TR> </TABLE> If more than one language/country-specific knowledgebase files are in the Engine Binary directory, the system automatically uses the one according to the current language of the recognition. If the User's product will be used only in a specific region, the installed languge/country-specific knowledge base files can be removed and replaced manually by the one according to that region. In this case, some accuracy improvement may be accessible. For example, in Austria it is possibly better to use \c hand_s_at.rec instead of \c hand_s_de.rec. For a language spoken in more than one regions, there is no point using simultaneously all the knowledge base files containing that language, because the Engine cannot decide well enough between the regions. Since the API does not provide any way to specify the country, the User has to make the decision in advance. The module requires at least one \c .rec file in the Engine Binary directory. It is not necessary to be \c hand_s.rec. On the other hand, the Distribution Wizard of the CSDK tries to copy only \c hand_s.rec from the binary folder into the selected file set (and sends a message, if this file is not there). Thus if you want to see a different subset of optional knowledge base files in your redistributed file set you should select and copy it manually after running the Distribution Wizard. @subsection RER_ACCURACY Accuracy issues Handprint is much harder to recognize accurately than machine generated text, and success depends very heavily on character quality. The use of structured forms to limit the possible range of characters, together with zone-level filters and individual character validation can significantly improve accuracy (\ref kRecSetFilterPlusEx). This recognition module can apply all the Engine’s possible filter elements to the 159-member character set it supports. Handprinted forms are usually filled by different respondents and this is liable to lower accuracy. If respondents can be given clear filling instructions (e.g. a print model to follow) and be motivated to print clearly, success will be higher. If the handprint contains numbers only, using the \ref RM_HNR module is likely to give better results than the \ref RM_RER module filtered for numbers only. The functioning of the RER module can be influenced by the page-level trade-off setting. @subsection RER_CONDI Conditions For successful recognition, the characters should not touch each other. Each character can be zoned individually or a zone may contain one or more lines of characters. Each character must have a height of 30-180 pixels. Well formed characters written in pen are best recognized. Pencil and felt-tip pens give poorer results. When reading from pre-printed forms, dropout colored boxes can be useful to encourage respondents to write characters of even size and spacing. But then, they mustn’t use a pen with the dropout color. Maximum number of characters in a line: 200. Number of lines in a zone: No restriction. @subsection RER_MODINTEG Module integration issues The Engine cannot provide access to all the parameters of reRecognition’s KADMOS toolkit. Note however, that the recognition module can be fine-tuned through parameters of an INI file located under the section <tt>[Parm]</tt>. A sample INI file \c RM_RER.INI can be found in the above mentioned folder \c RER_KBFiles of the install ZIP. The full-path of the given INI file can be specified by the setting \ref ALLSTS_KERNELAPI_RECOG_RER "Kernel.Ocr.RER.UseParamFile", which replaces the function RecSetRMSpecParams of the previous CSDK versions.

Recognition of Hebrew text

RER recognition module can recognize only machine printed (FM_OMNIFONT) characters of Hebrew. Handprinted characters are not supported.

When Hebrew language (LANG_THA or LANG_HEB) is set for recognition, other languages, except for English, should not be set.

The module can recognize short English texts embedded in Hebrew text. It works by default even when English language is not enabled.

IMPORTANT NOTE: For the correct working of the recognition of Hebrew language, the language should be set before the preprocess operation.

Note
The inversion detection and deskew detection steps of preprocessing do not work for Hebrew language images, but their manual mode can be used. Fax correction does not work at all in these cases. However despeckle supports also these images.
Only the DCM_LEGACY auto-zoning algorithm works well for Hebrew language images, thus decomp method setting has no effect in this case. In addition, only WT_FLOW and WT_GRAPHIC zones are enabled for Hebrew manual zoning.
This third-party recognition module is tightly integrated to the Engine. For more information on reRecognition's handprinted recognition technology, visit their homepage (http://www.rerecognition.com).


RecAPI: Asian recognition module

  • Introducing RecAPI
  • OCR Engines
Asian recognition module
Module name: | ASIAN
Module identifier: | RM_ASIAN
Filling methods supported: | FM_OMNIFONT
Filters supported: | should not be used
Trade-off supported: | see below
Training file supported: | no

This module requires the Asian Plus Add-on. See the topic on Licensing in the General Information help system.

Application areas

This module provides recognition services for four Asian languages with horizontal or vertical text direction; these languages are Japanese, Korean and Chinese – Traditional and Simplified (generally referred as CCJK). It can handle short embedded English texts within the CCJK text.

Formerly the Arabic OCR was performed by this module as well. From version 22.0 OmniPage CSDK introduced the Arabic recognition module.

See the detailed information about the CCJK characters known by this module.

CCJK text can be horizontal and left-to-right (WT_FLOW) or vertical - character flow top-to-bottom with line flow from right-to-left (WT_VERTTEXT).

Texts embedded in vertical texts can have three orientations: vertical (neon), right-rotated and side-by-side. The latter is usually limited to three characters, and is most often used for Arabic numerals. The output converters of RecAPIPlus transform all such embedded texts to the right rotation.

The orientation of CCJK text is auto-detected on pages where user zones have not been inserted or on WT_AUTO user zones. Auto-detection runs zone-by-zone, so pages with both horizontal and vertical text blocks (such as for picture captions) can be handled.

Digital camera input can be used for Asian-language input, but the automatic 3D deskewing is not useful in these cases. Manual 3D deskew is available via the Scanner Enhancement Technology Tools (SET Tools), which is a part of RecAPIPlus and the Image View Visual Control (for more information see the IPRO and Visual Toolbox documentation systems).

Table zones can be inserted onto Asian pages, but if the OCR cannot detect a table within such a zone, the zone is likely to produce zero recognition results.

Language handling

The Asian language handling differs somewhat from that for Western languages. Spell checking, editor display and verification are not available for Asian languages. In addition only one Asian language should be set for recognition and Western languages, except for English, should not be set alongside an Asian language.

Asian OCR Engine can recognize short English texts embedded in any CCJK text. It works in default even when English language is not enabled.

IMPORTANT NOTE: For the correct working of the Asian Recognition Module, the selected Asian language should be set before the preprocess operation.

NOTE: Of course the above mentioned language selection manner does not refer to Single Language Detection.

Conditions

The ideal font point size for CCJK language body text is 12 points ("small four" in Chinese size name), scanned at 300 dpi, resulting in characters with around 48 x 48 pixels. The minimum pixel count is about 30 x 30, that is 7.5 points at 300 dpi ("six"). For characters smaller than this, 400 dpi should be used.

When user zones are used, it is recommended to create homogeneous user zones as much as possible, because they may give better results. It is especially important in the case of Asian languages. WT_AUTO zones can be inhomogeneous.

CCJK trade-off

There are 3 engines inside this module for CCJK languages, which are accessible from OmniPage CSDK 19.20.

  • Full CCJK Engine provides the CCJK OCR being before v19.20.
  • Fast CCJK Engine provides a faster but less accurate one, mainly for embedded solutions.
  • Voting CCJK Engine combines the above two engines for a better accuracy. Of course, this is slower than Full CCJK. This engine is supported on: Windows.

NOTE: Fast and Voting CCJK engines are recommended to use mainly for Japanese language.

These engines can be controlled by settings. Setting trade-off to TO_FAST selects Fast CCJK Engine for running. Setting trade-off to TO_ACCURATE and Kernel.OcrMgr.PreferAccurateEngine selects Voting CCJK Engine for running. Otherwise, Full CCJK runs.

Character attributes

The character attributes, such as bold and italic styling, cannot be retrieved for Asian text, nor for embedded English text.

Confidence data and choices

Recognition results can be saved to memory as a LETTER array, making the confidence data and alternate character choices available for Asian languages for the first time.

See also
The settings of the Asian Recognition Engine Module


RecAPI: Arabic recognition module

  • Introducing RecAPI
  • OCR Engines
Arabic recognition module
Module name: | ARABIC
Module identifier: | RM_ARABIC
Filling methods supported: | FM_OMNIFONT
Filters supported: | should not be used
Trade-off supported: | see below
Training file supported: | no

This module requires the Recognition Add-on. See the topic on Licensing in the General Information help system.

Application areas

This module provides recognition services for Arabic languages. It can handle short embedded English texts within the Arabic text. Formerly the Arabic OCR was performed by the Asian recognition module. From version 22.0 OmniPage CSDK introduced the Arabic recognition module.

Digital camera input can be used for Asian-language input, but the automatic 3D deskewing is not useful in these cases. Manual 3D deskew is available via the Scanner Enhancement Technology Tools (SET Tools), which is a part of RecAPIPlus and the Image View Visual Control (for more information see the IPRO and Visual Toolbox documentation systems).

Table zones can be inserted onto Arabic pages, but if the OCR cannot detect a table within such a zone, the zone is likely to produce zero recognition results.

Language handling

The Arabic language handling differs somewhat from that for Western languages. Spell checking, editor display and verification are not available for Arabic languages. In addition other languages should not be set alongside the Arabic language, except for English.

Arabic OCR Engine can recognize short English texts embedded in any Arabic text. It works in default even when English language is not enabled. (Formerly, in the case of Arabic OCR, English language was required to be set for embedded English text recognition, but from version 22.0 it is not necessary.)

IMPORTANT NOTE: For the correct working of the Arabic Recognition Module, the language should be set before the preprocess operation.

NOTE: Of course the above mentioned language selection manner does not refer to Single Language Detection.

Conditions

When user zones are used, it is recommended to create homogeneous user zones as much as possible (in the sense of font size), because they may give better results. It is especially important in the case of Asian languages. WT_AUTO zones can be inhomogeneous.

Deskew and orientation

The deskew and orientation detection work in a different way for Arabic language than in the case of other languages. The working of both operations can be adjusted through settings (Kernel.Img.Deskew.EnabledForArabic and Kernel.Img.Rotation.EnabledForArabic). If these settings are FALSE (by default), the AUTO methods (DSK_AUTO, ROT_AUTO) of these operations for Arabic language equal to the case when they are switched off (DSK_NO, ROT_NO). If the settings are TRUE, or the deskew and orientation are not set to AUTO, the working of these methods are the same for both the Arabic and the Western cases.

Trade-off

If trade-off is TO_ACCURATE or TO_BALANCED and decomp method is DCM_STANDARD, a more accurate embedded English text recognition is run by this module. (This is the default state.)

Character attributes

The character attributes, such as bold and italic styling, cannot be retrieved for Arabic text, nor for embedded English text.

See also
The settings of the Arabic Recognition Engine Module


RecAPI: Performance comparison of Engine combinations

  • Introducing RecAPI
  • OCR Engines
Performance comparison of Engine combinations

This chart shows the speed/accuracy trade-off using selected Engine combinations and trade-off settings. Data was measured on a 3GHz Core Duo machine with 2GB RAM, with the following test set:

  • About 5000 pages in single-page TIFF files, with 1.13 million words.
  • Mixed resolutions (200-300 dpi), both black-and-white and color
  • Mixed languages (Eng, Fre, Ger, Ita, Hun, Pol, Por)
  • Mixed layout (magazines, business letters, faxes, business cards…)
  • Mixed scanners

For both speed and accuracy, the 100% value is for a good compromise between accuracy and speed (Plus2W). That means the fastest configuration is slightly over twice as fast as the 2-way voting. The percentage differences translate into word accuracy values as follows:

Most accurate (Plus 3W, the default) | 97.2%
Plus 2W | 96.9%
Fastest (FWX + Legacy) | 92.5%


RecAPI: Platforms

  • Introducing RecAPI
Platforms

RecAPI on Linux
RecAPI on Mac OS X
General Information for Linux and Mac OS X (licensing, distribution, technical support)
Temporary file handling (Windows, Linux, MacOS)

At this time, the full functionality of OmniPage Capture SDK is available only in Windows 32-bit operating systems. On other platforms (Windows 64-bit, Linux, Embedded Linux, Android, MacOS) there are different limitations. Documentation of some features list the supported platforms. If description of a feature does not give such a list, the feature is supported on all platforms. Non-specified Windows means both 32 and 64-bit. Linux means desktop Linux on x64 processors. For MacOS OmniPage Capture SDK contains Universal binaries, which means an x86_64 version for Intel-based Macs and an arm64 version for Apple Silicons. There are some features not supporting arm64, they are said to support MacOS x64 only.

Following table lists the features that are not supported on some platforms. Non-mentioned features are supported on all platforms.

 | Windows 32-bit | Windows 64-bit | Linux | Embedded Linux | Android | MacOS x64 | MacOS arm64
KernelAPI | + | + | + | + | + | + | +
MTX | + | + | - | - | - | - | -
MOR | + | + | + | - | - | + | -
HNR | + | + | - | - | - | - | -
RER | + | + | + | - | - | + | -
DOT | + | + | - | - | - | - | -
OMR | + | + | + | + | + | + | +
MAT | + | + | - | - | - | - | -
BAR | + | + | + | + | + | + | +
Arabic recognition module | + | + | + | + | + | + | +
Asian recognition module | + | + | + | + | + | + | +
PLUS3W | + | + | + | - | - | + | +
Fast mode of PLUS2W and PLUS3W | + | + | - | - | - | - | -
PLUS2W, FRX recognition modules | + | + | + | + | + | + | +
Form Recognition Module | + | + | + | + | - | + | +
Form Template Editor | + | + | - | - | - | - | -
Training file handling | + | + | + | - | - | - | -
FM_DRAFTDOT9 | + | + | - | - | - | - | -
FM_BARCODE | + | + | + | + | + | + | +
FM_OMR | + | + | + | + | + | + | +
FM_HANDPRINT, FM_AUTO_HAND | + | + | + | - | - | + | -
FM_MICR | + | + | + | + | - | + | -
FM_BARCODE2D | + | + | + | + | + | + | +
FM_DOTDIGIT | + | + | - | - | - | - | -
FM_DASHDIGIT | + | + | - | - | - | - | -
FM_CMC7 | + | + | + | + | - | + | -
FM_OMNIFONT, FM_DRAFTDOT24, FM_OCRA, FM_OCRB filling methods | + | + | + | + | + | + | +
FF_XIFF | + | - | - | - | - | - | -
MAX | + | - | - | - | - | - | -
FF_XPS | + | + | - | - | - | - | -
FF_WMP | + | + | - | - | - | - | -
FF_JBIG | + | + | - | - | - | - | -
FF_PCX | + | + | + | + | - | + | +
FF_DCX | + | + | + | + | - | + | +
FF_SIM | + | + | + | + | - | + | +
FF_GIF | + | + | + | - | - | + | +
TIFF, BMP, FF_PNG, JPEG, FF_TIFJPGNEW, JPEG2000, JBIG2, FF_OPG image formats | + | + | + | + | + | + | +
PDF input (including PDF_MRC) | + | + | + | - | - | + | +
PDF output (including PDF_MRC) (in KernelAPI) | + | + | + | + | - | + | +
CCJK languages | + | + | + | + | + | + | +
Thai language | + | + | + | + | - | + | -
Hebrew language | + | + | + | + | - | + | -
Vietnamese language | + | + | + | + | - | + | -
Arabic language | + | + | + | + | - | + | +
Other languages | + | + | + | + | + | + | +
I/O Stream Handling Module | + | + | + | - | - | + | +
 | Windows 32-bit | Windows 64-bit | Linux | Embedded Linux | Android | MacOS x64 | MacOS arm64
RecAPIPlus | + | + | + | + | - | + | +
Audio converter | + | + | - | - | - | - | -
ePub converters | + | + | + | - | - | + | +
HTML 3.2 converter | + | + | + | + | - | + | +
HTML 4.0 and 5.0 converters | + | + | + | + | - | + | +
RTF converter | + | + | + | + | - | + | +
DOCX | + | + | + | + | - | + | +
Pages (limited DOCX) | + | + | + | + | - | + | +
XLSX | + | + | + | + | - | + | +
Text converters | + | + | + | + | - | + | +
PDF output (in RecAPIPlus) | + | + | + | - | - | + | +
Signed PDF | + | + | + | - | - | + | +
PDF Bookmark | + | + | + | - | - | + | +
Other converters | + | + | - | - | - | - | -
 | Windows 32-bit | Windows 64-bit | Linux | Embedded Linux | Android | MacOS x64 | MacOS arm64
RecPDFAPI | + | + | + | - | - | + | +
Scanning Module | + | + | - | - | - | - | -
KernelAPIS, RecAPIPlusS, RecPDFS | + | + | - | - | - | - | -


RecAPI: RecAPI on Linux

  • Introducing RecAPI
  • Platforms
RecAPI on Linux

OmniPage Capture SDK 2025.1 is designed also for use on Linux operating systems. However, only partial functionality is available on Linux. Please see the documentation of each module for detailed information.

In addition, licensing and distributing also differ from the implementation used on Windows. For more information, please see the General Information topic.

The following list names the folders where the different parts of the CSDK are installed.

  • /usr/local/lib/omnipage-csdk-2025.1 - .so files, other binaries.
  • /usr/local/share/doc/omnipage-csdk-2025.1 - documentation in HTML.
  • /usr/local/src/omnipage-csdk-2025.1 - files of the sample project.
  • /usr/local/include/omnipage-csdk-2025.1 - include files.
  • /usr/local/bin - OP License Manager application (oplicmgr).

See also the description of sample project for Linux.

Normal (non-image-only) PDF input

Loading normal PDF files, the generated image and thus the recognition result may be better if one of the following font packages is installed:

  • msttcorefonts (windows essential fonts pack, it may have different names on different Linux distributions),
  • liberation-fonts (on Red Hat distributions).


RecAPI: RecAPI on MacOS

  • Introducing RecAPI
  • Platforms
RecAPI on MacOS

OmniPage Capture SDK 2025.1 is designed also for use on MacOS operating systems both on Intel-based and Apple Silicon architectures. However, only partial functionality is available on MacOS. Please see the documentation of each module for detailed information.

In addition, licensing and distributing also differ from the implementation used on Windows. For more information, please see the General Information topic.

The downloadable OmniPage Capture SDK DMG file contains the following folders:

  • Frameworks/OmniPage-CSDK-Runtime.framework - All the binaries needed to run your application. Add and copy this framework into your application. You need to distribute this framework together with your application exactly as Frameworks/OmniPage-CSDK-Runtime.framework. Alternatively, you may also use it from /Library/Frameworks or some other path.
  • Frameworks/OmniPage-CSDK.framework - All the development header files needed to build your application. Add this framework to your application, but don't copy it there. It is not needed at run time.
  • Frameworks/OmniPage-CSDK-RecApiPlus.framework - This framework is needed only when you call any RecAPIPlus functions. In that case add this framework to your application, but don't copy it there. It is not needed at run time.
  • Frameworks/OmniPage-CSDK-RecPDF.framework - This framework is needed to build your application if you call any RecPDF Module functions. In that case add this framework to your application, but don't copy it there. It is not needed at run time.
  • Documentation - View index.html in this folder to see the description of all Capture SDK API functions and features. Alternatively, if you have a CHM reader, you can view recapi.chm in this folder; that might be easier to use.
  • Tools - It contains the command line application OP License Manager (oplicmgr) that you can use to download and activate your OmniPage Capture SDK license file. It also contains another command line application dctool for training the Document Classifier of the Capture SDK.
  • Samples - Sources and test image files of the sample applications.

The .dylib files of the OmniPage CSDK are Universal binaries, so each dylib supports the two above mentioned architectures in one.

See HowTo_CocoaProjectWithCSDK.pdf for details (contained in the folder of Cocoa Sample project).


RecAPI: General Information for Linux and MacOS

  • Introducing RecAPI
  • Platforms
General Information for Linux and MacOS

This section talks about licencing, distribution, technical support and third-party licenses for Linux and MacOS.

For Windows these topics can be found in the General Information help system.

Topics:


RecAPI: Licensing on Linux and MacOS

  • Introducing RecAPI
  • Platforms
  • General Information for Linux and MacOS
Licensing on Linux and MacOS

Both the Development and Distribution licenses are OEM type licenses, but they may enable different feature sets.

OEM Development license

With this license you are allowed to run the purchased Capture SDK version on your development computers only.

If you got an LCX license file from us you do not need to do license activation step as the given file is already activated. In this case you got an OEM code as well.

Otherwise, purchasing a CSDK one or more license keys are delivered for you. They may represent different feature collections manifesting in LCX files. These LCX files can be downloaded, activated and collected into license pack files (LCXZ). In fact a license pack is a zip file containing LCX files and representing the union of the contained specific licenses. CSDK can be run having an activated LCX file or an LCXZ file containing activated LCX files. Therefore your application must include a call to load the activated license file (kRecSetLicense). The license is validated when the application successfully calls kRecInit. The supplied samples (either Linux or MacOS) must also call this function with the proper license data.

Activation can be performed using the installed application OP License Manager (/usr/local/bin/oplicmgr on Linux and LicenseManager/oplicmgr on MacOS). This application makes all the steps of creating a valid LCXZ file and can insert new LCX files into an existing valid LCXZ.

For activation of a license a 12 character long OEM code is required. The OEM code can be specified for OP License Manager using the -c option. If it is not specified, a random code will be used. In a license pack file all the licenses have to be activated using the same OEM code. This same OEM code is to be specified as the second parameter of the above-mentioned function kRecSetLicense. The OP License Manager application generates a header file at the end of the activation process. This header file contains the OEM code (either specified or randomly generated) belonging to the activated license.

A new license pack can be created using the option -N or -n and listing all the license keys to be packed. The latter option does not do anything if the specified file exists, the former one overwrites it. The above mentioned header file with the OEM code is generated.

An existing license pack can be extended with additional license files using the option -u and listing all the additional license keys. In this case the header file containing the OEM code generated by the previous step must be available as well; oplicmgr uses that to learn the OEM code to be used.

Details about the use of OP License Manager can be seen using the option -h.

OEM Distribution licenses

These are needed when a developer is ready to distribute an application integrating OmniPage Engine. Distribution (end-user) licenses are obtained by contacting the OmniPage sales team.

This OEM Distribution License file can be activated and used in the same way as OEM Developer License files. For details see the above section.

Seat licenses

OEM licenses can be used by any user on any machine. Seat licenses are tied to the specific machine they were activated on. By default the Seat license can only be used by the user who has activated it, but this behaviour can be changed as follows:

License management information is located in a subdirectory of the home folder of the activating user. This folder is named .omnipage-licmgr. It and its subdirectories are readable and writable by any other user, too.

License management is always looking for this directory in the home folder of the user executing the CSDK based application.

If any other user wants to use the CSDK, they should create a symlink named .omnipage-licmgr in their home directory pointing to /home/<LicenseOwner>/.nuance-licmgr, where <LicenseOwner> is the name of the user who has activated the license(s).

Note that the directory .omnipage-licmgr may already exist in the user’s home folder (maybe containing some log files). In that case it should be removed before creating the symlink.


RecAPI: Distributing RecAPI Applications on Linux

  • Introducing RecAPI
  • Platforms
  • General Information for Linux and MacOS
Distributing RecAPI Applications on Linux

Distribution arrangements for the CSDK 2025.1 Linux version will be agreed with each client separately – only OEM-type licensing is used for this Linux version.

Redistributing Engine files

You need to redistribute either the omnipage-csdk package. We suggest you create an RPM or DEB package from your application and make it depend on the CSDK package.

IMPORTANT NOTE: Distribute only with OEM Distribution licenses!


RecAPI: Distributing RecAPI Applications on MacOS

  • Introducing RecAPI
  • Platforms
  • General Information for Linux and MacOS
Distributing RecAPI Applications on MacOS

Distribution arrangements for the CSDK 2025.1 MacOS version will be agreed with each client separately – only OEM-type licensing is used for this MacOS version.

Redistributing Engine files

Only the Runtime framework (OmniPage-CSDK-RunTime.framework) of the Capture SDK is allowed to be redistributed.

IMPORTANT NOTE: Distribute only with OEM Distribution licenses!


RecAPI: Third-party license notes

  • Introducing RecAPI
  • Platforms
  • General Information for Linux and MacOS
Third-party license notes

Some of the software components in the OmniPage Capture SDK are provided by third-party companies. The list contains only the components used by CSDK on non-Windows platforms.

Acknowledgements

The JPEG image file read and write capability of the OmniPage Capture SDK is based on the work of the Independent JPEG Group.

The Portable Network Graphics (PNG) image file read and write capability of the OmniPage Capture SDK is based, in part, on the PNG Reference Library (libpng).

The Portable Network Graphics (PNG) image and the PDF file read and write capability of the OmniPage Capture SDK is based, in part, on the zlib Compression Library.

The PDF read capability of the OmniPage Capture SDK is based, in part, on the work of the FreeType team.

AES encryption/decryption for PDF (C) 2001, Dr Brian Gladman, Worcester, UK.

The JPEG 2000 image read and write capability of the OmniPage Capture SDK was developed using the Kakadu software.

The language dictionary support of the OmniPage Capture SDK is partly from Proximity.
The Proximity Dictionaries © 2000, all rights reserved Proximity Technology, Inc.

Slovenian Speller Database, Copyright (C) 2002 Amebis d.o.o.

Esperanto dictionary based on compilation by Toon Witkam and Stefan MacGill.

The language dictionary support of the OmniPage Capture SDK is partly from Vantage Research.

CCJK and Arabic OCR capabilities in the OmniPage Capture SDK are jointly developed by the Beijing Wintone Information Technology Corporation Ltd and Kofax Inc. All rights reserved.

International Components for Unicode (ICU) project Copyright (c) 1995-2009
International Business Machines Corporation and others.

This RecAPI documentation was compiled with the documentation system Doxygen.


RecAPI: Temporary file handling (Windows, Linux, MacOS)

  • Introducing RecAPI
  • Platforms
Temporary file handling (Windows, Linux, MacOS)

CSDK creates working folders using the company name and product name passed to kRecInit and RecInitPlus.

  • On a Windows XP or earlier versions this is similar to \Documents and Settings\<username>\Local Settings\Temp\OmniPage\CSDK22.
  • On Windows Vista and later versions this folder is like \Users\<username>\AppData\Roaming\OmniPage\CSDK22.
  • On a Linux or a MacOS system the following folders are created
    • /tmp/<companyname>-<username>/<productname> - temp folder. In default, this folder is
      • /tmp/omnipage-<username>/csdk-2025.1 on Linux, and
      • /tmp/OmniPage-<username>/CSDK-2025.1 on MacOS.
    • <userhome>/.<companyname>-<productname> - In default this folder is
      • <userhome>/.omnipage-csdk-2025.1 on Linux, and
      • <userhome>/.OmniPage-CSDK-2025.1 on MacOS.


RecAPI: Tutorial

  • Introducing RecAPI
Tutorial

The topics below are designed to guide you through the main steps of processing pages with the RecAPI interface of OmniPage Capture SDK v2025.1.

Page-level processing
Document-level processing
Sample applications
The document-level processing is supported on: Windows, Linux, Embedded Linux, MacOS.

Note
For the sake of brevity, the sample code fragments presented in this tutorial (and also in this documentation) typically do not contain any error handling; only the presence of the return code assignments reminds you that you should implement some error handling.


RecAPI: Page-level processing

  • Introducing RecAPI
  • Tutorial
Page-level processing

This level is performed by the API layer KernelAPI. It uses a page-oriented approach with simple output conversion for fast and accurate recognition of the images. This layer provides tools for handling scanners, accessing the image files and various possibilities to adjust the preprocessing, recognizing and post-processing phase of the workflow for creating more accurate and detailed results. It gives direct access to the recognition result for manual administration and processing, or tools for creating some kinds of simple output. The document-level processing provides slower, but more accurate and complex output conversion, for the highest level of layout retention.

The simplest running application is the following (it loads a file test.tif and after recognition, creates a simple text output out.txt - all settings use default values):

#include "KernelApi.h"
int main()
{
RECERR rc = REC_OK;
rc = kRecInit(YOUR_COMPANY, YOUR_PRODUCT);
if (rc != REC_OK && rc != API_INIT_WARN && rc != API_LICENSEVALIDATION_WARN)
printf("Initialization error occured: %x\n", rc);
else
{
char image[] = "test.tif";
LPCSTR imgptr[2] = {image, NULL};
rc = kRecProcessPages(0, "out.txt", imgptr, NULL, NULL, NULL);
if (rc != REC_OK)
printf("Processing error occured: %x\n", rc);
rc = kRecQuit();
if (rc != REC_OK)
printf("Quitting error occured: %x\n", rc);
}
return kRecGetLastError(NULL, NULL, 0);
}
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecGetLastError
RECERR RECAPIKRN kRecGetLastError(LONG *pErrExt, LPTSTR pErrStr, int buflen)
Getting last error.
API_INIT_WARN
@ API_INIT_WARN
Module initialization warning.
Definition RECERR_doc.h:67
REC_OK
@ REC_OK
Successful operation, no error.
Definition RECERR_doc.h:20
API_LICENSEVALIDATION_WARN
@ API_LICENSEVALIDATION_WARN
License cannot be validated.
Definition RECERR_doc.h:95
kRecQuit
RECERR RECAPIKRN kRecQuit(void)
Closing KernelAPI.
kRecInit
RECERR RECAPIKRN kRecInit(LPCTSTR pCompanyName, LPCTSTR pProductName)
Initializing KernelAPI.
kRecProcessPages
RECERR RECAPIKRN kRecProcessPages(int sid, LPCTSTR pDocFile, LPCTSTR *pImageFiles, LPONETOUCH_CB pCallback, void *pContext, LPCTSTR pTemplate)
Process multiple pages and convert them to a single document.


RecAPI: Basics

  • Introducing RecAPI
  • Tutorial
  • Page-level processing
Basics

Initialization

Any operation of the Capture SDK is accessible only after an initialization step, performed by kRecInit (on this layer), which determines the available modules of the Engine, initializes them and starts all the modules, which are licensed and found in the Engine Binary directory.

The initialization step has a quitting pair kRecQuit.

Having successfully initialized the Engine, the next step is to check the availability of the required modules of the Engine. A module is reported as not available if either there is no license on the computer for it, or when one or more files belonging to the particular module are not present in the current Engine configuration. To check the availability of the modules, use the kRecGetModulesInfo function, which gives information about the given module and the result error code of its initialization. If the kRecInit routine finds a partially installed system, some functions may later return an error code.

If the integrating application uses scanners it also has to initialize the Scanning Module calling kRecScanInit, which has a quitting pair kRecScanQuit. Only the Scanner Module requires additional initialization from the modules of the Engine.

The Scanning Module is supported on: Windows.

An alternative way to use the page-level API of the Capture SDK is dynamic linking using the module KernelAPIS.

Note
The following example shows a typical initialization section:
// Initialize engine.
RECERR rc = kRecInit(YOUR_COMPANY, YOUR_PRODUCT);
// Test for errors.
if ((rc != REC_OK) && (rc != API_INIT_WARN) && (rc != API_LICENSEVALIDATION_WARN))
{
// Error occured.
printf("Error in initialization.\n");
printf("Error code = %X\n", rc);
kRecQuit();
return;
}
else if (rc == API_INIT_WARN)
{
// There are some not initialized modules.
printf("Module initialization warning. One or more\n");
printf("recognition modules have not been initialized properly.\n");
// Get module information.
LPKRECMODULEINFO pModules;
size_t size;
kRecGetModulesInfo(&pModules, &size);
// Test whether the needed module is initialized or not.
if(pModules[INFO_BAR].InitError)
{
printf("BAR module is not initialized.\n");
kRecQuit();
return;
}
}
else if (rc == API_LICENSEVALIDATION_WARN)
{
printf("End of grace period is coming...\n");
}
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
API_INIT_WARN
@ API_INIT_WARN
Module initialization warning.
Definition RECERR_doc.h:67
REC_OK
@ REC_OK
Successful operation, no error.
Definition RECERR_doc.h:20
API_LICENSEVALIDATION_WARN
@ API_LICENSEVALIDATION_WARN
License cannot be validated.
Definition RECERR_doc.h:95
kRecQuit
RECERR RECAPIKRN kRecQuit(void)
Closing KernelAPI.
kRecInit
RECERR RECAPIKRN kRecInit(LPCTSTR pCompanyName, LPCTSTR pProductName)
Initializing KernelAPI.
kRecGetModulesInfo
RECERR RECAPIKRN kRecGetModulesInfo(LPKRECMODULEINFO *ppModules, size_t *pSize)
Getting module information.
INFO_BAR
@ INFO_BAR
Definition KernelApi.h:153
KRECMODULEINFO
Module info.
Definition KernelApi.h:194

Error handling

Each function call in the Capture SDK returns with REC_OK (zero) on successful completion, otherwise the returned value is an error code of RECERR. The application program should always check the return values of the RecAPI functions to ensure that each function has successfully completed its operation.

For the sake of brevity, the sample code fragments presented in this tutorial (and also in this documentation) typically do not contain any error handling; only the presence of the return code assignments reminds you that you should implement some error handling.

Threading

The Engine of the Capture SDK is thread-safe since version 16 (supported on: Windows, Linux).

RecAPI functions can be called from different threads. For more information, see the topic Multi-threading in RecAPI.

Timeout

The Capture SDK provides an Engine-wide module timeout setting. This implements a watch-dog feature for avoiding rare but annoying dead-lock situations (infinite loops).

It can be set through the function kRecSetTimeOut. In the current release this feature is applied for the following processes:

  • image pre-processing (PID_IMGPREPROCESS process),
  • page–layout decomposition, also known as auto-zoning or page parsing (PID_DECOMPOSITION), and
  • recognition (PID_RECOGNITION1, PID_RECOGNITION2 and PID_RECOGNITION3 processes).

The timeout setting can be set to a value in milliseconds or INFINITE. Specifying the INFINITE timeout value disables the watch-dog mechanism in the Engine. Disabling the timeout feature may speed up the recognition a little bit. The slowing could become significant only when recognizing a lot of small-size images successively.

The supported modules will be allowed to process an image for no longer than the time specified. When the limit is reached, the Engine terminates the running of the appropriate module and resets it. The calling function returns with the API_TIMEOUT_ERR return code to the calling application. This signals that the processing of the image could not be successfully completed.

If this function is not called to specify the module timeout setting, the default value of this setting, 180000 milliseconds (3 minutes) is used.

The description of timeout handling gives more information e.g. about hard timeout.

Setting handling

Only a small set of API functions perform real actions in the Engine, like image loading, recognizing, etc. The majority of the function entries are used to set or retrieve the value of Engine settings used to customize Engine behavior.

From CSDK v15, there is an individual module (Settings Manager Module - StsMan) for handling all the settings of the Engine, but there are many functions (partly for backward compatibility) for modifying or retrieving the value of these settings as well (kRecSetXX, kRecGetXX).

The settings are collected in a setting tree, in which any setting can be found by its name. After getting a setting, it can be accessed through a handle HSETTING, which is required for any operation of StsMan. Each setting has a symbolic name (also defining its location in the tree), a type, flags (for determining its working), a default value (which is a permanent, non-changeable property) and a current value (which is changeable).

The CSDK v15 introduced the notion of Settings Collections (SC). A SC is like a profile, it contains a state of the set of all the settings, more precisely their current values. There can be more than one SC in use at the same time, and different SC's may contain different current values of the same settings. A SC can be identified by a Settings Collection ID (SID). All API functions modifying or retrieving settings has a SID parameter that defines the SC they relate to.

When the engine is initialized, these settings will be set to their default values and exactly one SC is created (with 0 ID). The integrating application can create its own SC's by kRecCreateSettingsCollection and delete them by kRecDeleteSettingsCollection.

After changing the value of a setting in a given SC, the new value remains in effect in that SC until it is changed again.

The same Settings Collections can be used from different threads. (Multi-threading is supported on: Windows, Linux.) Furthermore, one thread can use more than one Settings Collection. For more information, see the topic Multi-threading in RecAPI.

Most kRecGetXX functions have minimal documentation, because the description of their pair (kRecSetXX) contains the information.

The full range of current settings can be saved to file at any time from any SC through kRecSaveSettings or kRecSettingSave. Any number of such setting files can be stored and can be loaded later by kRecLoadSettings or kRecSettingLoad into a specified SC. The setting file is an ASCII file, it can be modified manually, but it is recommended to avoid this and to use the API functions for changing setting values, because there are some setting types whose values are specially converted to string format.

The kRecSetDefaults and kRecSettingSetToDefault functions can be used to re-initialize all settings of the Engine to their default values.

IMPORTANT NOTE: Loading a settings file changes only the value of the settings that are in the file. Thus if a setting missing from the file was changed before loading, its value is not affected by the loading operation. If the settings file does not contain all the settings, the setting status as it was at saving time can be fully reproduced by calling kRecSettingSetToDefault before kRecSettingLoad. See kRecSettingLoad and kRecSettingSave for details.

Note
The following sample code demonstrates the most important operations of the settings.
int MySpecialInit ()
{
HSETTING hdtxt_outformat, hmy_output_name;
RECERR err = REC_OK;
DTXTOUTPUTFORMATS dtxt_outformat = DTXT_TXTS;
int my_session = kRecCreateSettingsCollection(0);
//Creating a string setting (the NULL root is equal to the root of the whole
//tree). This setting will not be saved into a file (DONTSAVE flag).
err = kRecSettingCreateString(&hmy_output_name, NULL, "MyIni.Output.Name",
STSFLG_DONTSAVE, "path/out.txt");
...
//Loading a setting file.
err = kRecSettingLoad(my_session, "last_opt.sts");
...
//Getting the handle of a setting. The passed name must be relative to the
//root of the query, which is equal to the root of the whole tree here. The INTBOOL parameter
//has_setting (here NULL) indicates whether the node has a setting or not.
err = kRecSettingGetHandle(NULL, "Kernel.DTXT.DirectTxtFormat", &hdtxt_outformat, NULL);
if (err == REC_OK)
//Getting the value of an enum (int) setting.
err = kRecSettingGetInt(my_session, hdtxt_outformat, (int *)&dtxt_outformat);
...
//Setting the value of our own string setting created above.
switch (dtxt_outformat)
{
case DTXT_TXTF:
err = kRecSettingSetString(my_session, hmy_output_name, "path/rtf/out.txt");
break;
case DTXT_TXTCSV:
err = kRecSettingSetString(my_session, hmy_output_name, "path/html/out.csv");
break;
case DTXT_IOTPDF:
err = kRecSettingSetString(my_session, hmy_output_name, "path/pdf/out.pdf");
break;
case DTXT_XMLCOORD:
err = kRecSettingSetString(my_session, hmy_output_name, "path/xml/out.xml");
break;
case DTXT_BINARY:
err = kRecSettingSetString(my_session, hmy_output_name, "path/html/out.bin");
break;
default:
//Setting the value to default. (FALSE is for indicating that only the given
//setting must be set to default and not the whole subtree, whose root is the given
//setting.)
err = kRecSettingSetToDefault(my_session, hmy_output_name, FALSE);
}
...
//Every initialisation step of this function is done in the session created
//above. Thus it must be retrieved to a location outside this function.
return my_session;
}
DTXTOUTPUTFORMATS
DTXTOUTPUTFORMATS
DTXT output formats.
Definition KernelApi.h:9582
DTXT_BINARY
@ DTXT_BINARY
Definition KernelApi.h:9588
DTXT_TXTF
@ DTXT_TXTF
Definition KernelApi.h:9585
DTXT_XMLCOORD
@ DTXT_XMLCOORD
Definition KernelApi.h:9587
DTXT_TXTS
@ DTXT_TXTS
Definition KernelApi.h:9583
DTXT_IOTPDF
@ DTXT_IOTPDF
Definition KernelApi.h:9589
DTXT_TXTCSV
@ DTXT_TXTCSV
Definition KernelApi.h:9584
kRecCreateSettingsCollection
int RECAPIKRN kRecCreateSettingsCollection(int sid)
Creating a new Settings Collection.
kRecSettingSetString
RECERR RSTSAPI kRecSettingSetString(int sid, HSETTING sett, const char *new_value)
Setting the value of an STS_STRING or STS_USTRING setting.
kRecSettingCreateString
RECERR RSTSAPI kRecSettingCreateString(HSETTING *created_setting, HSETTING root_of_creation, const char *symb_name, unsigned int flags, const char *def_value)
Creating a string setting (STS_STRING).
kRecSettingSetToDefault
RECERR RSTSAPI kRecSettingSetToDefault(int sid, HSETTING sett, INTBOOL whole_subtree)
Setting the value to default.
kRecSettingGetInt
RECERR RSTSAPI kRecSettingGetInt(int sid, HSETTING sett, int *the_value)
Accessing the current value of an STS_INT or STS_ENUM or STS_BOOL setting.
kRecSettingGetHandle
RECERR RSTSAPI kRecSettingGetHandle(HSETTING root_of_query, const char *symb_name, HSETTING *ret_handle, INTBOOL *has_setting)
Getting the handle of a node.
STSFLG_DONTSAVE
#define STSFLG_DONTSAVE
It does not appear in any saved file.
Definition KrnStsApi.h:334
HSETTING
struct RECSTSSTRUCT * HSETTING
Handle of a setting.
Definition KrnStsApi.h:287
kRecSettingLoad
RECERR RSTSAPI kRecSettingLoad(int sid, LPCTSTR filename)
Loading settings.
Note
The function kRecQuit removes all the Settings Collections, pending and user settings, and sets the remaining settings to default, so the setting states are the same after every subsequent kRecQuit - kRecInit pair. In previous versions of CSDK the kRecQuit did not do these steps, thus after a subsequent kRecInit all the settings existed and had the same value as before the previous kRecQuit. We think, the integrating applications generally want the situation after any kRecInit to be the same, that is why this change of operation was performed. If the integrating application expect the v15 behavior (e.g. it was developed under CSDK 15), this can be simulated also in CSDK v16 or later doing the next workaround: Before kRecQuit:
  1. save the required setting values from the required Settings Collections,
After kRecInit:
  1. create all the required user settings,
  2. create the required Settings Collections,
  3. load the proper setting files into the proper Settings Collections.

Progress indication

Typically the most time-consuming processes invoked by the Engine are the recognition processes and the final output document generation. In some particular cases, other processes like image loading or image preprocessing might also take considerable time.

Sometimes it is advisable to provide the application user with feedback about these processes. The application can register callback procedures for progress monitoring with the kRecSetCBProgMon function. The Engine will invoke the registered callback procedure during processing with a pointer to a PROGRESSMONITOR structure containing information about the current process. The application can provide progress indication with this procedure. If the callback function returns a value other than REC_OK, it signals an interruption of the current process. This can be used to provide the application user with a cancel button.


RecAPI: Pages

  • Introducing RecAPI
  • Tutorial
  • Page-level processing
Pages

The page-level processing means that the basic unit of processing is typically the page, which can be accessed through the handle HPAGE. HPAGE stores a lot of page-related data and information: e.g. the images of the page in different processing phases, zones (areas of the page where the recognition runs), the recognition results (letters, lines, frames). Thus most of the functions require a page as an input parameter.

The Engine can manage more than one page at the same time, as performed by Image Handling Module. Any limit to the number of pages in the subsystem depends on the size of available physical memory and the size of the swap file used as the virtual memory. The Engine can manage and process images of the page within its own memory space only, that is, images need to be loaded into the Engine with the help of the Image File Handling Module.

Within the Engine images can be black-and-white (B/W), grayscale or color.

The unique HPAGE handle is generated by the Engine when the image of the page is loaded. Before quitting, the application should free all pages created in the Image Handling Module (kRecFreeImg).

Image loading

There are three ways to load the image of a page into a HPAGE:

  • from a file,
  • from the memory of the integrating application,
  • from a scanner.

Loading from a file

The Image File Handling Module is responsible for this method.

The function kRecLoadImgF loads an image directly from a file.

The Image File Handling Module provides another way to load image files. This is useful mainly for loading multipage image files, because in such a case, the kRecLoadImgF opens the file page by page. But the given file can be opened calling kRecOpenImgFile. In this case, the page can be loaded from the opened file calling kRecLoadImg page by page. After loading the required pages of the file, it can be closed by kRecCloseImgFile.

A wide range of image file types can be used in CSDK both for loading and saving. For more information, see Image file format list. At loading, some conversion may be performed on the image, which is called primary image conversion.

Note
The following sample shows a simple multi-page image file processing:
RECERR rc;
// Open a multi-page image file.
HIMGFILE hIFile;
rc = kRecOpenImgFile("testfile.tif", &hIFile, IMGF_READ, (IMF_FORMAT)0);
// Get the number of pages
int pageCount;
rc = kRecGetImgFilePageCount(hIFile, &pageCount);
// Process the pages.
HPAGE hPage;
for (int i=0; i<pageCount; i++)
{
rc = kRecLoadImg(0, hIFile, &hPage, IMGF_NEXTPAGE);
...
// Process the current page (preprocess, recognize,
// output conversion, etc.)
}
// Close image file.
rc = kRecCloseImgFile(hIFile);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
HIMGFILE
struct tagIMGFILEHANDLE * HIMGFILE
Handle of image files.
Definition KernelApi.h:11244
IMGF_NEXTPAGE
#define IMGF_NEXTPAGE
The next page of a HIMGFILE.
Definition KernelApi.h:11503
IMF_FORMAT
IMF_FORMAT
Image formats.
Definition KernelApi.h:11179
kRecCloseImgFile
RECERR RECAPIKRN kRecCloseImgFile(HIMGFILE hIFile)
Closing an image file.
kRecLoadImg
RECERR RECAPIKRN kRecLoadImg(int sid, HIMGFILE hIFile, HPAGE *phPage, int iPage)
Loading a page from an opened image file.
kRecGetImgFilePageCount
RECERR RECAPIKRN kRecGetImgFilePageCount(HIMGFILE hIFile, int *lpPageCount)
Getting the number of pages in an image file.
kRecOpenImgFile
RECERR RECAPIKRN kRecOpenImgFile(LPCTSTR pFilename, HIMGFILE *pHIMGFILE, int mode, IMF_FORMAT filetype)
Opening an image file.
IMGF_READ
#define IMGF_READ
Opening file for reading only. The file can be shared. (Use it with kRecOpenImgFile....
Definition KernelApi.h:11253

Loading from the memory of the integrating application

The Image File Handling Module and Image Handling Module are responsible for this method.

The function kRecLoadImgM can be used for loading an image from the memory of the integrating application.

When loading a Windows DIB (device-independent bitmap), the integrating application should set the lineorder, the padding and the order of the color components of the image settings as follows:

rc = kRecSetImgFormat(0, BOTTOM_UP, PAD_DWORDBOUNDARY, COLOR_BGR);
kRecSetImgFormat
RECERR RECAPIKRN kRecSetImgFormat(int sid, IMG_LINEORDER lineord, IMG_PADDING padding, IMG_RGBORDER ord)
Setting image format.
COLOR_BGR
@ COLOR_BGR
Definition KernelApi.h:422
PAD_DWORDBOUNDARY
@ PAD_DWORDBOUNDARY
Definition KernelApi.h:409
BOTTOM_UP
@ BOTTOM_UP
Definition KernelApi.h:394

There are two other ways for transferring an image from the application's memory to the Engine's memory space: either a line-by-line method or when the whole image is transferred at once (or at least in big chunks).

The latter method requires that you create an empty image first, using the kRecCreateImg function and then to transfer chunks of the application's bitmap into the image by invoking the kRecPutImgArea function that can place the bitmap area into the image frame, stretching or compressing it, as necessary.

To transfer an application’s bitmap to the Engine line-by-line (e.g. during a fax transmission), the following steps should be taken. First, the kRecStartWriteImg function has to be invoked with the address of a filled IMG_INFO structure that describes the size, the resolution, and the bits per pixel value of the image. It is not necessary to specify the BytesPerLine field and if the number of lines is not known, the Size.cy field can be zero. The kRecSetImgFormat can be used for specifying the line order, the RGB order and the padding, before initiating the line-by-line image transfer.

Subsequent calls to the kRecWriteImg does the real work by adding lines to the image. The integrating application should call the kRecStopWriteImg function when all the lines have been transferred and you want to indicate this fact to the engine. As a result, you will get a new HPAGE.

If the image being loaded is a B/W one, the representation of black pixels in the application memory bitmap should be ONE (1), while the whites should be zero (0). If the image in memory is the opposite (1=white, 0=black) the application can invert the data first or use SDK preprocessing functions to invert the image after it has been loaded into Engine memory. (See Preprocessing)

Loading from a scanner.

The Scanning Module is responsible for this method. The Scanning Module is supported on: Windows

When scanning is required, the Engine's scanning subsystem must be initialized separately. The reason for this additional initialization is that the scanning subsystem can work on its own without the recognition or other non-essential modules. It supports a wide selection of scanner models through TWAIN or WIA.

There is no point in initializing the scanning subsystem if there is no working scanner connected to the computer.

Preparing the scanning subsystem for scanning requires the following steps:

  • The scanning subsystem must be initialized for current scanning by the kRecScanInit function. Any other scanning function can only be called after the successful initialization of the scanning subsystem.
  • The scanner type must be set through the kRecScannerWizard function that will launch the Scanner Setup Wizard.

To initiate a scanning session, call the initializing kRecScanInit function, to terminate the running of the scanning subsystem call the kRecScanQuit function.

After having initialized the scanning subsystem and adjusting particular scanning parameters (if required), the application uses the function kRecLoadImg with the special input parameter IMGF_SCANNER. Of course, this special type of usage requires neither opening (kRecOpenImgFile) nor closing (kRecCloseImgFile). The Engine loads the image from the scanner into a HPAGE.

Once the application is aware of the scanning capabilities of the installed scanner driver/type, the application can adjust or learn the current scanning parameter settings by accessing the kRecSetScanXX and kRecGetScanXX functions, respectively. For example, one of the most important settings specifies what kind of image the scanner provides, i.e. whether the image output from the scanner should be B/W, grayscale or color. This setting can be specified through the kRecSetScanBitsPerSample function and it can be retrieved by kRecGetScanBitsPerSample.

Saving images

Saving to a file

If the integrating application requires saving a whole page image (or a portion of it) to a file, this can be done in similar ways to the loading.

It is possible to save the image directly into a file using kRecSaveImgF or kRecSaveImgAreaF.

The other way is to open a new file calling kRecOpenImgFile, to save pages into this file using kRecSaveImg or kRecSaveImgArea, and to close the file (kRecCloseImgFile).

When saving an image, the application programmer must specify the format and compression method for the output image file (see IMF_FORMAT or Image file format list). When a multi-page image file format is the destination using the first way, the method of saving should be specified: overwrite the current contents or append to it. If you are unsure whether the chosen image file format supports multi-page image files you can determine this with the kRecIsMultipageImgFileFormat function.

The Capture SDK supports the following multi-page image file formats for writing: DCX, MAX, TIFF and image-only PDF.

Similarly, to avoid problems, the application can check whether the selected image file format can accommodate the current image with the kRecMatchImgFileFormat function. The application can determine for example, whether the selected output can accommodate grayscale images.

Saving to the memory of the integrating application

The images stored in the Engine cannot be manipulated directly by the integrating application since the Engine incorporates its own Image Handling Module. Internally the images are usually kept in compressed mode in the Engine's memory and only uncompressed when necessary. When the application requires a part of an image or the whole image, e.g. for visualization purposes, it can get it by invoking the kRecGetImgArea function.

If the image is a B/W one, the representation of black pixels in the created bitmap will be ONE (1), while the whites will be zero (0), i.e. for displaying the image use the NOTSRCCOPY raster operation code. The (0,0) point of the image coordinate system is always the upper left corner of the image.

The kRecSetImgFormat function can be used to specify how the application would like to get the new image in its memory space. With this function the application can specify the line order, the padding and – for color images – the RGB order attributes of the new image.

If the image area to be copied also needs to be rotated and/or mirrored, use kRecRotateImgArea as an alternative to kRecGetImgArea.

To perform reading an image line-by-line from the Engine's memory space and transfer it to the application, the functions kRecStartReadImg, kRecReadImg and kRecStopReadImg work similarly to the line-by-line writing described in the topic Loading from the memory of the integrating application.

Preprocessing

As mentioned, the HPAGE contains different phases of the loaded image. There are some functions in the Image Handling Module, which work on a particular phase of each image. For specifying one of these phases, use the identifier IMAGEINDEX. The function kRecGetImgInfo gives information about the given phase image of the page.

If the primary image conversion during loading does not run a secondary image conversion may be required, because the recognition process runs on B/W images. This latter conversion type can be called through kRecConvertImg2BW or implicitly. The implicit secondary image conversion may be required if the integrating application asks for a B/W image or for an operation running on B/W images (e.g. the recognition itself), but it has not been created before in the given HPAGE. The primary image conversion mode can be selected by the User through kRecSetImgConvMode. A secondary conversion is influenced by kRecSetImgBinarizationMode.

Before zoning and recognizing (or even saving) a page, SDK functions can be used to apply some image pre-processing procedures to enhance the quality of an image resulting in more accurate auto-zoning and recognition. This is typically done with the function kRecPreprocessImg, which can include any or all of the following steps:

  • Inversion: automatic, programmed or none;
  • Rotation: automatic, programmed or none;
  • Deskewing: automatic, programmed or none.

The following functions let you define the behavior of these image enhancement steps: kRecSetImgInvert, kRecSetImgRotation, kRecSetImgDeskew and kRecSetImgSlope.

In addition to these operations, sometimes image despeckling and resolution enhancement are also performed internally to improve the success of image pre-processing.

The image pre-processing functions can also be called one by one as the following:

  • inverting - kRecInvertImgArea,
  • rotating - kRecRotateImg,
  • deskewing - kRecDeskewImg,
  • despeckling - kRecDespeckleImg,

and there are some functions for doing user-defined transformations: kRecTransformImgXX.

When the application calls any of these functions, the appropriate image enhancement step is immediately performed on the image of the page and the result is available to both the Engine and the application as described in the detailed description of each such function.

For more information, see the description of the above mentioned functions and that of the following types:

  • inverting - IMG_INVERT,
  • rotating - IMG_ROTATE,
  • deskewing - IMG_DESKEW,
  • resolution enhancement - IMG_RESENH.

Zoning

The Zone Handling Module is responsible for creating and handling zones.

The zone is a rectangular area or the union of specifically located rectangular areas in the page. The upper limit of its dimensions is full page size. The zone contains a feature of interest to the User. The union of rectangles must have a so-called pizzabox shape: the top of each rectangle in the union must touch the bottom of the above rectangle (i.e. the bottom of the upper rectangle and the top of the lower one is exactly the same). A rectangle can touch at most one rectangle above and one below. A pizzabox-shaped zone is a compound and irregular zone.

The image data covered by each zone is handled and processed (typically recognized) separately, according to zone-specific parameters. These parameters are collected in the structure ZONE.

NOTE: In both the SDK and its documentation, coordinates refer to grid-coordinates - i.e. the top or left borders of pixels. Thus a rectangle does not contain the pixels according to its right and bottom coordinates.

Any HPAGE can contain two types of zones in zone lists:

  • user zones and
  • OCR zones.

The characterizing attributes of a zone are the following:

  • size and position,
  • index of the zone (identifies the zone in the appropriate zone list),
  • type (determines the role of the zone in the image layout, i.e. Flowed text, Rotated text, Vertical text, Table, Form or Graphic),
  • filling method (specifies the nature of the zone content, i.e. how the zone's area was supposed to be filled originally),
  • recognition method (the recognition module to be applied for the zone),
  • a Character Set filter,
  • what kind of spell checking is enabled for the zone content.

If the recognition module and/or filling method are not specified (RM_AUTO, FM_DEFAULT), Engine-level pre-defined settings contain the values determining the processing of such zones (kRecSetDefaultRecognitionModule, kRecSetDefaultFillingMethod).

The user zones are defined by the User. The OCR zones are created by the page parser process, which detects the OCR zones and fills the OCR zone list. When there are user zones, the page parser creates one or more OCR zones from each user zone and it may process the area outside the user zones, as controled by the page descriptor.

The type of OCR zones can be only WT_FLOW, WT_TABLE, WT_FORM or WT_GRAPHIC. The created OCR zones always inherit the attributes (e.g.: filter, filling method, etc.; see ZONETYPE) of the user zone inside which they were created. If the OCR zone is created outside of user zones, its attributes will be set to default for filling method, recognition module, filters and spell checking related properties.

The recognition process (kRecRecognize) works on OCR zones.

The number of zones in the zone lists can be queried at any time using the functions kRecGetZoneCount and kRecGetOCRZoneCount. All functions that use an index to determine the zone to be queried or modified may receive the index -1. This refers to the last zone in the given zone list. Exception: kRecInsertZone : this inserts the new zone behind the currently last zone that receives -1).

Zones can be added to the zone list of any given HPAGE in three different ways:

  1. add zones automatically (auto-zoning) - use it to add OCR zones
  2. add zones manually (by specifying the zone coordinates and attributes - use it to add user zones, or
  3. add zones from a zone file (a storage file) - use it to add user zones.

Auto-zoning

The automatic page-layout decomposition process (auto-zoning) can be activated directly by calling the kRecLocateZones function for finding text blocks on the image. It creates an entire OCR zone list for the given HPAGE.

OmniPage Capture SDK offers three different algorithms to be applied during auto-zoning: use the kRecSetDecompMethod function to specify which of these Page parser algorithms should be applied during auto-zoning. For details, see also IMG_DECOMP.

In some cases, the process will attempt to find horizontal and vertical rule lines.

OCR zones may be changed by the recognition process (kRecRecognize), because some post-processing operations have such effects. For example, when non-gridded table detection (kRecSetNongriddedTableDetect) runs during the recognition process.

Any zone can be locally overridden with the functions kRecUpdateZone and kRecUpdateOCRZone. These allow you to change the attributes of a zone in the zone list. Note that the fields ZONE::rectBBox, and ZONE::type cannot be modified by kRecUpdateOCRZone.

Adding zones manually

You can choose to search for zones automatically, and/or create your own zones: user zones. To add simple zones to the zone list manually, use the kRecInsertZone function. To add/subtract a rectangle to/from an existing user zone, use the functions kRecAddZoneRect or kRecSubZoneRect.

Note
The following code sample demonstrates the creation of user zones and the results of the above operations (two rectangles are added, but the subtraction produces a result that can only be described by three rectangles fulfilling the requirements of the pizzabox shape):
It is recommended to use the function memset for filling a ZONE structure with zero before setting its fields. In such a way, a WT_FLOW zone is created with default fields, thus the application must set only the non-default fields before inserting the zone.
RECERR rc;
// Create a zone structure.
ZONE zone;
memset(&zone,0,sizeof(ZONE));
zone.fm=FM_OMNIFONT;
zone.rm=RM_OMNIFONT_MOR;
zone.filter=FILTER_ALL;
zone.rectBBox.left=100;
zone.rectBBox.right=500;
zone.rectBBox.top=100;
zone.rectBBox.bottom=200;
// Add it to the page.
rc = kRecInsertZone(hPage, II_CURRENT, &zone, 0);
// Extends the zone with a new area.
RECT rect;
rect.left=100;
rect.right=300;
rect.top=200;
rect.bottom=600;
rc = kRecAddZoneRect(hPage, II_CURRENT, &rect, 0);
// Removes an area from the zone.
rect.left=200;
rect.right=300;
rect.top=400;
rect.bottom=600;
rc = kRecSubZoneRect(hPage, II_CURRENT, &rect, 0);
// Get the zone's layout.
int nRects;
RECT *rects;
rc = kRecGetZoneLayout(hPage, II_CURRENT, &rects, &nRects, 0);
// Print the zone's layout.
for(int i=0;i<nRects;i++)
{
printf("%i. rect: Left:%i Top:%i Right:%i Bottom:%i\n",
i,rects[i].left,rects[i].top,rects[i].right,rects[i].bottom);
}
// Free up the layout information given back by the kRecGetZoneLayout function.
rc = kRecFree(rects);
...
// The generated output:
// 0. rect: Left:100 Top:100 Right:500 Bottom:200
// 1. rect: Left:100 Top:200 Right:300 Bottom:400
// 2. rect: Left:100 Top:400 Right:200 Bottom:600
FILTER_ALL
@ FILTER_ALL
Definition KernelApi.h:763
kRecFree
RECERR RECAPIKRN kRecFree(void *pArray)
Freeing memory objects.
II_CURRENT
@ II_CURRENT
Definition KernelApi.h:1001
kRecInsertZone
RECERR RECAPIKRN kRecInsertZone(HPAGE hPage, IMAGEINDEX iiImg, LPCZONE pZone, int nZone)
Inserting a user zone.
kRecGetZoneLayout
RECERR RECAPIKRN kRecGetZoneLayout(HPAGE hPage, IMAGEINDEX iiImg, LPRECT *ppRects, int *pnRects, int iZone)
Getting user zone shape information.
kRecSubZoneRect
RECERR RECAPIKRN kRecSubZoneRect(HPAGE hPage, IMAGEINDEX iiImg, const RECT *pRect, int nZone)
Subtracting a rectangle from a user zone.
kRecAddZoneRect
RECERR RECAPIKRN kRecAddZoneRect(HPAGE hPage, IMAGEINDEX iiImg, const RECT *pRect, int nZone)
Adding a rectangle to a user zone.
RM_OMNIFONT_MOR
@ RM_OMNIFONT_MOR
Definition KernelApi.h:612
FM_OMNIFONT
@ FM_OMNIFONT
Definition KernelApi.h:558
_ZONE
ZONE structure.
Definition KernelApi.h:1675
_ZONE::rm
RECOGNITIONMODULE rm
Definition KernelApi.h:1688
_ZONE::rectBBox
RECT rectBBox
Definition KernelApi.h:1676
_ZONE::fm
FILLINGMETHOD fm
Definition KernelApi.h:1687
_ZONE::filter
CHR_FILTER filter
Definition KernelApi.h:1690

The following figure shows the progression of the above sample code.

Adding zones from a zone file

The third way of creating zones is to have zones read from a file (called a zone file) that contains the attributes of previously saved zones. Zones created this way will also be user zones. An integrating application can save the current user zone definitions to a zone file any time with the kRecSaveZones function. The application can load them from a zone file with the kRecLoadZones function.

NOTE: When a zone file is loaded, any previous zones are removed from the page.

Modifying zones

If the application calls the kRecRecognize recognizing function on a page with an empty zone list, the page-layout decomposition function is called automatically.

To get information about any particular zone in the image zone list, invoke the kRecGetZoneInfo and kRecGetOCRZoneInfo functions. These functions are useful to find out more about zones created by auto-zoning.

NOTE: When you update a table-type zone with the kRecUpdateZone function, the cell-detection algorithm will not be activated, resulting in improper table detection within the zone. See the description of creation of table information.

Any changes in the user zone list (kRecInsertZone, kRecDeleteZone, kRecDeleteAllZones, kRecAddZoneRect, kRecSubZoneRect, kRecLoadZones, kRecUpdateZone, kRecSetZoneLayout) will make OCR zones invalid, the OCR zone list will be emptied and regenerated.

Note
The following code selects an exact recognition engine (DOT) for all the OCR zones before recognition:
// Page parsing.
RECERR rc = kRecLocateZones(0, hPage);
// Get the number of zones.
int nZones;
rc = kRecGetOCRZoneCount(hPage, &nZones);
// Cycle through zones.
for(int i=0; i<nZones; i++)
{
// Get zone information.
ZONE zone;
rc = kRecGetOCRZoneInfo(hPage, II_CURRENT, &zone, i);
// Change zone filling method and recognition module.
if(zone.type != WT_GRAPHIC)
{
zone.fm = FM_DRAFTDOT9;
zone.rm = RM_DOT;
}
// Change the zone.
rc = kRecUpdateOCRZone(hPage, II_CURRENT, &zone, i);
}
...
rc = kRecRecognize(0, hPage, NULL);
kRecRecognize
RECERR RECAPIKRN kRecRecognize(int sid, HPAGE hPage, LPCTSTR pFilename)
Recognizing a page.
kRecGetOCRZoneInfo
RECERR RECAPIKRN kRecGetOCRZoneInfo(HPAGE hPage, IMAGEINDEX iiImg, LPZONE pOCRZone, int nOCRZone)
Getting OCR zone information.
kRecUpdateOCRZone
RECERR RECAPIKRN kRecUpdateOCRZone(HPAGE hPage, IMAGEINDEX iiImg, LPCZONE pZone, int nZone)
Updating the OCR zone.
kRecGetOCRZoneCount
RECERR RECAPIKRN kRecGetOCRZoneCount(HPAGE hPage, int *pnOCRZones)
Getting the OCR zone count.
kRecLocateZones
RECERR RECAPIKRN kRecLocateZones(int sid, HPAGE hPage)
Page parsing.
WT_GRAPHIC
@ WT_GRAPHIC
Definition KernelApi.h:1559
RM_DOT
@ RM_DOT
Definition KernelApi.h:614
FM_DRAFTDOT9
@ FM_DRAFTDOT9
Definition KernelApi.h:561
_ZONE::type
ZONETYPE type
Definition KernelApi.h:1679

Page descriptor

The page description describes the possible layout elements (text, table, graphics and form) on the page outside of the user zones. These layout elements are found by the page-parse and the recognition processes. The page description has no effect inside the user zones. The LZ_COLUMN / LZ_TABLE / LZ_GRAPHICS flags specify how to find text / table / graphic zones.

For more information see the detailed description in Usage of Page Descriptor.

Table detection

The Table Recognition Module detects tables on the page and assigns the appropriate parts of the recognition results to each table cell, based on the collected table information.

A table is described by the list of its cells in reading order (from left to right and top to bottom) ordered by their top-left coordinates. A cell is always a rectangle, thus a table is a sequence of rectangles.

All cell operations must adhere to the following restrictions:

  • cells cannot have blank spaces between them,
  • cells cannot intersect each other
  • all cells must have a rectangular shape.

Table information in a table zone (WT_TABLE) contains the above mentioned table description. (See CELL_INFO.) The structure of a table zone can be determined in three different ways:

  • User-defined: creating a one-cell table structure (kRecCreateTableInfo) into a WT_TABLE user zone. Having such table information the User can insert splitters into it (kRecSplitCells), or can replace the cell list to a User-defined cell sequence (kRecSetCells). Note that kRecSetCells creates the table information, if kRecCreateTableInfo has not run beforehand.
  • User-started: calling kRecLocateTable for a WT_TABLE user zone before recognition. The module automatically detects the structure of the table covered by the given zone and creates the table information.
  • Engine-controlled: the recognition process automatically detects and creates the table information for all such WT_TABLE user zones that have not been processed by the previous two methods and for all the automatically detected table type OCR zones.

The User-started method is less accurate than the Engine-controlled one, thus it may be useful only when automatic cell detection is required before recognition (mainly for displaying on the UI).

The Engine-controlled method leaves the existing cell sequence, if any. In contrast, the User-started method recreates the cell sequence of the user zone even if the zone already contains table information.

It follows from the above that the Engine-controlled method can be disabled calling kRecCreateTableInfo.

It is also possible to detect tables having invisible cell-separators (so-called non-gridded tables); see the description in kRecSetNongriddedTableDetect.


RecAPI: Recognition

  • Introducing RecAPI
  • Tutorial
  • Page-level processing
Recognition

The Engine can load a number of recognition modules. It is license-dependent whether a given recognition engine is accessible or not. For information about licensing, please see the General Information help system. The User can control the engine running in a given ZONE. This allows the integrating application to perform "multi-module" recognition on any page.

NOTE: The modules MTX, DOT, MAT, HNR are supported on: Windows, MOR and RER are supported on: Windows, Linux and MacOS x64.

The enum RECOGNITIONMODULE lists all the possible recognition modules; these are tightly integrated to the Engine:

  • PLUS3W omnifont module for machine-printed text (most accurate),
  • PLUS2W omnifont module for machine-printed text,
  • MTX omnifont module for machine-printed text,
  • MOR multi-language omnifont module for machine-printed text,
  • FRX multi-languange omnifont module for machine-printed text,
  • HNR module for handprinted digits,
  • RER third-party module for handprinted alphanumerical characters,
  • DOT module for 9-pin draft dot-matrix printouts,
  • OMR module for optical marks (checkmarks),
  • MAT matrix matching module,
  • BAR module for 1D and 2D barcodes.

The RER recognition module is third-party component.

The rm field of any user zone should contain one of the element of the above mentioned enum type. There is a special one: RM_AUTO means that the Engine will choose the module most likely to be appropriate. It does this first of all by consulting the filling method set for the zone.

The FILLINGMETHOD describes the type of data expected in the zone, e.g. a barcode, a handprinted or a machine generated text. A degree of auto-detection is available for filling method, with the kRecDetectFillingMethod function, useful when the precise filling method used on incoming documents may not be known in advance. It is the User's responsibility to specify a valid recognition module-filling method pair. Any incorrectly set zone will have no recognition result.

RM_AUTO reads the filling method; if only one recognition module is suitable, it is used. When there is a choice, RM_AUTO uses various checks (character set, image size, etc.) to select the best one. Thus, it protects against an invalid FM-RM pair.

If the recognition module is not present when it is needed, the recognition function (kRecRecognize) returns with API_MODULEMISSING_ERR, and there will be no recognized data for the zone concerned. To avoid risk of this, we recommend checking the presence and correct installation of the necessary recognition modules by calling kRecGetModulesInfo right after the Engine's initialization.

The recognition process is typically initiated by the function kRecRecognize. The other way is to call the function kRecProcessPages. The former processes an already loaded page, the latter gets one or more image files as input.

Both methods work on the zones of the page. Internally, the recognition process operates on B/W images. If the loaded image is not a B/W one, the required conversion is performed during the loading or preprocessing.

The kRecProcessPages function is a so-called one-touch processing function or one-step function, because it performs the image loading (either from files or from scanner), the preprocessing, the loading of user zones (if specified), the recognition and the output conversion started by only one User calling. Furthermore, this one calling is enough to process more than one image. Of course, the one-touch function uses the usual settings.

The document level processing also has one-touch solutions.

The recognition result is stored in the letter array of the HPAGE. The Recognition Data Handling Module is available for its maintenance. Each recognized character is represented by a LETTER structure containing all the accessible information about the given character (character code, position, size, confidence of the recognition, additional possible tips, font information, formatting information, etc.). This recognition data is directly accessible by kRecGetLetters; it is also the input for the output conversion.

The LETTER structure contains an err field for reporting the confidence of the recognized character. This is a combined value and if its value is 64 or greater the character is considered as suspicious. Of course, this is only a recommended value. For more information, see confidence issues. Another tool for reporting accurately the opinion of the recognition engine(s) is the use of alternatives. The running recognition engine may have more than one tip for each character. In this case, LETTER provides access to the higher-order choices of the character code. For more information, see the usage of alternatives.

Note
The following code sample recognizes a page and prints the recognition result onto the standard output marking the suspicious characters.
RECERR rc;
...
// Load image.
HPAGE hPage;
rc = kRecLoadImgF(0, "testimage.tif", &hPage, 0);
// Preprocess image.
rc = kRecPreprocessImg(0, hPage);
// Locate zones.
rc = kRecLocateZones(0, hPage);
// Recognize image.
rc = kRecRecognize(0, hPage, NULL);
// Get recognition result.
LETTER *pLetters;
long nLetters;
rc = kRecGetLetters(hPage, II_CURRENT, &pLetters, &nLetters);
// Print recognition result.
for(int i=0;i<nLetters;i++)
{
if (pLetters[i].code == UNICODE_REJECTED)
putwchar(L'~');
else if (pLetters[i].code == UNICODE_MISSING)
putwchar(L'^');
else
putwchar(pLetters[i].code);
if (pLetters[i].err >= RE_SUSPECT_THR)
putwchar(L'*');
}
// Free up recognition results given back by the kRecGetLetters function.
rc = kRecFree(pLetters);
// Free up page.
rc = kRecFreeImg(hPage);
...
UNICODE_REJECTED
#define UNICODE_REJECTED
The rejected symbol in Unicode strings. See kRecSetRejectionSymbol and kRecGetRejectionSymbol.
Definition KernelApi.h:1405
UNICODE_MISSING
#define UNICODE_MISSING
The missing symbol in Unicode strings. See kRecSetMissingSymbol and kRecGetMissingSymbol.
Definition KernelApi.h:1406
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecFree
RECERR RECAPIKRN kRecFree(void *pArray)
Freeing memory objects.
kRecPreprocessImg
RECERR RECAPIKRN kRecPreprocessImg(int sid, HPAGE hPage)
Image preprocessing.
kRecFreeImg
RECERR RECAPIKRN kRecFreeImg(HPAGE hPage)
Removing a page.
II_CURRENT
@ II_CURRENT
Definition KernelApi.h:1001
kRecLoadImgF
RECERR RECAPIKRN kRecLoadImgF(int sid, LPCTSTR pFilename, HPAGE *phPage, int nPage)
Loading a page directly from an image file.
RE_SUSPECT_THR
#define RE_SUSPECT_THR
Suspect threshold: if the lower 7 bits of LETTER::err represent a value at or above this (up to 100) ...
Definition KernelApi.h:1908
kRecGetLetters
RECERR RECAPIKRN kRecGetLetters(HPAGE hPage, IMAGEINDEX iiImage, LPLETTER *ppLetter, LPLONG pLettersLength)
Getting recognition result.
kRecRecognize
RECERR RECAPIKRN kRecRecognize(int sid, HPAGE hPage, LPCTSTR pFilename)
Recognizing a page.
kRecLocateZones
RECERR RECAPIKRN kRecLocateZones(int sid, HPAGE hPage)
Page parsing.
LETTER
The LETTER structure.
Definition KernelApi.h:1932

OCR performance issues

There are different issues to be taken into account when you want to improve accuracy. Typically they also have consequences for the processing speed.

  • Image quality - This is one of the most important factors that influences accuracy. A resolution of 300 dpi or 400 dpi is best for recognition. Use image preprocessing to enhance the quality of the given image to get more accurate auto-zoning and recognition. Load grayscale or color images into the Engine without any primary conversion (see IMG_CONVERSION for more information) and combine this with image preprocessing in order to get more accurate output. Our OCR produces more accurate result on grayscale or color images, because they give greater bit info than B/W images. In addition, the OCR engines are adapted to the result of our own binarization methods.
  • Auto-zoning algorithm to be applied - If auto-zoning is needed, use DCM_STANDARD, the most accurate page parser available in the Engine. On the other hand, in some complex cases it might require significantly more time to complete. If processing speed is also important, consider using the algorithm DCM_LEGACY. Finally, use DCM_FAST, when the processing speed has a higher priority than accuracy and the image content of the originals is simple enough (e.g. good quality letters without graphics or tables). In this case, it is recommended to disable the non-gridded table detection algorithm (kRecSetNongriddedTableDetect).
  • Correct RM-FM choice - The most suitable filling method and recognition module should be specified, as described above. If more than one recognition module supports a given filling method, consider whether it is better to specify the recognition module in your program rather than accept the setting selected by the Engine through the RM_AUTO option.
  • Trade-off settings - These are set at page level, and determine how thorough the recognition should be, i.e. whether more time can be taken to try for higher accuracy or not. There are three possible values: TO_ACCURATE, TO_BALANCED, TO_FAST and these are passed to the kRecSetRMTradeoff function.
  • Module specific settings - The behavior, and hence accuracy, of some recognition modules can be influenced by separate module-specific settings. See the list of all the RecAPI settings and the following functions:
    • barcode recognition: kRecSetBarTypes - The barcode module auto-detects the barcode type. This function can be used to limit the acceptable choices. If it is certain that only one type will be used, it is possible to validate only that type. By default, five main types are enabled.
    • HNR module: kRecSetHnrParams, kRecSetHnrStyle - Accuracy can be improved if the application can tell the module the precise location of characters (e.g. they occur in a structured form with comb or cell boxes). If this can't be done, the module will auto-detect their positions. It is also possible to specify European or American handwriting style. To recognize zones with hand-written numbers and no letters, consider choosing RM_HNR rather than RM_RER.
    • MOR, PLUS2W and PLUS3W modules: kRecSetMorFaxed - For poor-quality fax output, the fax compensation can be used.
    • OMR module: kRecSetOmrParams - This module has a setting to indicate whether checkbox borders will be visible or invisible in the loaded image. A value for mark sensitivity can also be given.
    • MAT and RER modules: These modules can be influenced through an optional RM-specific parameter file. This allows settings not supported by the Engine programming interface to be communicated to these modules. (See the proper setting of each module.)
  • Character Set - This determines at zone level which set of characters should be considered as valid. By eliminating characters that are known not to appear in the zone, accuracy can be improved. If non-validated character shapes are encountered in a zone, they are either replaced by the rejection symbol or forced to a similar-shaped validated character. A major component of the Character Set is the language choice. Setting the wrong language(s) and/or language dictionary (or leaving unneeded ones enabled) is likely to slow down recognition and reduce accuracy considerably. See below.
  • Training - The omnifont recognition modules accept training files through kRecSetTrainingFileName. It's worth using a training file if there are some repeatedly misformed characters in a series of uniformly degraded documents, or the module repeatedly misreads a certain character. Training files can be created as a result of a training session performed in a Capture SDK based application, which incorporates the training feature of the TEC Text Editor Control. Training of recognition modules is supported on: Windows, Linux.
  • Spell Checking Module - Disabling the checking may speed up the recognition a bit, but it causes worse accuracy. See the section Checking for more information.
  • Disabling timeout - Specifying the INFINITE timeout value (kRecSetTimeOut) disables the watch-dog mechanism in the Engine. Disabling the timeout feature may speed up the recognition a little bit. This speed-up is likely to be significant only when recognizing a lot of small-size images successively.

Character set limitation and the checking module both influence accuracy, but in different ways. Both, either or none of them can be used; the integrator should decide which balance is best. Their effects, when used separately, can be summarized as follows:

  • Limiting the character set: recognition results outside the character set are not used.
  • Checking with changing: recognition results outside the checking rules are less likely; both suspicious results and changed items are flagged.
  • Checking without changing: text appears as recognized, but suspicious results are flagged.

Limiting the character set gives the program greatest decision power, using the checking module to only flag errors is safest, but requires more post-processing outside the Engine to check all non-conforming cases.

A typical balance would be to impose broad restrictions by limiting the character set, e.g. specifying the permissible languages, but using the checking module for detailed control over parts of the recognized text where it's important that the original data be recognized and passed for checking precisely as it was written (e.g. for an ID Code incorporating a check-digit function). This later checking should make it possible to determine whether any error is due to optical recognition errors or was originally invalid.

Defining the character set

The Language, Character Set and Code Page Handling Module is responsible for this area.

You can improve text recognition accuracy by narrowing the range of characters valid for recognition. This way the Engine does not always have to choose its solutions from more than 550 characters in the Engine's Total Character Set. (The multi-language omnifont MOR recognition module supports all of these characters; other recognition modules recognize fewer of them.) The character set concept is documented in detail in the topic Character Set in the Engine. Broadly, the set is compiled as follows:

  • Language environment - This involves selecting one or more of the available languages with the kRecSetLanguages function and optionally additional characters validated individually with the kRecSetLanguagesPlus function. Selecting only needed language(s) has a major impact. For example, selecting German only immediately INVALIDATES the Cyrillic and Greek alphabets and over 150 other unneeded accented letters. For more information, tables and descriptions see the related pages of this module. Note that the default selected language is English.
  • Recognition module capabilities - Defining a recognition module for processing a zone may also restrict the available languages or characters within the Language environment. For example, RER cannot read Russian, and the HNR recognition module cannot process letters at all.
  • Filtering - The CSDK provides filters (CHR_FILTER) to further narrow down the character set, by enabling only certain character classes, e.g. digits, uppercase letters etc. The value FILTER_ALL means no filtering.
  • Re-Expanding - An application may require exceptions to the filter rule. The most flexible way to re-expand the character set with individual characters after filtering is to specify them with a call to kRecSetFilterPlus and validate them with the FILTER_PLUS flag in the required zones.
  • Zone-level modification - In addition to the global, page-level definition of the character set, the choice of recognition module, filling method, filtering and use of the expansion string can be fine-tuned on a local, zone level (of course, only for OCR zones created from user zones). Auto-located zones will be set to take the global filter settings. Local filtering and expansion (with FILTER_PLUS) can be set in the zone's filter field. The possible local filter values are the same as the global ones, with an extra one: FILTER_DEFAULT. If this is the only one set, the zone inherits the global filter setting.

Statistics

The integrating application can retrieve timing and other statistical information about the last processed image. This may include:

  • time used to load the image in the Engine’s memory space,
  • time used for pre-processing the image, if any,
  • time used for auto-zoning of the image, if any,
  • time that the image spent in the different recognition modules during recognition, if any,
  • recognition time measured till producing the recognition result,
  • number of recognized characters on the image,
  • number of recognized words on the image,
  • number of rejected characters on the image.

The application calls kRecGetStatistics for this purpose. The fields of the STATISTIC structure will be filled with the relevant information on return.

The structure contains the latest accessible information about each listed statistics field, i.e. if recognition has not run yet on the current HPAGE, but has run on the previous one, the structure contains the data of the previous recognition.

All timing data is measured in milliseconds.


RecAPI: Checking

  • Introducing RecAPI
  • Tutorial
  • Page-level processing
Checking

The Spell Checking Module is mainly used to achieve better accuracy in the recognized output text and/or to make proofing more effective. Its services are closely integrated into the recognition process, they are activated internally either during the recognition (by some recognition modules) or immediately after the recognition process. That is why all the checking-related settings have to be set BEFORE calling the recognition process.

The checking subsystem consists of the following three independent parts:

  • Spell checking: using language-specific dictionary elements,
  • UD-checking: checking against the user dictionary (with words, strings).

Any combination of these parts is possible during the recognition process as steps in determining the acceptability of words. The most important API function in controlling the checking module is the kRecSetSpell function. This function is used to enable or disable the running of the checking module. Note that the use of these checkings can still be enabled or disabled separately at zone level. The disabling of checking may speed up the recognition a bit, but causes worse accuracy.

Spell checking

Spell checking uses third-party language-specific spell checkers. There are two kinds of the spell checkers:

  • Language dictionaries ("language checking"), and
  • Vertical dictionaries ("vertical language checking").

The Capture SDK is delivered with over 20 different language dictionaries. These are generic language dictionaries; they typically contain between 100,000 and 200,000 entries. Vertical dictionaries apply to special professions and in the toolkit they can be treated as extensions to the language dictionaries, though they can even be used when no language dictionary is specified. The Capture SDK is delivered with 9 different Vertical dictionaries for three professions (financial, medical and legal) in four languages (English, German, French and Dutch).

For enumerating the language and vertical dictionaries, use the function pairs kRecGetFirstSpellLanguage, kRecGetNextSpellLanguage and kRecGetFirstVerticalDict, kRecGetNextVerticalDict respectively.

Specifying the Spelling language (kRecSetSpellLanguage) and/or a Vertical dictionary (kRecSetVerticalDictionaries) is a global setting (of course it may differ in different Settings Collections). Once a language dictionary has been specified, the language checking will be applied to all zones on the page, except any user zones with the CHK_LANGDICT_PROHIBIT flag (i.e. the checking can be disabled at zone level). Similarly, once a vertical dictionary has been specified, the vertical language checking will be applied to all zones on the page, except any user zones with the CHK_VERTDICT_PROHIBIT flag.

When the spelling language is set to LANG_NO or LANG_UD, or when it specifies a language for which there is no language dictionary, the language checking will not be activated for the zones of the page. In the special (default) case, when the specified spelling language is set to LANG_AUTO, the language checking will be performed based on the recognition language selection (kRecSetLanguages) as follows:

  • If the recognition language selection is empty, there won't be language checking.
  • If one recognition language has been set, that language will be automatically selected for language checking assuming that the appropriate language dictionary is available.
  • If two or more languages are selected for recognition, language checking will be done for all selected languages, for which a language dictionary is available.
Note
The following example shows how to improve the performance of OCR on pages containing Dutch legal text:
RECERR rc;
...
rc = kRecSetSpellLanguage(0, LANG_DUT);
VDICTDESC setdesc="Dutch Legal Dictionary";
rc = kRecSetVerticalDictionaries(0, &setdesc, 1);
...
LANG_DUT
@ LANG_DUT
Definition KernelApi.h:1121
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecSetVerticalDictionaries
RECERR RECAPIKRN kRecSetVerticalDictionaries(int sid, VDICTDESC *names, int nNames)
Setting vertical dictionaries.
VDICTDESC
char VDICTDESC[DICTDESCLEN]
Type for storing the description of a vertical dictionary.
Definition KernelApi.h:10407
kRecSetSpellLanguage
RECERR RECAPIKRN kRecSetSpellLanguage(int sid, LANGUAGES SpellLang)
Setting spell language.

UD-checking

The checking module also makes use of a user dictionary. A user dictionary is a collection of user-specific elements, the so-called UDitems. UDitem is a word as in the case of any wordprocessor's user dictionary. A string being checked will be accepted if it conforms to at least one item of the user dictionary. The User Dictionary can be given by kRecSetUserDictionary.

If the application uses spell checking and it consistently encounters words marked as uncertain that are spelled correctly, or it is known that the document contains many proper nouns, the application can reduce unwanted marking and improve recognition accuracy by performing UD-checking, to supplement the spell checking (assuming that the user dictionary has been prepared previously by adding the required words to it). In this case the UD-checking is complementary to the spell checking.

UD-checking without spell checking enabled is typically used in form-like applications (e.g. questionnaires), i.e. where the data to be recognized is highly structured and follows predictable patterns.

For particular user zones the UD-checking can be disabled with the CHK_USERDICT_PROHIBIT flag.

The checking subsystem can handle two kinds of User dictionaries: native dictionary files (created or updated by a previous kRecSaveUD call), and word-list file (a text file containing words, one in each line).

Compiling and changing a user dictionary requires that the application specify a user dictionary file with the kRecSetUserDictionary function followed by a call to the kRecOpenMaintenanceUD function. At this point the content of the user dictionary can be listed, and items can be added (kRecAddItemUD) or removed (kRecDeleteItemUD) on request until kRecCloseMaintenanceUD is called. The kRecGetUDState function can be used to learn whether there has been any change since the User dictionary was last opened for maintenance. Changes can be made permanent by calling the kRecSaveUD function, before closing.

A new user dictionary can be created by calling the kRecSetUserDictionary function with a NULL parameter.

UDitems of the currently opened user dictionary can be enumerated with the kRecGetFirstItemUD, kRecGetNextItemUD function-pair.

The opened user dictionary must be closed before recognition.

Note
The following code sample creates a new user dictionary.
RECERR rc;
...
// A word.
LPCWSTR item = L"OmniPage";
// Remove active user dictionary.
rc = kRecSetUserDictionary(0, NULL, NULL);
// Start user dictionary maintenance mode.
rc = kRecOpenMaintenanceUD(0);
// Add an item.
rc = kRecAddItemUD(0, NULL, item, 0);
// Save changes.
rc = kRecSaveUD(0, "testud.dic", FALSE);
// Stop user dictionary maintenance mode.
rc = kRecCloseMaintenanceUD(0);
// Use new user dictionary.
rc = kRecSetUserDictionary(0, "testud.dic", NULL);
...
kRecOpenMaintenanceUD
RECERR RECAPIKRN kRecOpenMaintenanceUD(int sid)
Opening user dictionary for editing.
kRecSetUserDictionary
RECERR RECAPIKRN kRecSetUserDictionary(int sid, LPCTSTR pFilename, LPCTSTR pDefaultSection)
Setting user dictionary.
kRecAddItemUD
RECERR RECAPIKRN kRecAddItemUD(int sid, LPCTSTR pSection, LPCWSTR pUDitem, DWORD itemattrib)
Adding an item to the user dictionary.
kRecCloseMaintenanceUD
RECERR RECAPIKRN kRecCloseMaintenanceUD(int sid)
Closing a user dictionary opened for editing.
kRecSaveUD
RECERR RECAPIKRN kRecSaveUD(int sid, LPCTSTR pFilename, UDSAVESTYLE saveStyle)
Saving user dictionary.


RecAPI: Output

  • Introducing RecAPI
  • Tutorial
  • Page-level processing
Output

Code page

One of the Engine's settings is the code page, which can be accessed through the functions kRecSetCodePage and kRecGetCodePage, respectively. The Language, Character Set and Code Page Handling Module is the module responsible for its handling.

Recognized characters are stored internally in the Engine in their UNICODE representation. The current code page is taken into account either when converting a character to/from this UNICODE representation, or when converting the recognition data to the final output document. The first needs to be done with the kRecConvertCodePage2Unicode or kRecConvertUnicode2CodePage calls.

The output conversion process performs character code conversions from UNICODE into the current code page while producing the final output document.

The kRecGetFirstCodePage and the kRecGetNextCodePage function-pair can be used to enumerate the list of available code pages.

There can be conflicts between the set of characters validated for recognition (see the topic Defining the character set) and the code page selection; a selected code page may not support some characters. For example, if you select the Hungarian language and the current code page is Windows ANSI (code page 1252), the final output document will not contain some accented characters for that language. Use the kRecCheckCodePage function to check whether the current code page setting contains all the characters of the current Language environment (language selection, the LanguagesPlus characters), and any characters listed as FilterPlus characters. The output of kRecCheckCodePage is a string of characters not supported by the current code page (non-supported characters). If there are non-supported characters when output conversion is performed, the Engine tries to replace non-supported characters with somewhat similar shaped ones in the final output document. This substitution does not work in all cases; mainly it is good for replacing non-supported accented characters with un-accented ones. The final output document will contain a missing symbol in the place of characters that were recognized correctly but could not be either exported or substituted.

The application can call kRecSetMissingSymbol to define which character from the current code page should be used to indicate a missing symbol.

Output conversion

The page-level processing contains only simple output converters (because of page level requirements). The Direct TXT Output Converter Module is responsible for realizing this step of the page processing. The functions kRecSetDTXTFormat and kRecGetDTXTFormat provide access to the setting specifying the output converter. The selected output converter can be any of the following (DTXTOUTPUTFORMATS):

  • binary - non-formatted binary data,
  • standard text,
  • comma separated text,
  • formatted text,
  • image-on-text PDF,
  • simple XML.

The working of each converter can be fine-tuned through settings.

The integrating application can call the output conversion by kRecConvert2DTXT.

Note
More complex and more accurate conversion can be performed by the converters of the document level.
The following code sample processes a multi-page image file (loading, preprocessing, recognizing and output conversion) containing Hungarian text. The recognition results of all the pages are inserted into only one output document:
RECERR rc;
...
HPAGE *hPages;
HIMGFILE hIFile;
int pageCnt, i;
// Selecting Hungarian language
LANGUAGES langs[LANG_SIZE];
memset(langs, 0, sizeof(LANGUAGES)*LANG_SIZE);
langs[LANG_HUN] = LANG_ENA;
rc = kRecSetLanguages(0, langs);
// Selecting the codepage for Hungarian language
rc = kRecSetCodePage(0, "Windows Eastern");
// Load image.
rc = kRecOpenImgFile("multipage.tif", &hIFile, IMGF_READ, (IMF_FORMAT)0);
// Get number of pages.
rc = kRecGetImgFilePageCount(hIFile, &pageCnt);
// Create an array for the pages.
hPages = new HPAGE[pageCnt];
// Cycle through the pages.
for(i=0;i<pageCnt;i++)
{
// Load current page.
rc = kRecLoadImg(0, hIFile, &(hPages[i]), i);
// Preprocess image.
rc = kRecPreprocessImg(0, hPages[i]);
// Recognize image.
rc = kRecRecognize(0, hPages[i], NULL);
}
// Close file.
rc = kRecCloseImgFile(hIFile);
// Set conversion format to PDF image on text.
rc = kRecSetDTXTFormat(0, DTXT_IOTPDF);
// Convert all the pages into a PDF file.
rc = kRecConvert2DTXT(0, hPages, i, "multipage.pdf");
// Free up memory.
for(i=0;i<pageCnt;i++)
rc = kRecFreeImg(hPages[i]);
delete[] hPages;
...
kRecSetLanguages
RECERR RECAPIKRN kRecSetLanguages(int sid, const LANG_ENA *pLanguages)
Setting languages.
LANG_ENA
LANG_ENA
Language enable/disable.
Definition KernelApi.h:1051
kRecSetCodePage
RECERR RECAPIKRN kRecSetCodePage(int sid, LPCTSTR pCodePageName)
Setting the code page.
LANGUAGES
LANGUAGES
Possible languages.
Definition KernelApi.h:1106
LANG_SIZE
@ LANG_SIZE
Definition KernelApi.h:1275
LANG_HUN
@ LANG_HUN
Definition KernelApi.h:1140
kRecSetDTXTFormat
RECERR RECAPIKRN kRecSetDTXTFormat(int sid, DTXTOUTPUTFORMATS dFormat)
Changing DTXT format.
kRecConvert2DTXT
RECERR RECAPIKRN kRecConvert2DTXT(int sid, const HPAGE *ahPage, int nPage, LPCTSTR pFilename)
Converting pages with DTXT.
DTXT_IOTPDF
@ DTXT_IOTPDF
Definition KernelApi.h:9589
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecPreprocessImg
RECERR RECAPIKRN kRecPreprocessImg(int sid, HPAGE hPage)
Image preprocessing.
kRecFreeImg
RECERR RECAPIKRN kRecFreeImg(HPAGE hPage)
Removing a page.
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
HIMGFILE
struct tagIMGFILEHANDLE * HIMGFILE
Handle of image files.
Definition KernelApi.h:11244
IMF_FORMAT
IMF_FORMAT
Image formats.
Definition KernelApi.h:11179
kRecCloseImgFile
RECERR RECAPIKRN kRecCloseImgFile(HIMGFILE hIFile)
Closing an image file.
kRecLoadImg
RECERR RECAPIKRN kRecLoadImg(int sid, HIMGFILE hIFile, HPAGE *phPage, int iPage)
Loading a page from an opened image file.
kRecGetImgFilePageCount
RECERR RECAPIKRN kRecGetImgFilePageCount(HIMGFILE hIFile, int *lpPageCount)
Getting the number of pages in an image file.
kRecOpenImgFile
RECERR RECAPIKRN kRecOpenImgFile(LPCTSTR pFilename, HIMGFILE *pHIMGFILE, int mode, IMF_FORMAT filetype)
Opening an image file.
IMGF_READ
#define IMGF_READ
Opening file for reading only. The file can be shared. (Use it with kRecOpenImgFile....
Definition KernelApi.h:11253
kRecRecognize
RECERR RECAPIKRN kRecRecognize(int sid, HPAGE hPage, LPCTSTR pFilename)
Recognizing a page.


RecAPI: Document-level processing

  • Introducing RecAPI
  • Tutorial
Document-level processing

The document-level processing is supported on: Windows, Linux, Embedded Linux, MacOS.

This level is performed by the API layer RecAPIPlus. It uses a document-oriented approach built up on the basis of page-level processing. Thus, the Developer of a document-oriented integrating application calls both KernelAPI and RecAPIPlus functions. This layer provides all the features and capabilities of KernelAPI extended with the offering of a greater number of output converters and of handling multipage documents. The output converters give more accurate layout in various output formats. The multipage document handling can explore the connectivity and similarity of consecutive pages in the same document.

IMPORTANT! This tutorial on document-level processing presents some operations that are accessible only at document level or that are different when applied at document level.

The simplest running application is the following (it loads a file test.tif and after recognition, creates an RTF2000 output out.rtf - all settings take default values):

#include "RecAPIPlus.h"
int main()
{
RECERR rc = REC_OK;
rc = RecInitPlus(YOUR_COMPANY, YOUR_PRODUCT);
if (rc != REC_OK && rc != API_INIT_WARN && rc != API_LICENSEVALIDATION_WARN)
printf("Initialization error occured: %x\n", rc);
else
{
char image[] = "test.tif";
LPCSTR imgptr[2] = {image, NULL};
rc = RecProcessPagesEx(0, "out.rtf", imgptr, NULL, NULL);
if (rc != REC_OK)
printf("Processing error occured: %x\n", rc);
rc = RecQuitPlus();
if (rc != REC_OK)
printf("Quitting error occured: %x\n", rc);
}
return kRecGetLastError(NULL, NULL, 0);
}
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecGetLastError
RECERR RECAPIKRN kRecGetLastError(LONG *pErrExt, LPTSTR pErrStr, int buflen)
Getting last error.
API_INIT_WARN
@ API_INIT_WARN
Module initialization warning.
Definition RECERR_doc.h:67
REC_OK
@ REC_OK
Successful operation, no error.
Definition RECERR_doc.h:20
API_LICENSEVALIDATION_WARN
@ API_LICENSEVALIDATION_WARN
License cannot be validated.
Definition RECERR_doc.h:95
RecProcessPagesEx
RECERR RECAPIPLS RecProcessPagesEx(int sid, LPCTSTR pDocFile, LPCTSTR *pImageFiles, LPONETOUCH_CB pCallback, void *pContext)
Load, Preprocess, Recognize, Format, Export input images.
RecQuitPlus
RECERR RECAPIPLS RecQuitPlus(void)
Uninitialize the RecAPIPlus.
RecInitPlus
RECERR RECAPIPLS RecInitPlus(LPCTSTR pCompanyName, LPCTSTR pProductName)
Initialize the RecAPIPlus.


RecAPI: Basics

  • Introducing RecAPI
  • Tutorial
  • Document-level processing
Basics

The document-level processing is supported on: Windows, Linux, Embedded Linux, MacOS.

Initialization

Any operation of the Capture SDK is accessible only after an initialization step, performed by RecInitPlus (on this layer), which determines the available modules of the Engine, initializes them and starts all the modules that are licensed and found in the Engine Binary directory.

The initialization step has a quitting pair RecQuitPlus. If the integrating application uses the initialization of the document-level API it has to use the quitting at the same level.

Having successfully initialized the Engine, the next step is to check the availability of the required modules of the Engine, that can be performed using the calls of page-level API.

If the integrating application uses scanners it also has to initialize the Scanning Module using the page-level API. Of all the Engine modules, only the Scanner Module requires separate initialization.

An alternative way to use the document-level API of the Capture SDK is dynamic linking using the module RecAPIPlusS.

Threading

Multi-threading is supported on: Windows, Linux.

See the page-level description.

As an additional possibility for affecting threading, the integrating application can determine the number of OCR threads used during document recognition (RecSetOCRThreadCount, RecGetOCRThreadCount).

Setting handling

See the page-level description.

There are settings accessible only at document level. See the settings of RecAPIPlus.


RecAPI: Document

  • Introducing RecAPI
  • Tutorial
  • Document-level processing
Document

The document-level processing is supported on: Windows, Linux, Embedded Linux, MacOS.

The document is a page container containing a set of pages HPAGE in User-defined order. The document can be accessed through handles HDOC, which can come from the creation of a new document (RecCreateDoc) or from the opening of an existing one (RecOpenDoc). The integrating application can insert pages into a document (RecInsertPage) or remove them (RecDeletePage). To modify a document, open it with RecOpenDoc. The document always must be closed (RecCloseDoc). The recognition should be run on pages. The aim of the document is only to collect the recognized pages so they are passed to the output conversion as a unit.

The recognition of each HPAGE is performed by kRecRecognize of the page-level processing. Another way to recognize pages is to use one-step processing, but it works at page level and not document level.

The integrating application can also save the document into an OPD file (the format of the application ScanSoft OmniPage 2025) or load a document from such a file.

When the document is ready, the application can export it by RecConvert2Doc. The format of the created output file can be set by RecSetOutputFormat. The Capture SDK provides many format-specific settings and fine-tuning controls that influence the properties of the output document. For more information, see the topic output.

Note
The following example shows a typical multi-page processing:
RECERR rc;
HPAGE hPage;
HIMGFILE hIFile;
HDOC hDoc;
int pageCnt, i;
// Initialize engine.
rc = RecInitPlus(YOUR_COMPANY, YOUR_PRODUCT);
// Create a new document.
rc = RecCreateDoc(0, "test.opd", &hDoc, DOC_NORMAL);
// Load image.
rc = kRecOpenImgFile("multipage.tif", &hIFile, IMGF_READ, (IMF_FORMAT)0);
// Get number of pages.
rc = kRecGetImgFilePageCount(hIFile, &pageCnt);
// Cycle through the pages.
for(i=0;i<pageCnt;i++)
{
// Load current page.
rc = kRecLoadImg(0, hIFile, &hPage, i);
// Preprocess image.
rc = kRecPreprocessImg(0, hPage);
// Recognize image.
rc = kRecRecognize(0, hPage, NULL);
// Add page to document. Don't have to free up HPAGE, because RecInsertPage frees it up.
rc = RecInsertPage(0, hDoc, hPage, -1);
}
// Close file.
rc = kRecCloseImgFile(hIFile);
// Set output format and level.
rc = RecSetOutputFormat(0, "Converters.Text.Rtf2000");
rc = RecSetOutputLevel(0, OL_FLOWINGPAGE);
// Convert document to and RTF file
rc = RecConvert2Doc(0, hDoc, "test.rtf");
// Close document.
rc = RecCloseDoc(0, hDoc);
// Stop engine.
rc = RecQuitPlus();
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecPreprocessImg
RECERR RECAPIKRN kRecPreprocessImg(int sid, HPAGE hPage)
Image preprocessing.
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
HIMGFILE
struct tagIMGFILEHANDLE * HIMGFILE
Handle of image files.
Definition KernelApi.h:11244
IMF_FORMAT
IMF_FORMAT
Image formats.
Definition KernelApi.h:11179
kRecCloseImgFile
RECERR RECAPIKRN kRecCloseImgFile(HIMGFILE hIFile)
Closing an image file.
kRecLoadImg
RECERR RECAPIKRN kRecLoadImg(int sid, HIMGFILE hIFile, HPAGE *phPage, int iPage)
Loading a page from an opened image file.
kRecGetImgFilePageCount
RECERR RECAPIKRN kRecGetImgFilePageCount(HIMGFILE hIFile, int *lpPageCount)
Getting the number of pages in an image file.
kRecOpenImgFile
RECERR RECAPIKRN kRecOpenImgFile(LPCTSTR pFilename, HIMGFILE *pHIMGFILE, int mode, IMF_FORMAT filetype)
Opening an image file.
IMGF_READ
#define IMGF_READ
Opening file for reading only. The file can be shared. (Use it with kRecOpenImgFile....
Definition KernelApi.h:11253
kRecRecognize
RECERR RECAPIKRN kRecRecognize(int sid, HPAGE hPage, LPCTSTR pFilename)
Recognizing a page.
HDOC
struct RECDOCSTRUCT * HDOC
Document handle.
Definition RecAPIPlus.h:244
RecCloseDoc
RECERR RECAPIPLS RecCloseDoc(int sid, HDOC hDoc)
Close an OmniPage document.
RecInsertPage
RECERR RECAPIPLS RecInsertPage(int sid, HDOC hDoc, HPAGE hPage, int iPage)
Insert an HPAGE as a new page into a document.
RecCreateDoc
RECERR RECAPIPLS RecCreateDoc(int sid, LPCTSTR pDocFile, HDOC *phDoc, int mode)
Create an OmniPage document file or folder.
RecConvert2Doc
RECERR RECAPIPLS RecConvert2Doc(int sid, HDOC hDoc, LPCTSTR pOutputFilename)
Convert and export an OmniPage document to the final output document.
DOC_NORMAL
#define DOC_NORMAL
Normal Storage mode: The document is a compound file. This mode is supported on: Windows....
Definition RecAPIPlus.h:253
RecQuitPlus
RECERR RECAPIPLS RecQuitPlus(void)
Uninitialize the RecAPIPlus.
RecInitPlus
RECERR RECAPIPLS RecInitPlus(LPCTSTR pCompanyName, LPCTSTR pProductName)
Initialize the RecAPIPlus.
RecSetOutputLevel
RECERR RECAPIPLS RecSetOutputLevel(int sid, OUTPUTLEVEL outLevel)
Set the level of format retention for the final output document.
RecSetOutputFormat
RECERR RECAPIPLS RecSetOutputFormat(int sid, LPCTSTR pFormatname)
Set the output format.
OL_FLOWINGPAGE
@ OL_FLOWINGPAGE
Definition RecAPIPlus.h:1130


RecAPI: One-step processing

  • Introducing RecAPI
  • Tutorial
  • Document-level processing
One-step processing

The document-level processing is supported on: Windows, Linux, Embedded Linux, MacOS.

As with the page-level function kRecProcessPages, the aim of the document level one-step functions is to perform the image loading (either from files or from scanner), the preprocessing, the loading of user zones (if specified), the recognition and the output conversion started by only one User calling. Furthermore, this one calling is enough to process more than one image.

The document level provides a wider scale of choices than the page level, because it makes it possible to process workflow files created by the application ScanSoft OmniPage 15 or higher or ITest (RecExecuteWorkflow). This file describes workflow steps and their order for batch-like operation of the Capture SDK.

Of course, the document level gives a one-step function similar to that of the page level. This is the RecProcessPagesEx. In fact, it provides more than kRecProcessPages only in the output conversion, because it can use the output conversion for the document level.

Note
For an example code, see the general description of the document level.


RecAPI: Output

  • Introducing RecAPI
  • Tutorial
  • Document-level processing
Output

The document-level processing is supported on: Windows, Linux, Embedded Linux, MacOS.

The RecAPIPlus layer provides a very rich set of output formats for creating output files with layout as close as possible to that of the original.

All the accessible converters have an individual subtree in the setting tree (see setting handling) under the node "Converters" with a lot of adjustable settings. Because of this, the selection of the output format can be performed through the name of the required converter (e.g "Converters.Text.RTF2000") calling RecSetOutputFormat. The name of the selected converter can be retrieved by RecGetOutputFormat.

The accessible output formats can be enumerated by RecGetFirstOutputFormat, RecGetNextOutputFormat.

The formatting level of the output document can be set calling RecSetOutputLevel and can be got by RecGetOutputLevel. This setting makes it possible to determine how similar the output document should be compared to the original page in connection with the arrangement of the elements (text, images, lines, etc.) on the page.

The settings of each converter can be adjusted by the integrating application through the Settings Manager Module.

Note
The following code fragment enumerates the accessible output formats and prints some information about them.
RECERR rc = REC_OK;
char buffer[128];
OUTPUTCONVERTERINFO info;
int i=0;
rc = RecGetFirstOutputFormat(buffer,128);
while(rc == REC_OK)
{
RecGetOutputFormatInfo(buffer, &info);
printf("%i: Type:%s, Name: %s, Extension:%s\n",i,buffer,info.Name, info.Ext);
i++;
rc = RecGetNextOutputFormat(buffer,128);
}
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
REC_OK
@ REC_OK
Successful operation, no error.
Definition RECERR_doc.h:20
RecGetOutputFormatInfo
RECERR RECAPIPLS RecGetOutputFormatInfo(LPCTSTR pFormatName, OUTPUTCONVERTERINFO *pInfo)
Get information about the specified output document format converter.
OUTPUTCONVERTERINFO
#define OUTPUTCONVERTERINFO
Output document converter information.
Definition RecAPIPlus.h:1088
RecGetFirstOutputFormat
RECERR RECAPIPLS RecGetFirstOutputFormat(LPTSTR pFormatname, int len)
Start the enumeration of the output formats.
RecGetNextOutputFormat
RECERR RECAPIPLS RecGetNextOutputFormat(LPTSTR pFormatname, int len)
Continue the enumeration of the output formats.


RecAPI: Sample applications

  • Introducing RecAPI
  • Tutorial
Sample applications

Different sample applications can be available for OmniPage Capture SDK. Some of these sample applications exist on different platforms, other ones are supported on: Windows. For detailed information, see the following pages:


RecAPI: Summary of the RecAPI Samples for Windows

  • Introducing RecAPI
  • Tutorial
  • Sample applications
Summary of the RecAPI Samples for Windows

C Sample Viewer

The SAMPLESC.EXE Sample Viewer Application for the OmniPage Capture Development System serves to give a better understanding of the concepts behind its functionality. It lets you view and run several code fragments representing typical constituent tasks of the toolkit.

To launch the Sample Application, select Start / Programs / OmniPage Capture SDK / RecAPI Sample Viewer App - C.

Then you can choose the sample code desired through the scrollbar. Now you can

  • Examine the source of the sample code.
  • Run the sample code fragment.
  • View the input image file, if any.
  • View the recognized text, if any.

The application also lists the RecAPI functions involved in the selected code fragment. Highlighting any of them and then activating the Help button results in the function reference being displayed.

You can rebuild the entire application by opening the Visual Studio solution file:

<CaptureSDK_Installation_Path>\Samples\MyCApp100.sln

This project is prepared to be compiled and linked without making any change in the C source files or in the settings of the project.

For debugging the application in Visual Studio, please open the Project Settings dialog box, and set at the Debug tab, the "Executable for debug session" edit box to:

<CaptureSDK_Installation_Path>\BIN\MY_SAMPLESC.EXE

See the list of samples for detailed description about each sample.

Sample .NET: .NET Sample Viewer Application

This application contains almost all the samples of C Sample Viewer recreated in C# language and compiled in .NET Framework. The access of the C# sample codes is analogous to that of the C sample codes. These C# samples use the RecAPI P/Invoke interface.


RecAPI: On the sample project for Linux

  • Introducing RecAPI
  • Tutorial
  • Sample applications
On the sample project for Linux

The C Sample Viewer Application of OmniPage Capture SDK serves to give a better understanding of the concepts behind its functionality. It lets you view and run several code fragments representing typical constituent tasks of the toolkit.

You can select a command line application or a GTK-based UI application for studying the samples.

In both applications, you can choose the sample code you want to study. You can get some information about the selected sample:

  • description of sample,
  • input and output files,
  • used RecAPI functions.

See the list of samples for a detailed description about each sample.

For getting the applications, you should make them using the Makefile in the sample folder. Compiling will be successful only after filling two empty strings (at the LICENSE_PATH macro and the #include) in the file sample.h and cutting out the #error command.

You can make the command line application with the following commands.

mkdir sample
cd sample
cp /usr/local/src/omnipage-csdk-\currentdottedversion/* .
make
./sample -h

The command line option -h writes a short help on how to use the command line application. Running it without any command line option, it shows the number and title of the available samples.

Note
See the supplied Makefile for the use of OCRLIBPATH and OCRINCPATH. The makefile chooses the paths according to the version of your g++ compiler. This automatic process is usually suitable, but you might modify it if it failed.


RecAPI: On the sample project for MacOS

  • Introducing RecAPI
  • Tutorial
  • Sample applications
On the sample project for MacOS

The C Sample Viewer Application of OmniPage Capture SDK serves to give a better understanding of the concepts behind its functionality. It lets you view and run several code fragments representing typical constituent tasks of the toolkit.

You can select a command line application or a Cocoa-based Objective C UI application for studying the samples.

In both applications, you can choose the sample code you want to study. You can get some information about the selected sample:

  • description of sample,
  • input and output files,
  • used RecAPI functions.

See the list of samples for a detailed description about each sample.

Command line sample

For getting the applications, you should make them using the Makefile in the sample folder. Compiling will be successful only after filling two empty strings (at the LICENSE_PATH macro and the #include) in the file sample.h and cutting out the #error command.

You can make the command line application with the following commands.

make
./sample -h

The command line option -h writes a short help on how to use the command line application. Running it without any command line option, it shows the number and title of the available samples.

Note
See the supplied Makefile for the use of OCRLIBPATH, OCRINCPATH, OCRRUNPATH and OCRLIBS. They are specified assuming that you will use the RunTime framework next to your application, from the ../Frameworks relative path. If you want to use it form e.g. /Library/Frameworks, you must change OCRRUNPATH setting it to that path.

Cocoa-based sample

You may build a Cocoa-based Objective C UI version of the Sample Viewer using XCode. This XCode project is located in the folder Sample/CocoaSamples.

You can find detailed description in Sample/CocoaSamples/HowTo_CocoaProjectWithCSDK.pdf about how to create a Cocoa-based project using Capture SDK. Build the sample program following those instructions. When you run the application, first check the path for the Sample files on the UI (next to the Start Text button). The path in the box must point to the Samples folder containing the input image files (and the CPP source files). With some versions of XCode this path might not be correct, in that case you must modify it before you start a test.


RecAPI: List of RecAPI C samples

  • Introducing RecAPI
  • Tutorial
  • Sample applications
List of RecAPI C samples

This page lists all C samples of RecAPI. Some of these samples are supported on: Windows, see the description of each sample for this information.

Sample 1: INITIALIZATION OF THE ENGINE.

Engine specific parameters.
Inquiry on Version and Serial numbers.
Inquiry on resident status of recognition modules.
Engine Timeout.
Modules of the Engine.
Termination of the Engine.

Sample 2: LOADING A LOW-RESOLUTION 24-BIT COLOR IMAGE FROM AN IMAGE FILE.

Inquiry on attributes of the image.
Convert the image to B/W with Resolution Enhancement option.
Saving the image in PNG format.
Getting textual and supplementary error information.

Sample 3: IMAGE PRE-PROCESSING IN ONE STEP: INVERTING, DESKEWING AND ROTATING.

Loading a B/W image from a one-page image file.
Forcing image inversion, automatic image rotation and deskewing.
Saving the pre-processed image.

Sample 4: IMAGE PREPROCESSING STEPS PERFORMED SEPARATELY.

Loading a noisy B/W image from a one-page image file.
Step 1: Despeckling the image.
Step 2: Rotating the image.
Step 3: Inverting the image.
Step 4: Deskewing the image.
Saving the pre-processed image.

Sample 5: SAVING PART OF AN IMAGE.

Loading a B/W image from a one-page image file.
Saving a portion of the image using a different image file format.

Sample 6: CREATING MULTI-PAGE IMAGE FILES.

Loading B/W images from one-page image files.
Saving the images into a single multi-page image file.
Inquiring the number of pages in a multi-page image file.

Sample 7: DISPLAYING AN IMAGE ON THE SCREEN.

Loading B/W images from one-page image files.
Exporting an image portion for displaying purposes.

Sample 8: RECOGNITION, CODE PAGES AND OUTPUT FORMATS.

Loading a B/W image from a one-page image file.
Enumeration of available code pages and output formats.
Specifying code page, output format and rejection symbol.
Converting a character code to its Unicode value.
Recognition and conversion to the output file specified.

Sample 9: RECOGNITION OF A MULTI-LINGUAL DOCUMENT.

Loading a B/W image from a one-page image file.
Specifying the Language environment (language selection and LanguagesPlus characters)
Recognition.
Conversion to Microsoft Word, retaining formatting information.

Sample 10: RECOGNITION USING CHARACTER SET FILTERING.

Loading a B/W image from a one-page image file.
Specifying the Language environment as the English characters.
Applying filters and the FilterPlus characters.
Saving all settings to a settings file for future use.
Recognition and conversion to the final output document.

Sample 11: RECOGNIZING, RECOGNITION STATISTICS.

Quick-recognizing a B/W one-page image file.
Inquiry and display of recognition statistics.

Sample 12: FORM PROCESSING VIA LFR.

Loading an unfilled, master form. Analyzing its layout and saving it as embedded form-template.
Loading a filled-in form of the same type and applying the saved form template on it.
Recognizing the filled-in form and accessing the recognition results through memory.
Saving the recognition result to an ASCII text file.

Sample 13: RECOGNIZING DOCUMENTS COMPILED FROM SEVERAL ONE-PAGE IMAGE FILES.

Recognizing B/W pages from several one-page image files.
Setting output format and code page. Wordprocessor output (Microsoft Word).

Sample 14: RECOGNIZING FROM MULTI-PAGE IMAGE FILE.

Recognizing all pages from a B/W multi-page image file.
Setting output format and code page.

Sample 15: HANDLING GRAY IMAGES. ADAPTIVE THRESHOLDING WHEN LOADING.

Loading a gray image file with automatic adaptive thresholding.
Recognition.

Sample 16: HANDLING GRAY IMAGES. SPECIFYING THRESHOLD VALUE.

Loading a grayscale image file with a specified threshold value.
Recognition.

Sample 17: WORKING WITH THE SCANNING MODULE.

Supported on: Windows.

Initializing and terminating the scanning module.
Inquiry on scanner characteristics.

Sample 18: SCANNING IN BLACK AND WHITE. ADJUSTING SCANNER SETTINGS.

Supported on: Windows.

Scanning a page in B/W, specifying some scanner parameters (resolution, brightness).
Saving the scanned image.

Sample 19: SCANNING IN BLACK AND WHITE WITH DEFAULT SCANNER SETTINGS.

Supported on: Windows.

Scanning a page in B/W with default scanner settings.
Recognizing the scanned image.

Sample 20: SCANNING IN GRAY. ADJUSTING SCANNER SETTINGS.

Supported on: Windows.

Inquiring and specifying different scanner parameters (resolution, grayscale level, brightness,
contrast, dropout color, scanning area). Scanning the gray image. Saving the image in gray.

Sample 21: SCANNING WITH ADF (Automatic Document Feeder).

Supported on: Windows.

Getting B/W pages from the scanner's ADF one after another with default scanner settings.
Handling missing or empty ADF situations.
Saving the pages into a multiple-page image file.

Sample 22: LINE-BY-LINE IMAGE TRANSFER (EXPORT)

Defining a portion of a B/W image.
Line-by-line transfer of a rectangular part of the image to the application through memory.

Sample 23: HANDLING ZONES. PAGE-LAYOUT ANALYSIS (AUTO-ZONING).

Loading a B/W image, auto-zoning.
Saving the zones to a zone file, loading another zone file, then recognizing the image.

Sample 24: AUTO-ZONING. ZONE PROPERTY DISPLAY.

Loading a B/W image, auto-zoning.
Retrieving and displaying zone properties.

Sample 25: INSERTING, UPDATING AND DELETING ZONES.

Loading a B/W image, auto-zoning.
Inserting a new zone, updating (modifying) an existing one and deleting a zone.

Sample 26: RECOGNIZING WITH CHECKING. SPELL CHECKING ENGLISH TEXT.

Setting the parameters of the checker to recognize and check English text.
Quick-recognizing a B/W image from a one-page image file and saving it.

Sample 27: SETTING TRADE-OFF. RECOGNIZING WITH CHECKING. SPELL CHECKING GERMAN TEXT.

Setting the parameters of the checker to recognize and check German text.
Specifying recognition trade-off.
Quick-recognizing a B/W image from a one-page image file.

Sample 28: LIST-TYPE ATTRIBUTES OF THE CAPTURE SDK.

Listing modules of the Engine, selectable languages,
code pages, installed language dictionaries, available output formats.

Sample 29: LOW LEVEL CUSTOM FORMATTING.

Recognizing an image into the memory.
Accessing low level recognition information (LETTER structures), manipulating it.
Custom converting the text into a file.

Sample 30: HANDWRITTEN NUMERAL RECOGNITION.

Supported on: Windows.

Defining a page-sized zone for handwritten numeral recognition.
Defining a local filter to validate digits only, excluding the plus and minus signs, the comma and the period.
Recognizing handwritten numbers from a B/W image.

Sample 31: HANDWRITTEN TEXT RECOGNITION.

Supported on: Windows.

Loading a B/W image containing handwritten English text.
Creating a page-sized zone for handwritten text recognition.
Defining a local filter to validate uppercase letters and digits only.
Recognizing and saving the result.

Sample 32: RECOGNIZING WITH UD-CHECKING. MAINTAINING THE USER DICTIONARY.

Creating a new user dictionary.
Adding items to the user dictionary.
Converting character codes to UNICODE.
Recognition using the user dictionary only.

Sample 33: SCANNING WITH AUTOMATIC ADAPTIVE THRESHOLDING.

Supported on: Windows.

Asking whether the scanner supports grayscale.
Scanning in gray.
During the loading process the image will be automatically converted to B/W.
Saving the loaded image.

Sample 34: LETTER STRUCTURE OUTPUT. RECOGNIZING OPTICAL MARKS.

Loading an image. Loading a Zone file.
Recognizing optical marks (checkboxes) using Letter structure output (memory).
Displaying the result.

Sample 35: RECOGNIZING BARCODES.

Getting information about the current setting of the barcode recognition module.
Specifying requested barcode type(s).
Loading an image. Loading a Zone file.
Recognizing the barcode. Displaying the result and the type of the barcode.

Sample 36: SCANNING IN COLOR. TRANSFORMING A COLOR IMAGE.

Supported on: Windows.

Scanning a page in color with default parameters.
Specifying scanning area.
Transforming the original image to other image types and resolutions.
Saving the transformed images.

Sample 37: DEPRECATED SAMPLE

Sample 38: DEPRECATED SAMPLE

Sample 39: CHANGING THE RECOGNITION DATA BEFORE EXPORTING.

Supported on: Windows.

Recognizing an image into the memory.
Suspect levels: influencing the indication of uncertain character marking.
Accessing and manipulating the low level recognition information in memory.
Updating the recognition data.
Converting into the final output document.

Sample 40: RECOGNIZING MICR (E-13B) ZONE.

Supported on: Windows.

Loading a B/W image from a one-page image file.
Specifying the MICR-specific characters.
Recognition.
Conversion to UNICODE plain text file.

Sample 41: 3D DESKEW.

Loading a 3D-distorted image file. Creating a 3D deskewed copy using the ImageFile object.
Loading the corrected image through memory. Performing recognition.
Exporting the results in plain text format.

Sample 42: RECOGNIZING IN TWO LANGUAGES WITH TWO SETTINGS COLLECTIONS.

Creating two Settings Collections for English and German recognition.
Loading an English and a German image.
Recognition.
Writing letters to text files.

Sample 43: ENUMERATING OUTPUT FORMATS.

Initializing by RecApiPlus engine.
Getting all the output format strings.

Sample 44: DOCUMENT OBJECT CREATING AND LOADING.

Creating a new document object.
Loading and recognizing a new page.
Adding this new page to this document.
Saving the document.

Sample 45: DOCUMENT CREATING, OPENING, INSERTING PAGE, UPDATING PAGE AND DELETING PAGE.

Supported on: Windows.

Creating a new document object.
Loading and recognizing a new page.
Adding this new page to this document.
Updating the document with a new image.
Reloading the document.
Deleting a page from the document.
Calculating number of pages before and after the delete.

Sample 46: DOCUMENT CONVERTING AND HANDLING OF SETTINGS FROM KERNELAPI.

Creating a new document object.
Loading a new page.
Preprocessing this page and recognizing it in fast mode.
Adding this page to the document.
Setting the output format.
Converting the document.

Sample 47: DOCUMENT CONVERTING AND HANDLING OF SETTINGS FROM CPP WRAPPER API.

(This does the same as Sample46, but in another way.)
Creating a new document object.
Loading a new page.
Preprocessing this page and recognizing it in fast mode.
Adding this page to the document.
Setting the output format.
Converting the document.

Sample 48: WORKFLOW-BASED PROCESSING
(WORKFLOW CREATED BY VISUAL TOOLBOX).

Supported on: Windows.

Create an empty document object.
Execute Sample41.xwf workflow:

  • Loading an image (prompt for input)
  • Recognizing (in English)
  • Proofreading
  • Exporting results (prompt for output - defaulting to PDF, Save and Launch)

Sample 49: ACCESSING TABLE STRUCTURE INFORMATION.

Create an empty document. Load an image containing a table.
Perform decomposition, look for tables only.
Perform recognition, access OCR Zone table information.

Sample 50: RECOGNITION OF A JAPANESE DOCUMENT.

Loading the image (TIF, not compressed).
Specifying the Language environment.
Recognition.
Conversion to RTF (flowing page) format.

Sample 51: RECOGNIZING VERTICAL TEXT.

Creating a new document.
Loading a new page.
Preprocessing this page and recognizing it.
Adding this page to the document.
Setting the output format.
Converting the document.

Sample 52: DIGITAL CAMERA.

Loading a 3D distorted digital camera image.
Setting 3D deskew mode. Performing preprocess.
Saving the corrected image. Performing recognition.
Exporting the results in plain text format.

Sample 53: TEXT REDACTION.

Loading and recognizing a simple page.
Searching for a string, then redacting it.
Searching for another string and marking for redaction.
Redacting the marked words in one operation.
Exporting to RTF format.

Sample 54: XPS INPUT, XPS AND DOCX OUTPUT.

Supported on: Windows.

Loading and recognizing an XPS file.
Saving to XPS image-only format.
Recognizing and exporting to XPS and DocX format.

Sample 55: FORM DATA EXTRACTION.

Supported on: Windows.

Processing 4 filled forms and saving output in CSV file.
Template file FormTemplate.PDF is used.

Sample 56: RECOGNIZING DATAMATRIX(2D) BARCODE.

Getting information about the current setting of the Bar code recognition modules.
Setting the default recognition module.
Specifying requested barcode type.
Setting output format.
Loading an image. Loading a Zone file.
Recognizing the barcode.
Displaying the result, the type and the location of the barcode.

Sample 57: RECOGNIZING FROM MULTI-PAGE IMAGE FILE WITH DIRECT TEXT OUTPUT.

Recognizing all pages from a multi-page image file.
Saving output to a single text file.

Sample 58: INITIALIZING RECPDF, LOADING A PDF FILE AND GETTING THE NUMBER OF PAGES.

Initializing the PDF manager API - RecPDF.
Loading a PDF file, and getting the number of its pages.

Sample 59: DELETING A PAGE FROM A PDF FILE USING RECPDF.

Create a 2-page file, then delete the first page by RecPDF.

Sample 60: PDF FILES IN OPERATION USING RECPDF.

Enumerating the PDF files previously added to an operation.
Getting the operation to where the PDF files are assigned.

Sample 61: APPENDING A PDF FILE FROM MULTIPLE PDF FILES USING RECPDF.

Appending pages to a PDF file from multiple sources.

Sample 62: ADDING A HPAGE TO A PDF FILE VIA RECPDF.

Adding a page loaded by KernelAPI to a PDF file opened by RecPDF.
Merging text into a recently added image-only page in the PDF file.

Sample 63: RECOGNIZE IMAGE ONLY PDF AND MERGE RECOGNIZED TEXT USING RECPDF.

Load PDF file and recognize it.
Load PDF file with RecPDF and merge recognized text to it.
Execute operation.

Sample 64: FORM TEMPLATE MATCHING.

Load Form Template Library, created by FormTemplateEditor.
Load Load and Apply Template on two input files.
Extract Form field text.

Sample 65: USING SCANNER ENHANCEMENT TECHNOLOGY TOOLS WITH AND WITHOUT UI.

Supported on: Windows.

Sample 66: MAKE AN EXISTING IMAGE ONLY PDF SEARCHABLE.

Load a page from an image only PDF file.
Preprocess and recognize this page.
Write back the result to the PDF making it searchable.

Sample 67: CREATE A SEARCHABLE PDF IMAGE FROM A JPEG STREAM.

Load a JPEG stream.
Preprocess and recognize the page.
Create a PDF from the original JPEG stream and the recognized text.

Sample 68: SETTING COMPRESSION LEVELS FOR PDF/JPG/JP2 OUTPUTS.

Load a page and save it at different compression levels. Create PDF, JPG and JP2 outputs.

Sample 69: BURNING PDF ANNOTATION TO A TIFF.

Load a annotated PDF page.
Save the image to a TIFF file.

Sample 70: DOCUMENT CLASSIFIER.

Load a training set via a dcp file created by DCAssistant.
Classify three input documents.

Sample 71: STREAM INPUT/OUTPUT.

Supported on: Windows.

Demonstrating the usage of stream input/output API

Sample 72: RECPDF API SUPPORTS GLOBAL PDF FILE MANUPULATIONS.

Load a PDF file.
Save a PDF generated by linearization of the input file.
Save a PDF generated by conversion of the color images of the input file.

Sample 73: FORM DATA RULES.

Load Form Template Library, created by FormTemplateEditor.
Load and Apply Template.
Extract and check Form Fields.

Sample 74: ESSAY MODE FEATURES.

Load input with multiple pages. Save the content in docx, rtf and html.
Demonstrate the use of various formatter and converter flag combinations.

Sample 75: HANDWRITTEN ZONE DETECTION

Load an input page.
Create another page containing only the handwritten zone.

Sample 76: EXTRACT FOOTNOTES IN A DOCUMENT

Enable footnotes.
Set the output level.
Insert and preprocess images as one document.
Produce an output (here docx).

Sample 77: ARCHIVES A MULTIPAGE IMAGE INTO AN MRC SEARCHABLE PDF

Use the profile Archive2PDF.
Load the pages of an image file.
Preprocess and recognize these pages.
Write the result to the searchable PDF.

Sample 78: MAKE AN EXISTING PDF FULLY SEARCHABLE

Use the profile MakePDFSearchable.
Load a page from the PDF file.
Preprocess and recognize this page.
Write back the result to the PDF making it searchable.

Sample 79: GET TEXT FROM A PDF FILE AND EXPORT TO A TXT FILE

Even if the text in bitmap, stamp or vector graphics.
Use the profile ExtractContent2Text.

Sample 80: ESSAY MODE - SIMPLE EXAMPLE

Use the profile ExtractContent2Doc.
Insert and preprocess images as one document.
Produce an output (here docx).

Sample 81: TRUE COPY TO DOCUMENT

Use the profile TrueCopy2Doc.
Insert and preprocess images as one document.
Produce the output.

Sample 82: CONVERT TO EDITABLE DOCUMENT

Use the profile Convert2EditableDoc.
Insert and preprocess images as one document.
Produce an output (here docx).

Sample 83: EXTRACT TABLES

Use the profile ExtractTables.
Insert and preprocess images as one document.
Produce an output (here xlsx).

Sample 84: PROCESS AN EMPTY FORM AND CONVERT TO ACROFORM-BASED PDF DOCUMENT

Use the profile CreateFillableForm.
Insert and preprocess images as one document.
Produce an output (here pdf).

Sample 85: FORM DATA EXTRACTION AND CONVERT TO CSV FILE

Use the profile ExtractFormFields.
Processing 5 filled forms and saving output in CSV file.
Template file Sample85.zon is used.
Produce an output (here csv).


RecAPI: RecAPI .NET Support

RecAPI .NET Support

This is a P/Invoke .NET Assembly to bridge between native and managed applications. It allows the functionality of KernelAPI and RecAPIPlus to be presented through a unified interface.

If you want to implement a fast, robust and reliable application (like an application handling huge batches or working in a Windows service) on the .NET platform, you should seriously consider using the P/Invoke interface.

  • In CSDK 2025.1 the KernelAPI and RecAPIPlus interfaces are accessible from the .NET environment (languages at your choice are C#, managed C++ or VB.NET) through the P/Invoke assemblies. You have to add a reference to your current project (OmniPageCSDK.NET.CAPI.dll, OmniPageCSDK.NET.RecPDF.dll) and the CSDK namespace, with all the KernelAPI and RecAPIPlus functions, is at your service.
  • The supported .NET API of the CSDK is the Objects. Assembly: OmniPageCSDK.NET.Objects.dll (.NET Standard 2.0)
  • The PI in the name of the above mentioned DLL stands for Platform Invoke because this is the public Platform Invoke interface of CSDK 2025.1. Platform Invoke is a service that enables managed code to call unmanaged functions implemented in dynamic link libraries (DLLs). It locates and invokes an exported function and marshals its arguments (integers, strings, arrays, structures, and so on) across the interoperation boundary as needed.
  • Description of each function in this help contains the specification of the function also in C# language.
  • Our CSObjectsSamples sample codes exhibit the usage of the Objects interface from C#.
  • KernelAPIS and RecAPIPlusS interfaces of RecAPI are not accessible from .NET environments.
  • In general the OmniPage CSDK and the integrating .NET application must share a common folder. However if you want to place your .NET application and the CSDK binaries into different folders, you must write a small application configuration file containing the relative or absolute path to the CSDK. Here is a small example, where the Omnipage CSDK is in the OPCSDK subfolder in your application folder:
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
    <probing privatePath="OPCSDK" />
    </assemblyBinding>
    </runtime>
    </configuration>
    The name of this configuration file is YourApp.exe.config and should be placed alongside with the YourApp.exe file. You can find a detailed description on the following URL: http://msdn.microsoft.com/en-us/library/823z9h8w(VS.80).aspx


RecAPI: RecAPI Java support

RecAPI Java support

OmniPage CSDK v21.1 has introduced Java API to access KernelAPI, RecAPIPlus and RecPDF functions in Java. The mapping code is autogenerated by SWIG reflecting our C API, and using JNI (Java Native Interface). This autogenerated behaviour, and the functions offered in Java try to reflect exactly the same functions with mostly same parameters. See JavaSamples bundled with this CSDK to see the example usages.

Installation

Java API does not require any extra step after a normal install of CSDK. Instead, the user has to locate omnipage_csdk.jar inside a CSDK installation "bin" folder and include it in the java classpath.

Samples

After installing the CSDK, Java samples are available here:

C:\ProgramData\OmniPage\CSDK22\x64\Samples\Java

For a 32-bit CSDK install, please replace x64 by x86 everywhere in this Java section.
To use the prepared .cmd files in this directory (build.cmd and run.cmd), user has to set JAVA_HOME environment variable properly (e.g. "C:\Program Files\Java\jdk1.8.0_77").
These .cmd files are are very simple 1-liner texts, so you should definitely open and examine them later - everything possible to be run without setting JAVA_HOME then.
In order to build JavaSample, open a dos prompt or powershell in the directory above, and issue build.cmd.
It compiles java files under:

C:\ProgramData\OmniPage\CSDK22\x64\Samples\Java\JavaSamples

Now you can run it:

C:\ProgramData\OmniPage\CSDK22\x64\Samples\Java> run.cmd -h
Loading csdk_omnipage.dll...Arguments captured: -h
Usage:
JavaSamples OPTION ID
ID could be 1-109 or all
-d ID prints the description of sample ID to stdout
-f ID prints the function list of sample ID to stdout
-x ID executes sample ID, writes all the messages to stdout
-all executes all samples, writes all the messages to stdout
-h|? prints this help

C:\ProgramData\OmniPage\CSDK22\x64\Samples\Java> run.cmd 1
Loading csdk_omnipage.dll...Arguments captured: 1
Input folder: C:\ProgramData\OmniPage\CSDK22\x64\Samples\Inputs\
Output folder: C:\Users\<user>\OmniPage\CSDK22\SamplesOutput\Java\
INF > ** Title: OmniPage Capture Development System Java Sample001 Application **
INF > Initializing the Engine -- kRecInit()
INF > Inquiring the version number of Capture SDK -- kRecGetVersion()
...
INF > Free all resources allocated by the Engine -- kRecQuit()
INF > End of Sample01 application
The sample passed
kRecQuit
RECERR RECAPIKRN kRecQuit(void)
Closing KernelAPI.
kRecGetVersion
int RECAPIKRN kRecGetVersion(void)
Getting version.
kRecInit
RECERR RECAPIKRN kRecInit(LPCTSTR pCompanyName, LPCTSTR pProductName)
Initializing KernelAPI.

Note: color codes are being used by JavaSamples for dos prompt. In case you are not seeing the colors, then you need to open registry, and create in HKCU\Console a DWORD named VirtualTerminalLevel and set it to 0x1.
Initialization

import com.omnipage.csdk.JNILoader;
import com.omnipage.csdk.JNILoaderException;
static {
out.print("Loading csdk_omnipage.dll...");
try {
JNILoader.LoadJNI();
} catch(JNILoaderException e) {
e.printStackTrace();
}
}

The function LoadJNI() tries to load csdk_omnipage.dll from the same directory as csdk_omnipage.jar.
It also has a version with a parameter, allowing to find the dll using a relative path to this jar file :

public static void LoadJNI(String relPath) throws JNILoaderException

In case of a repackaged installation for a 3rd party use would put CSDK binaries in various folders, the csdk_omnipage.dll has to be loaded manually:

import com.omnipage.csdk.*;
System.loadLibrary("<path_to_csdk_binaries>\csdk_omnipage");

In this case, user has to provide the absolute file path to csdk_omnipage.dll by Java code.
Further necessary omnipage dlls are loaded on demand automatically from exactly the same directory of the already loaded csdk_omnipage.dll.
User has to guarantee that csdk_omnipage.jar and csdk_omnipage.dll are from exactly the same CSDK version when dislocating them.

The csdk_omnipage.dll will look for other necessary DLLs exactly in the same folder where it was loaded from, but only after any of a later kRecInit / RecInitPlus / rPdfInit calls.
Starting from CSDK version 22.0, the extension of PATH variable is not required.
After this necessary runtime step, you can instantiate the main class encapsulating the CSDK API and then use it afterward:

RecAPI recapi = new RecAPI();

After acquiring the above RecAPI instance, your first real omnipage CSDK call should be any of kRecInit, RecInitPlus and rPdfInit - depending on which functions you are using, according to kRec/Rec/rPdf function name prefixes.
It is important to call the belonging kRecQuit/RecQuitPlus/rPdfQuit for freeing resources in the end, exactly once for these 3 types of Init calls, in reverse order as usual.
Types

It is assumed that your Java IDE shows type information in-depth, and you as a user of this Java API just have to chose from the public symbols being offered.
The returning agruments of basic types are problemmatic in Java - here it is solved via array of 1 size of that basic type.
E.g. Sample001.java:

long[] timeout = {0};
rc = kRecGetTimeOut(SID,timeout);
...
if (timeout[0] == INFINITE)
...
kRecGetTimeOut
RECERR RECAPIKRN kRecGetTimeOut(int sid, LPDWORD pTimeOut)
Getting timeout period.

For structs, member values are accessible via the usual setter/getter functions fashion in Java: naming convention is set/get prefix + struct member name. The only exceptions are a few common structs: RECT, SIZE and POINT where helper constructors added by us to avoid excessive use of setters/getters (position of arguments are matching with struct members order).

Enums: here we map safe type of enums (its int value is unused), and unsafe. For the latter one, you want the integer representation in C API (see headers) - to acccess that value, please use the toInt() member function.

Special types that implement java.lang.AutoCloseable:
OutputByteBuffer (Sample007.java)
ProgressMonitorCallback (Sample048.java)
The recommendation of effectively using AutoCloseable (as seen in JavaSamples) causes to avoid running the garbage collector too early.

For the usage of arrays, please look for the given function in JavaSamples as there can be minor differences in how they can be acquired and used.

Resource handling

Where not mentioned explicitly (and no belonging C API function) in this document, objects are freed automatically. E.g. the kRecFree function is available only in C, but doesn't exist in Java, so no need to care about it. However, there are a few ones that exist on the Java API too, and the user has to call these explicitly:

  • kRecFreeImg
  • kRecFreeFormTemplateArray
  • kRecFreeFormTemplate
  • kRecFreeFormTemplateCollection
  • kRecFreeRecognitionData
  • kRecFreeImgDataStream

It is important to call these functions before kRecQuit/RecQuitPlus/rPdfQuit, in case have any handle unfreed.

Limitations

These functions are not supported in Java at this moment:

  • kRecGetImgMetaData
  • RecGetOutputSettingsHandle
  • kRecSetSandboxHomePath
  • kRecSetSandboxTempPath


RecAPI: RecAPI Python support

RecAPI Python support

OmniPage CSDK v22.0 has introduced Python API to access KernelAPI, RecAPIPlus and RecPDF functions in Python. The mapping code is autogenerated via SWIG that relies on the C API. See PythonSamples bundled with this CSDK to see the example usages.

Installation

Accessing the Python API requires an extra step after CSDK install. Please locate the available *.whl files under the installation folder (default is shown in these examples).
Using a dos prompt:

cd "C:\ProgramData\OmniPage\CSDK22\x64\Bin"
dir *.whl

Please find the wheel package as a file, e.g. omnipage-22.1-cp37-cp37m-win_amd64.whl that belongs exactly to this CSDK version, and install it manually.
Make sure you have removed any previous install:

pip uninstall -y omnipage

Your python main version 3.7.* have to match in this case, according to 37 in the .whl name.

pip install omnipage-22.1-cp37-cp37m-win_amd64.whl

So far it was assumed that python and pip executables can be found in PATH - in case not, or have multiple python environments (picking the right one):

"C:<absolute_path>\python.exe" -m pip install ...

Separate available .whl package belongs to python-3.8.*, python-3.9.* etc...
Samples

After installing the CSDK, Python samples are available here:

C:\Program Files\OmniPage\CSDK22\Samples\Python

Example - current working directory can be anywhere:

python "C:\ProgramData\OmniPage\CSDK22\x64\Samples\Python\PythonSamples.py" -h
PythonSamples for Tungsten OmniPage CSDK
Parsing arguments
Usage:
C:\ProgramData\OmniPage\CSDK22\x64\Samples\Python\PythonSamples.py OPTION ID
ID could be 1-109 or -all
-d ID prints the description of sample ID to stdout
-f ID prints the function list of sample ID to stdout
-all executes all samples, writes all the messages to stdout
-input path sets the input folder where files will be loaded from
-output path sets the outputfolder where results will be written to
-h|? prints this help
python "C:\ProgramData\OmniPage\CSDK22\x64\Samples\Python\PythonSamples.py" 1
PythonSamples for Tungsten OmniPage CSDK
Parsing arguments
Input folder: C:\ProgramData\OmniPage\CSDK22\x64\Samples\Inputs
Output folder: C:\Users\<user>\OmniPage\CSDK22\SamplesOutput\Python\
...
INF > Free all resources allocated by the Engine -- kRecQuit()
INF > End of Sample001 application
The sample passed
kRecQuit
RECERR RECAPIKRN kRecQuit(void)
Closing KernelAPI.

Its default input directory is located in the Samples\Inputs folder, and the output files are generated in

%USERPROFILE%\OmniPage\CSDK22\SamplesOutput\Python

Note: color codes are being used by PythonSamples for dos prompt. In case you are not seeing the colors, then you need to open registry, and create in HKCU\Console a DWORD named VirtualTerminalLevel and set it to 0x1.
Notations

As function signatures for Python, we are using PEP 3107 and PEP 484 annotations. The CSDK-specific types (e.g. "RECT") are enclosed within double quotes. Modern Python IDEs are able to use these annotations for static code checks and hints.

Initialization

See kRecInit, RecInitPlus and rPdfInit. All these 3 functions have an optional 3rd parameter with None by default, that means the directory of an installed CSDK binary looked up automatically from the registry. In case you have multiple installations, you may need to specify this path. It is important to call the belonging kRecQuit / RecQuitPlus / rPdfQuit for freeing resources in the end, separately for each 3 type of Init call in reverse order.

Types

When operating on more complex types, SWIG offers special ways for handling them. For simplicity, the enum types are mapped here via int. For their names in Python, please refer to the C-style enum definitions of the C API. But, some of the types are int-like, e.g. REC_COLOR. You can access int-like values via the int function:

import RecAPI as r
r.kRecInit(None, None)
rc, hPage = r.kRecLoadImgF(0, 'Samples/038.jpg', 0)
rc = r.kRecRecognize(0, hPage, None)
rc, zd = r.kRecGetOCRZoneData(hPage, r.II_OCR, 1)
print(int(zd.color))

There is one special type that needs to be used in a with statement:

ProgressMonitorCallback (Sample048.py)

This usage is intended to avoid running the garbage collector too early.

Arrays

For CSDK arrays, the mappings between C and Python are possible via SWIG wrappers: "RectArray", "IntArray", ... so any type name having the "...Array" postfix in double quotes. Example:

import RecAPI as r
indices = r.IntArray.createFrom([ 1,2,3 ])
type(indices)
<class 'RecAPI.IntArray'>
rects = r.RectArray.createFrom([ r.RECT(1,2,3,4), r.RECT(5,6,7,8)])
[i.left for i in rects]
[1, 5]

Type names of arrays applying the same rule as above: RectArray, PointArray, VDICTDESCArray, CombCellInfoArray, LetterArray, UIntArray, IntArray, SizeTArray, IntArray, DoubleArray, ModuleInfoArray, ClassifyInfoArray.
Note that arrays of enums are accessible via IntArray, and other int-like array e.g. array of REC_COLOR is represented via UIntArray.
SizeTArray is the type name in Python API of the array of size_t in C.

Resource handling

Where not mentioned explicitly and no belonging C API function in this document, objects are freed automatically. E.g. the kRecFree function is available only in C, but doesn't exist in Python so no need to care. However, there are a few ones that exist on the Pythin API too, and the user has to call these explicitly:

  • kRecFreeImg
  • kRecFreeFormTemplateArray
  • kRecFreeFormTemplate
  • kRecFreeFormTemplateCollection
  • kRecFreeRecognitionData
  • kRecFreeImgDataStream

It is important to call these functions before kRecQuit/RecQuitPlus/rPdfQuit, in case have any handle unfreed.

Numpy ndarray support

In case an input or output picture should be kept in the memory or passed by another module - typically numpy.ndarray -, we have introduced support for passing input/output via these functions:

  • def kRecLoadImgPy(sid: int, arrin: "ndarray", RGBOrder: int, dpi: int=72, LineOrder: int=TOP_DOWN) -> Tuple[int, "HPAGE"]
  • def kRecGetImgAreaPy(sid: int, hPageIn: "HPAGE", iiImg: int, RGBOrder: int, pSrcRect: "RECT"=None, pDstSize: "SIZE"=None, StretchMode: int=STRETCH_DELETE, LineOrder: int=TOP_DOWN) -> Tuple[int, "IMG_INFO", "ndarray"]
    The type "ndarray" refers here to numpy.ndarray.
    Both the usage of these functions and installing numpy are optional.
    It is highly recommended to provide the exact dpi, rather than leaving it on default.
    Copy happens internally only when needed (typically, when the ndarray internal representation is not congiuous C).
    See Sample007.py for example.
    Limitations

These functions are not supported in Python at this moment:

  • kRecGetImgMetaData
  • RecGetOutputSettingsHandle
  • kRecSetSandboxHomePath
  • kRecSetSandboxTempPath

Python is supported only with the 64-bit CSDK release, with some of the latest 64-bit Python versions available at CSDK release time. The 32-bit versions are not supported.


RecAPI: Multi-threading in RecAPI

Multi-threading in RecAPI

RecAPI of the OmniPage Capture SDK is a thread-safe API starting from version 16 (supported on: Windows, Linux). This means that the API functions can be called from different threads at the same time.

If each thread uses a Settings Collection separated only for that thread, the thread-safeness is completely true. The same Settings Collection may be also used in different threads at the same time. However, when a value in a Settings Collection is changed in one thread, this new value appears in all the threads using the same Settings Collection. In this case, it is difficult to determine when the functions in the other threads notice this modification.

If this latter case poses a problem for the integrating application, there are two solutions:

  • each thread uses its own Settings Collection dedicated only to that thread or
  • the integrating application synchronizes the setting modifications performed in Settings Collections assigned to more than one thread.

The expression thread-safe does not mean all the CSDK elements can work simultaneously.

  • Some parts of the CSDK (e.g. output converting) can run only one instance at a time, i.e. if they are called simultaneously, one waits for the other,
  • There are some operations that perform multi-threaded processing within themselves (e.g. One Step Functions Module). Calling such operations simultaneously cannot achieve higher performance.
  • There are some operations that must be called one after the other sequentially, because one waits for output from another. Of course, in such a case there is no point in calling them at the same time. E.g. the preprocessing of a page must precede the recognition of that page. Of course, these operations can be called simultaneously for different pages.

Both the Engine init and quit should be in the main thread. Otherwise, the application developer must ensure that the Engine is active until the closing RecAPI call of the last thread returns.

Special notes on Linux

Using fork together with threads can cause issues and requires precautions. In general, forking should precede the creation of new threads. Since CSDK initialization may create threads, fork should take place prior to the initialization.

See also


RecAPI: Building a robust 24/7 conversion module

Building a robust 24/7 conversion module

UPDATE: Please pay attention to the new Intelligent Workflow Runner API. There can be cases, when an application requires a functionality, which

  • runs in the background;
  • runs for a long or unlimited time;
  • usually do not have an interactive UI;
  • do not have anyone to intervene in case of a problem.

In such a case a possible solution can be a 24/7 module integrated into the main application. Below there are some recommendations to build such a module. In general the following architecture can fulfill the requirements:

  • It is crucial to put the OCR functionality (the worker module) into a separate executable, which can be run in a separate process.
  • This worker module can be controlled through a small amount of high-level commands, e.g. getting page count, recognizing a page, recognizing a document.
  • A thin 24/7 primary layer can control the worker module and can restart it if it is necessary using interprocess communication (e.g. pipe, shared memory and semaphores, TCP/IP, .NET remoting).
  • It can be useful to add a watchdog (monitoring) functionality to the primary layer. The timeout handling of the CSDK alone might not be enough.
  • Even detected errors may leave the process in an unstable state. Even a warning may be a sign of an unstable internal state. So a restart can be reasonable:
    • at a timeout,
    • after errors,
    • after warnings,
    • regularly (after a few thousand pages).
  • It can be useful to implement a Quit command on the secondary layer in order to terminate the worker process in a clean way. On the primary side the function TerminateProcess() should be called only as a last resort.
  • After restarting due to an error, or timeout it can be useful to try the recognition again for the latest page or document causing the error.

More details can be found in 24x7Guide.pdf.


RecAPI: PDF Files in OmniPage Capture SDK 2025.1

PDF Files in OmniPage Capture SDK 2025.1

OmniPage Capture SDK 2025.1 provides extensive support for Portable Document Format files both on the input and output sides. This datasheet gives you an overview on this area.

Both PDF input and output are supported on: Windows, Linux, MacOS. In addition PDF output is also supported on Embedded Linux and Android. This information is true also for PDF_MRC.

PDF Input and output is supplied in the Western OCR Kit.For more details see the topic on Licensing in the General Information help system.

PDF File Format Summary

Name | Adobe Portable Document Format
Format ID | FF_PDF_*
Image load (read) | Yes
Image save (write) | Yes
Image types supported | As the result of the image loading process either a B/W, or a 8-bit grayscale, paletted or a 24-bit true-color image will be created in the Engine.
Multi-page supported | Yes
Special note | Supports standard PDF files compliant up to the PDF v2.0 specification.

PDF Input in CSDK 2025.1

PDF input is supported on: Windows, Linux, MacOS.

If you develop a Linux application using CSDK, please see also the Linux specific notes about PDF input.

By default (this can be changed using different settings), the program handles input PDF files as follows:

  1. Bitmap creation
    A bitmap is created from the loaded PDF.
  2. Information extraction
    After this, additional information is extracted from the PDF, including the following:
    1. Information on fonts and the decision whether font substitution is necessary
    2. Information on text with the exact position of its letters
    3. TAG information, if any.
  3. Pre-processing
    The next step is the pre-processing. This step may vary depending on whether the PDF contains textual information or not.
    1. If the PDF does not contain text information (it is an image-only PDF), all pre-processing (deskew, auto-rotation, binarization) and other operations will run similarly to the ones applied to other image files (TIFF, JPEG, etc.)
      NOTE: Image on text-type PDFs do not undergo text extraction: during processing these are treated as image only ones.
    2. If the PDF does contain text information, a specific binarization (developed for PDF files) will run, but without deskew and auto-rotation.
  4. Layout decomposition
    In PDF files that contain textual information, this text is extracted. The OCR engine runs on the image, but mainly to search for text areas and other elements on the page resulting in a zone set. Page layout and spacing are also determined. The generated and zoned bitmap (see Step 1) is collated with the extracted text to ensure its correct positioning on the page, including column placement and transfer of graphic elements.
  5. Recognition
    In PDF files with no accessible text layer, OCR runs to generate editable text and perform zoning. In PDF files with an accessible text layer with text information, pages are zoned and word boundaries are determined, as described. Occasionally, text extraction may be imperfect, so as a backup, recognition with two-way voting runs on the images and its result is compared to the text information extracted from the PDF. In case of minor differences, recognized characters are corrected according to the ones in the PDF, since that text is more likely to be correct. In the case of major differences recognition results will serve as the final ones, since it is likely that PDF character encoding identification has failed (Non-standard encoding was not detected). If a non-standard encoded text pdf has control characters and the recognition process cannot resolve them, they will be modified according to the setting Kernel.OcrMgr.Codes.CtrlOffset
  6. Definition of character attributes
    Character attributes, such as size and style (bold, italic) can usually be defined using information extracted from the PDF. When PDF text is written in a type that is difficult to identify, a font attribute defining process will run.
  7. Other operations
    Character- and line spacing, paragraph, and table definitions are done just as in the case of image files.

Resolution of the rendered bitmap

  • By default:
    • If the PDF does not have an image, resolution is determined by the value of the setting Kernel.Imf.DefaultDPI.
    • If the PDF has an image and there is only "little" text, the resolution of the rendered bitmap will be the maximal resolution of the images. However, this resolution is limited to 300 DPI.
  • If the setting Kernel.Imf.PDF.Resolution is not 0:
    • The given value will be the resolution.
  • If the setting Kernel.Imf.PDF.LoadOriginalDPI is TRUE:
    • If the PDF does not have an image, resolution is determined as in the default case.
    • If the PDF has an image, the resolution of the rendered bitmap will be the maximal resolution of the images. However, this resolution is limited to 600 DPI.

Handling Encrypted PDF Files

PDF files may be password-protected. Passwords have two types: open (or user) and permissions (or owner, or master).

Open passwords can block file opening. When a PDF requires an open password, CSDK 2025.1 cannot open it without this. Your application must include an interface to accept a password.

As for permissions passwords CSDK 2025.1 only checks the permissions that block printing or content-copy from the file.

When a PDF requires a permissions password for content-copy, its text content cannot be copied without this. CSDK 2025.1 however gives you the possibility to process a content-copy protected file without giving a permissions password. In this case the encrypted PDF is treated as an image-only one and no textual information can be extracted.

A PDF may also require a permissions password for printing. CSDK 2025.1 will only load a PDF if its printing is not blocked – that is, the user either has this permissions password, or the file is not protected against printing.

When a PDF file is protected by both an open and a permissions password, only the permissions password needs to be given for full access.

PDF Output in CSDK 2025.1

CSDK 2025.1 is able to produce PDF files on the KernelAPI and RecAPIPlus processing levels.

PDF Output in KernelAPI

PDF output in KernelAPI is supported on: Windows, Linux, Embedded Linux, MacOS.

For creating image-only PDF files, KernelAPI offers the following format:

  • FF_PDF
  • FF_PDF_MRC

See Saving to a file for details.

For creating DTXT image-on-text PDF output files, KernelAPI offers the following format:

  • DTXT_IOTPDF
  • DTXT_IOTPDF_MRC

It contains the whole image of the original page and the text behind the image on a separate layer. These PDF files especially suit the purpose of page archiving, because they contain both the original image and recognized text.

See Direct TXT Output Converter Module DirectTXT Outputs for details.

The compression level and quality of the above PDF outputs can be controlled by calling kRecSetCompressionLevel and kRecSetCompressionTradeoff.

Saving MRC PDF files in KernelAPI

There is no MRC compression for black-and-white images. Thus if an MRC format is selected for a B/W image the proper no-MRC format is used.

In case of gray or color images MRC saves the image in multiple layers:

  • one background layer containing the graphics and the background behind the text,
  • one (in the case of Level 4 and 5) or more (in the case of Level 1, 2, 3) foreground layers containing the text,
  • one selector layer (in the case of Level 4 and 5 MRC format).

The background, foreground and selector layers are compressed using different compression algorithms.

When creating an MRC file CSDK decomposes the image into multiple layers and sub-images. This process includes an algorithm for detecting text. It works even without OCR, but this process can benefit from the OCR result when HPAGE contains an II_OCR image. Note that II_OCR image is created during the recognition process.

Compression methods:

  • Selector layer: Group4 or JBIG2 depending the trade-off parameter or on the setting Kernel.Imf.PDF.BWFormat (default: JBIG2).
  • Foreground (FG) and Background (BG) layer: Jpeg or Jpeg2000 depending on the trade-off parameter or the setting Kernel.Imf.PDF.ColorFormat (default: jpeg2000). Refer to the RecAPI documentation (Kernel.Imf.CompressionTradeoff) for details

Note: The new MRC compression can be used with 5 different predefined levels (1-5) by calling kRecSetCompressionLevel.

  • Level 1 provides the smallest file size, achieved by the intense filtering and compression applied to the background while reducing its resolution for a third. CSDK uses low-quality JPG compression on the background and blurs the area around characters.
  • Level 2 applies less intense filtering to the background and saves it with a higher quality JPG compression.
  • Level 3 is a compromise between document quality and file size. CSDK filters the background even less and only halves the background resolution. This is the default value.
  • Level 4 provides superior compression by dividing a document into three layers: a binary mask layer (selector layer), a foreground layer, and a background layer.
  • Level 5 New feature. The Tungsten Omnipage Capture SDK 22.0 automatically looks for graphics, diagrams, and photos on the page. Parcels these elements into high quality sections (called Imagettes), placing them on the top of Layer 3 with high resolution. At the same time, it smooths out the pixel errors and triples the resolution of the text (selector) layer, greatly improving character contour. As a result, PDF readers display the text contour smoother than on the source image, even at high zoom levels. The quality of the photos keeps close to the original. On the other hand, the same image compressed with Level 5 MRC concludes a larger file size than with Level 4.

For details see the section about newer image formats. See the Tungsten Omnipage Capture SDK User's Guide for more details, in the Imaging Module, MRC image compression level comparison subsection.

Deprecated:

FF_PDF_MIN | Minimum image file size
FF_PDF_GOOD | Medium image file size
FF_PDF_SUPERB | Large image file size with high quality
FF_PDF_MRC_MIN | MRC-compressed PDF optimized for minimum file size
FF_PDF_MRC_GOOD | MRC-compressed PDF of medium file size
FF_PDF_MRC_SUPERB | MRC-compressed PDF providing large file size, but high quality

PDF Output in RecAPIPlus and IPRO

The PDF output in RecAPIPlus level is supported on: Windows, Linux, MacOS.

In RecAPIPlus and IPRO, the following PDF output formats and converters are available:

PDF with image on text (Searchable PDF in OmniPage terminology) – A PDF converter where the original (input) image is retained in the foreground with the recognized text hidden in the background (and in the correct position). This format allows the content of an image PDF to become searchable without disrupting the original due to the hidden text layer. Text in a Searchable PDF is positioned directly behind the corresponding image text and is selectable and searchable in popular PDF viewers. This format especially suits archiving and indexing purposes.

PDF - A highly configurable, general PDF output converter. It supports many PDF features, but relies heavily on the position of the recognized characters.

PDF with image substitutes - A special PDF converter, where the suspect words are covered by their image cut out from the original image.

PDF edited – This PDF converter does not rely on the position of the recognized characters, so it could be used even after inserting large new portions of text in the editor.

All PDF Output converters have the following features in common:

  • Compression options, including (for details see the Compression settings):
    • Content stream compression (flate)
    • JBIG2 compression for black/white images
      (available from PDF v1.4)
    • JPEG2000 compression for color images
      (available from PDF v1.5)
    • Compression of embedded font files
  • Appending the output to an existing PDF file
  • MRC compression of the image for even smaller size.
    MRC is short for Multi-Raster Content Technology. It segments images into layers and applies different compression algorithms to each layer, thus optimizing both file size and quality.
  • Creation of fillable PDF forms (with LFR – Logical Form Recognition)
  • Compatibility settings for PDF versions 1.0 - 1.7, 2.0
  • PDF/A compliant output (by modifying the setting Compatibility of the selected PDF converter)
    PDF/A is a normative ISO-compliant PDF file specification based on PDF 1.4 designed for two main purposes:
    • To generate PDF files that display and handle uniformly over the broadest possible range of operating systems, environments and PDF viewers or editors.
    • To generate PDF files that will remain viewable over a long period of time, so that archived material is protected against obsolescence due to techological innovation.
  • Predefined settings for highest quality or for smallest file size
  • Tagged PDF file creation based on our layout recognition
  • Font embedding
  • Selectable quality for image compression, image resolution and color depth
  • Outline tree creation for document and page thumbnails
  • Ability to exclude the text of headers and footers from the output
  • Digital signing of the created PDF files (see PDF converter settings Converters.Text.PDF*.Signature.*)
  • Security settings (extract content, modify content, print, etc) definition plus open and permissions password setting
  • Content encryption (40, 128 or 256 bit)
  • Highlighting of the recognized URLs in the text and/or turning them into clickable links

Saving MRC PDF files using the output converters (in RecAPIPlus)

When a document is saved in PDF formats, the image can be saved using MRC technology. In this case the same compression methods and compression quality are used and the resolution of the layers also will be the same as described previously.

The following converter settings affect the compression:

  • Compatibility
  • UseMRC
  • Compression.UseJBIG2
  • Compression.UseJPEG2000
  • Pictures
  • PictureColor

The following combinations can be used:

Compatibility | UseMRC | Compression.UseJBIG2 | Compression.UseJPEG2000
R2ID_PDF_FORCESIZE | R2ID_PDFMRC_MIN | TRUE | TRUE
R2ID_PDF_FORCEQUALITY | R2ID_PDFMRC_NO |  |
R2ID_PDF20 | any possible value | TRUE/FALSE | TRUE/FALSE
R2ID_PDF17 | any possible value | TRUE/FALSE | TRUE/FALSE
R2ID_PDF16 | any possible value | TRUE/FALSE | TRUE/FALSE
R2ID_PDF15 | any possible value | TRUE/FALSE | TRUE/FALSE
R2ID_PDF14 | any possible value | TRUE/FALSE | FALSE
R2ID_PDF13 | any possible value | FALSE | FALSE
R2ID_PDF12 and below | R2ID_PDFMRC_NO |  |
R2ID_PDFA (deprecated) | any possible value | TRUE/FALSE | FALSE
R2ID_PDFA1B (instead of R2ID_PDFA) | any possible value | TRUE/FALSE | FALSE
R2ID_PDFA2B | any possible value | TRUE/FALSE | TRUE/FALSE
R2ID_PDFA3B | any possible value | TRUE/FALSE | TRUE/FALSE
R2ID_PDFA2U | any possible value | TRUE/FALSE | TRUE/FALSE
R2ID_PDFA3U | any possible value | TRUE/FALSE | TRUE/FALSE
R2ID_PDFA1A | any possible value | TRUE/FALSE | FALSE
R2ID_PDFA2A | any possible value | TRUE/FALSE | TRUE/FALSE
R2ID_PDFA3A | any possible value | TRUE/FALSE | TRUE/FALSE
R2ID_PDFA4 | any possible value | TRUE/FALSE | TRUE/FALSE
R2ID_PDFA4E | any possible value | TRUE/FALSE | TRUE/FALSE
R2ID_PDFA4F | any possible value | TRUE/FALSE | TRUE/FALSE
R2ID_PDFUA1 | any possible value | TRUE/FALSE | TRUE/FALSE
R2ID_PDFUA2 | any possible value | TRUE/FALSE | TRUE/FALSE

The Pictures setting may modify the resolution of the layers. If the resolution of a layer is higher than the resolution specified by the Pictures setting, the layer will be transformed to the specified resolution, so this setting is suggested to leave in default state (R2_DPI_ORIGINAL) when saving MRC PDF.

The PictureColor setting may change the bit depth of the layers, so it is suggested to leave in default state (R2_BPP_ORIGINAL).

Saving new encrypted PDF files

CSDK gives the possibility to save encrypted PDF files using either an open (or user) or a permissions (or owner, or master) password (see also the above description about encrypted PDF files). This option is fully setting-controlled. The setting Kernel.Imf.PDF.PDFSecurity.Type determines the used encryption method. The passwords can be stored also in settings (Kernel.Imf.PDF.PDFSecurity.OwnerPassword and UserPassword).

In addition there can be set permission flags for the created PDF file enabling:

  • modifying the document contents,
  • extracting text and graphics from the extracted document for supporting accessibility to users with disabilities
  • copying text and graphics,
  • adding or modifying text annotations,
  • printing the document,
  • filling in forms and signing the document,
  • assembling the document: inserting, rotating and deleting pages.

The created PDF file can be opened for the enabled operations by using the open password. If one has the permissions password, all the operations are enabled.

Modifying an existing encrypted PDF file

Existing encrypted PDF files can be modified and saved as well. In this case the password of the existing file is needed for processing it. The file and the given password determines the operations can be performed, so the setting Kernel.Imf.PDF.PDFSecurity.Type has no effect. The password (either open or permission one) can be specified in the setting Kernel.Imf.PDF.PDFSecurity.ProcessPassword.

Improvements after CSDK 15

Generating editable output from PDF files has been speeded up – more advanced technology is applied to make zoning faster, achieve higher OCR accuracy, improve output quality and make the resulting files more usable when being further edited in target applications. This is achieved by creating two images whenever the input is a PDF or XPS file with a text layer. One is a composite image with all PDF information, the second contains only a background image without any text. This is especially useful for pages where text wraps around pictures irregularly, as shown. Further speed-up is achieved by assessing image quality and layout complexity. A faster OCR algorithm is now applied to high-quality pages with simple layouts.

This technology cannot be applied to active PDF forms, and works only in accurate mode. In cases where this technology cannot be applied, there is an automatic and seamless fall-back to the old algorithm.

Another innovation is support for creating linearized PDF files. These are optimized for efficient web display. The resulting PDF adheres to Appendix F (Linearized PDF) of the PDF Reference. This means that after creating the PDF in the usual way (any PDF flavor), the CSDK reorders the file contents and adds hint tables. This means that the first page of the PDF will load quickly into a web page, with remaining pages loaded while it is being viewed. It means browsers can determine which page elements to present first (typically headings and texts) and which can follow (heavier pictures etc.). It also optimizes the efficiency of jumping to new pages in the PDF document.

Settings relating to the creation of linearized PDF are: Kernel.Imf.PDF.Linearized, Kernel.DTxt.PDF.Linearized and Converters.Text.PDF*.Linearized.

Linearized file creation works also with Asian-language PDF files.

Support is introduced for PDF version 1.6 and 1.7 – this includes support for the AES encryption system (128 and 256 bit). File opening is handled through existing mechanisms, while new saving options are provided for applying AES encryption to files.

Original orientation can be forced for PDF Searchable output

In response to client requests, it is now possible to have the original orientations conserved when outputting to PDF Searchable (Image-on-text) files. To implement this, the setting Kernel.Img.KeepOriginalImage or the corresponding function kRecSetPreserveOriginalImg must be used for each page involved. If these images are kept, the orientation on PDF Searchable output pages remains the same as that of the input, overriding any auto-rotation decisions that may have been performed during preprocessing.

RecPDF API for managing page-level manipulations of PDF files

This part of the SDK is an extension to KernelAPI and RecAPIPlus. It manages PDF files on the page level. It can copy, move, or delete pages of the PDF files. It is also able to extract information from them, or change their pages. RecPDF is a mostly operation based API. The page-level modifications are passed to the operation, and at the end the operation executes all of the changes at the same time. Operations can be cancelled as well if it turns out that no modification is needed. For more information see the documentation of the RecPDF Module.


RecAPI: Processing screen captures

Processing screen captures

CSDK contains special preprocessing algorithm that is optimized for processing screen captures. This means that different binarization and resolution enhancement is applied and neither deskew nor autorotation is applied. This preprocessing algorithm works only on color and grayscale images.

In order to process screen captures it is important that the original image to be without loss, so the image must be passed to CSDK in uncompressed or lossless image format. Therefore the input image file cannot be JPEG, TIFF-JPG and GIF (image handling applications may use dithering algorithm when the image is saved to GIF file). We suggest to use PNG or TIF LZW.

If the images to be processed can include screen capture, you need to set Kernel.Img.ScreenCapture to SCR_AUTO or SCR_YES. We suggest to use SCR_AUTO, because in this case CSDK analyzes the image during preprocessing, and decides whether the normal or the screenshot-optimized algorithm will be applied.


RecAPI: Processing handwritten text

Processing handwritten text

Separating handwritten and machine printed texts improves the OCR accuracy. Distinguishing between handwritten texts in the machine-printed image is important because the machine printed OCR gives a more accurate result. The height and width of handwritten characters are very varied, so this can confuse the zone detection prepared for machine texts. If the handwritten texts are separated, and zoned or copied into the new HPAGE in the image, you can call an OCR that recognizes the appropriate handwriting, if necessary. You can use it to remove handwritten scribbles from invoices before processing, or you can check if there is a signature or handwritten information on the document. Handwriting detection applies to both signatures and handwritten numbers and letters in the image. The program does not distinguish the signature from other handwritten texts.

Neural networks can learn characteristics from training data set analysis and then classify an unknown image based on weights. The neural network used in CSDK consists of convolutional layers that can extract a lot of information from the image using kernels. During the learning process, the network uses neurons to select important features that distinguish handwritten characters from typed ones. Using neural networks instead of classical methods means that there is no need for hand coding. Seeing many learning patterns, the network is more flexible to changes in handwriting style and transcends the limitations of classical coding.

You can use two functions to detect handwritten areas:

  • kRecLocateHandwriting: change the current image in HPAGE. There are two modes for handling the original image:
    • LH_REMOVE_HANDWRITING: If you do not need handwritten texts or signatures, use this setting to delete the handwritten characters from the original image. It increases the accuracy of the machine printed OCR. This mode does not return zones.
    • LH_RETAIN_HANDWRITING: If you are only interested in handwritten text, for example you want to check if there is a signature in the image, use this mode.
  • kRecCreateHandwritingPage: return the handwritten image in a separate HPAGE. There are two modes for handling image parts containing different text:
    • CHP_FIND_HANDWRITING: If you need the original document and it is only the handwritten zones that you want to get separately, use this mode. The original HPAGE will be unchanged.
    • CHP_SEPARATE_HANDWRITING: If you need to separate both handwritten areas and machine printed text from each other, use this mode. The handwritten text will be deleted from the original HPAGE and a new HPAGE will be created containing only the handwritten text and zones. The two pages can be processed differently according to their content.

IMPORTANT NOTES:

  • CSDK can select the zone recognition mode automatically to the hand-written zone filling method (FM_HANDPRINT). These zones can be recognized by RM_RER or RM_HNR or another handwritten text recognizer.
  • If the program did not find a handwritten area in the image, the number of zones is zero. Check it with function kRecGetZoneCount.


RecAPI: Processing legal documents

Processing legal documents

CSDK introduces algorithms to better handle pleading documents. These legal documents can be processed by any normal workflow, with any generally supported image input and can modify the output content for all targeted conversions. The legal algorithms are activated by setting Kernel.LegalPleading to TRUE.

Legal recognition addresses the following issues:

Pleading numbers

These appear vertically on the page, on either one or both sides of the body text, to uniquely identify text lines. Sometimes every line is numbered, sometimes less, for instance each fifth line is numbered. The numbers may be separated from the body text by a vertical line. Legal recognition tries to identify these elements and store them separately so they do not interfere with the body text. This allows them to be dropped or separately retained when the documents are exported to target files using the setting Converters.Text.xxxx.RetainLineNumberingZones where xxxx is the output file type name. A special case is saving to searchable PDF with pleading numbers retained. The numbers are retained in the page images, but not in searchable text, so that searching for numbers will only find occurrences of numbers in the body text.

Recognition tries to retain the original page content as far as possible, but text wrapping may disturb the precise alignment of line number and content. If precise synchronization is important, you can design your application to prevent text wrapping by inserting line breaks at the end of each line as detected in the original pages.

Document identifier

This is usually a header table appearing at the top of the first page of a legal document, with a single row and three columns, naming the plaintiff, defendant and case identifiers. The formatting of table borders can vary widely – legal recognition attempts to render these tables with standard formatting.

Page header removal

This is a single-line case identifier that typically appears as a header on each page, and is usually auto-generated by a document management system. When legal recognition is set, such header lines are detected and removed during preprocessing, so they are neither recognized nor exported. With general processing, these header lines remain on the pages.


RecAPI: Useful notes about debugging CSDK integration

Useful notes about debugging CSDK integration
  • Most of the error codes are large negative numbers, less than -32768, and Visual Studio is not able to show their symbolic value when User places the mouse pointer over a RECERR variable. The function watch_recerr can be used for displaying this symbolic value in a Watch window.
  • When loading PDF files OmniPage CSDK periodically throws a PDF_PROGRESS C++ Exception. Unwanted debugger breaks can be avoided by switching this exception off inside the debugger's exception handlig. For example in Visual Studio the following steps are required:
    1. In Debug->Exceptions... menu there is an Exceptions dialog box.
    2. Click Add... button.
    3. Select type C++ Exceptions.
    4. Enter the name PDF_PROGRESS.
    5. Click OK.
    6. Under C++ Exceptions - PDF_PROGRESS leave the Thrown checkbox unchecked.


RecAPI: Spell Checking Module related pages

Spell Checking Module related pages


RecAPI: Language Dictionary List

  • Spell Checking Module related pages
Language Dictionary List

The following table lists the languages available in the Engine’s checking module for spell checking (language checking). One of these can be specified as the spelling language, if desired.

  • Brazilian
  • Catalan
  • Czech
  • Danish
  • Dutch
  • English
  • Esperanto
  • Finnish
  • French
  • German
  • Greek
  • Hungarian
  • Italian
  • Norwegian
  • Polish
  • Portuguese
  • Russian
  • Slovenian
  • Spanish
  • Swedish
  • Turkish
Note
See the Spell Checking Module.


RecAPI: Vertical Dictionary List

  • Spell Checking Module related pages
Vertical Dictionary List

The following table lists all the Vertical dictionaries available in the distribution of the OmniPage Capture SDK. The descriptions below should be used with kRecSetVerticalDictionaries.

PROFESSION | LANGUAGE | DESCRIPTION OF DICTIONARY
Financial | English | English Financial Dictionary
Medical | Dutch | Dutch Medical Dictionary
Medical | English | English Medical Dictionary
Medical | French | French Medical Dictionary
Medical | German | German Medical Dictionary
Legal | Dutch | Dutch Legal Dictionary
Legal | English | English Legal Dictionary
Legal | French | French Legal Dictionary
Legal | German | German Legal Dictionary
Note
See the Spell Checking Module.


RecAPI: Language, Character Set and Code page Handling Module related pages

Language, Character Set and Code page Handling Module related pages

Choose from the following topics:

Character Set and Filters in the Engine
This details how the character set for a given page or zone can be compiled, using language choice, individual character validation and filtering.

Supported characters with the CCJK languages This gives information about the character sets recognized by the Asian Recognition Module for CCJK languages.

Right-to-left language support This page provides information about text recognized in right-to-left languages.

OCR special filling methods
Description of OCR special filling methods, which contains OCR special characters besides some generally used characters.

Language identifiers
This lists the languages supported by the Engine and their identifiers according to the main standards and use cases.

Code Pages in the Engine
This lists the Code Pages supported by the Engine, available for exporting recognized text. It provides additional information on each Code Page.

Non-Asian Languages and characters
This lists the non-Asian languages supported by the Engine in alphabetical order. It shows which accented letters are enabled for each language, giving their UNICODE values.

Languages, geography, Code Pages
This lists the languages alphabetically, stating where they are spoken and by approximately how many people. It shows which of the commonly used Code Pages support each language. Information is provided for Windows Code Pages 1250, 1252, 1257 and DOS Code Pages 437, 850 and 852.

Languages and modules
This lists the languages alphabetically, showing which are supported by each of the text-handling recognition modules.

Characters, languages, modules
This displays and names all accented letters alphabetically, stating which languages use each character, which modules support each of them and also their code values in UNICODE, Code Page 1252 and Code Page 437.

Characters (punctuation/miscellaneous) and modules
This lists the punctuation and miscellaneous characters, showing the module support for each of them.


RecAPI: Character Set and Filters in the Engine

  • Language, Character Set and Code page Handling Module related pages
Character Set and Filters in the Engine

The Character Set

The Character Set is the group of validated characters for a given zone. It can vary for each zone. The recognition module associated with the zone inquires the Character Set assigned to the zone immediately before the recognition step.

The Character Set concept incorporated in the Engine applies to the following text recognition modules: MOR, MTX, FRX, PLUS2W and PLUS3W, DOT, HNR and RER.

The purpose of limiting the Character Set

You can improve text recognition accuracy by narrowing the range of characters validated for recognition, so the recognition module does not always have the difficult job of choosing one solution from all 500 characters (and even from multiple shapes of every character) in Engine's Total Character Set.

Most recognition modules use this information to improve recognition, some do not. Even responsive engines may return filtered out characters because the limited character set is just a hint for them.

Limiting the character set assumes that the application or user has some prior knowledge of what types of texts or characters will be encountered on a page or zone, e.g.

  • the language(s) may be known.
  • certain character classes may be excluded (e.g. no lowercase letters)
  • there may be a limited set of permissible characters (e.g. in form-type documents).

The following steps describe how the Character Set can be defined, per image (with global settings) or per zone (with local settings).

Language Environment

Typically texts to be recognized are written by and for people in natural languages. To describe the character components of the languages the Engine provides two tools.

The supported languages (and their combinations) can be selected directly using the LANGUAGES enum.

The language selection may not always fully meet a user’s needs:

  • Linguistic sources do not agree on the full alphabets of some languages.
  • There may be differences between archaic and modern forms or between dialects of a given language.
  • Languages transcribed from other alphabets may use different norms.
  • Some foreign words and names in a text may use accented letters not supported by the language setting.

This is why we provide a second flexible tool, to open a backdoor to complement or construct the Language environment character by character, using the LanguagesPlus setting.

This Language environment is global, i.e., it remains valid for the whole image, and for all future ones until any of its components are changed.

Note
The Language environment does not always equal the Character Set, since filters can be applied, either globally (per image) or locally (per zone), see later.

Language selection (global)

This is the most frequently used tool for the limitation of the Character Set. You enable one or more languages. This validates all letters and language-related characters needed for those languages, plus all digits, punctuation and miscellaneous characters.

E.g. selection of German without Spanish enables the typical German letter "O diaeresis" but disables the Spanish "Inverted Question Mark".

Related functions:

  • kRecSetLanguages : To set information telling which languages should be set as LANG_ENABLED or LANG_DISABLED.
  • kRecGetLanguages : To get information telling which languages are currently selected.

As a parameter for both of these functions an array of languages is used. The enum LANGUAGES defines the position-language relationship

Note
The list of supported characters and languages depends on the recognition module applied. Only the RM_OMNIFONT_PLUS2W and RM_OMNIFONT_PLUS3W multi-lingual modules support all languages. For more detail see the topics Recognition module specifications and Languages and modules.
Only the omnifont recognition modules support all punctuation and miscellaneous characters. To see which are supported by the other modules go to the Characters (punctuation / miscellaneous) and modules topic.
In rare cases you may define no language and build the Character Set only from individually defined characters.
For more on languages, characters, modules and Code Pages, see Introduction to language-related topics.

LanguagesPlus characters (global)

Here you define any additionally needed characters, e.g. to handle some foreign words in a text.

Related functions:

  • kRecSetLanguagesPlus : Lets you set the LanguagesPlus characters.
  • kRecGetLanguagesPlus : Gets the current LanguagesPlus characters setting.
Note
The recognition modules RM_OMNIFONT_MOR, RM_OMNIFONT_FRX, RM_OMNIFONT_PLUS2W, RM_OMNIFONT_PLUS3W, RM_DOT and RM_RER accept the LanguagesPlus characters. RM_OMNIFONT_MTX does not support LanguagesPlus characters.
To discover which accented letters are supported for each language, and which modules support them, see Languages and characters.
To revalidate individual characters removed by filtering, use FILTER_PLUS.

Filtering

Filters can be used to limit the character set defined by the Language environment to specific character categories. This filtering can be a Global filter (applied at image/page level) or a local filter (applied per-zone). FILTER_ALL switches all filtering off, enabling all the characters in the Language environment. A filter can be built up from any combination (binary OR-ed) of the following five disjunct elements plus a few special ones:

  • FILTER_UPPERCASE, enables uppercase letters only, including accented ones,
  • FILTER_LOWERCASE, enables lowercase letters only, including accented ones,
  • FILTER_DIGIT, enables digits only,
  • FILTER_PUNCTUATION, enables the (max.) 17 punctuation characters only,
  • FILTER_MISCELLANEOUS enables the (max.) 31 miscellaneous characters only.

These elements are rather rigid; to make filtering more flexible the Engine provides a few special filters: the FILTER_PLUS, FILTER_PLUS_1, FILTER_PLUS_2 and FILTER_PLUS_3 bits. These filter bits additionally enable groups of individually validated characters, called the FilterPlus characters, set through the kRecSetFilterPlus and kRecSetFilterPlusEx functions. There are 4 different sets of characters that can be defined at most, indexed from 0 to 3. They can be enabled with the corresponding FILTER_PLUS* filter bits.

As an example of filtering, when your document is a questionnaire containing only capitals, you can use the filter FILTER_UPPERCASE.

Some pre-defined combined filters are available: FILTER_ALPHA for all letters and FILTER_NUMBERS for the digits plus all FILTER_PLUS characters with index 0.

Activation of filters

Each zone in the image has a ZONE structure defining its properties (coordinates, size, filling method and recognition module to be applied etc.). One of the fields in this structure is the filter field.

If automatic decomposition (auto-zoning) detects the zones, this filter field will always have the value FILTER_DEFAULT, which means that for these zones a common page-level filtering, i.e. the Global filter, will be applied.

The application can change this field, or can create zones with different filter values for the individual zones defining Local filters.

Related functions and enums:

  • CHR_FILTER : This enum lists the disjunct filter elements plus other pre-defined combinations and a switch for FilterPlus characters.
  • kRecSetFilterPlus and kRecSetFilterPlusEx : Lets you set the FilterPlus characters.
  • kRecGetFilterPlus : Gets the current FilterPlus characters setting.
Note
Remember that some recognition modules impose their own limitations, e.g. RM_HNR is limited to digits plus four symbols. Any filter for a character category can only validate the characters in that category supported by the assigned recognition module.
For the value FILTER_DEFAULT to take effect, it must be the only one in the field.

Global filter

When the Engine is initialized, the Global filter setting takes the value FILTER_ALL (i.e. no filtering). You can set it to any other default value using the function kRecSetDefaultFilter. The Global filter setting will be applied to every zone having the ZONE’s filter field value FILTER_DEFAULT.

Related functions and enums:

  • kRecSetDefaultFilter : This lets the application use the filter elements to set a Global filter.
  • kRecGetDefaultFilter : This gets the current Global filter value.

Local filter

As already stated, each ZONE structure has a field filter. If it is filled with any value other than FILTER_DEFAULT, the zone-level, Local filter will be used and any Global filter is ignored.

Note
It is important to note that there are only 4 FilterPlus sets of characters. At zone-level the application can enable or disable the usage of one of these sets, or a combination of them.

Related functions:
These zone properties are typically defined by the kRecInsertZone or kRecUpdateZone functions.


RecAPI: Supported characters with the CCJK languages

  • Language, Character Set and Code page Handling Module related pages
Supported characters with the CCJK languages

For each CCJK language, all the generally used characters that are defined in the country's character encoding standard are supported. The recognized Han characters are the ones defined by the following encoding standards:

 | Encoding standard | Level 1 | Level 2 | CJK Unified Ideographs Extension A
Simplified Chinese | GB 2312 | 3755 | 3008 |
 | GB 1830-2022 |  |  | 6530
Traditional Chinese | Big-5 | 5401 | 7652 |
Japanese | JIS X 0208 | 2965 | 3390 |
Korean | KS X 1001 | 4888 |  |
Note
GB18030-2022 Level 1 is equivalent to GB 2312 Level 1 + Level 2 + Extension A.

With default settings the set of recognized characters is as follows:

  • Simplified Chinese:
    • All GB 2312 Level 1 and some frequently used Level 2 characters
  • Traditional Chinese:
    • All Level 1 characters
  • Japanese:
    • All Level 1 characters
  • Korean:
    • All common characters

In each case, English letters, numerals, and punctuation are also supported.

Using the Kernel.OcrMgr.Asian.FullCharacterSet setting this set can be extended:

  • Setting it to 1:
    • All Level 2 characters are added to the recognized set for the Chinese and Japanese languages. (Korean doesn't have level distinctions.)
  • Setting it to 2:
    • In case of Simplified Chinese language, the CJK Unified Ideographs Extension A characters are also added, covering Level 1 of the GB18030-2022 standard.

Details:

  • Simplified Chinese:
    • There are 3755 Level 1, 3008 Level 2 characters (as defined by the GB 2312 standard) and 6530 Extension A characters(as defined by the GB18030-2022 standard) supported. 499 frequently used GB 2312 Level 2 characters (see later) are supported even with the default non-FullCharacterSet setting, while the remaining 2509 Level 2 characters are supported when FullCharacterSet is 1. The whole GB18030-2022 Level 1 set is supported when FullCharacterSet is 2.
  • Traditional Chinese:
    • There are 5401 Level 1 and 7652 Level 2 characters (as defined by the Big-5 standard) supported. Level 2 characters are supported when FullCharacterSet is 1.
    • If the setting Kernel.OcrMgr.Asian.CHTIncludesHKSCS is set to TRUE and the selected language is Traditional Chinese, the Asian recognition module can recognize characters also from Hong Kong character set. Note that this setting may cause some decreasing of the accuracy of Chinese Traditional OCR.
  • Japanese:
    • There are 2965 Level 1 and 3390 Level 2 kanji characters (as defined by the JIS X 0208 standard) supported. The 83 Hiragana and 86 Katakana characters are supported as well. Level 2 characters are supported when FullCharacterSet is 1.
    • Our Asian engine recognizes half-width katakana characters, however in its output the unicodes of the corresponding full-width katakana characters appear. So it treats half-width katakanas as if full-width katakanas would be printed in a particular font.
  • Korean:
    • There are 4888 Hanja characters (as defined by the KS X 1001 standard) supported. The 2350 Hangul characters are supported as well.
 | Default setting | Full Character Set = 1 adds: | Full Character Set = 2 adds: | Non-Han characters | English | Digits | Punct.
Simplified Chinese | 3755 (Level 1) + 499 (Level 2) | 3008 (Level 2) − 499 (Level 2 used in default setting) | 6530 (Extansion A) | - | 52 | 10 | 74
Traditional Chinese | 5401 (Level 1) | 7652 (Level 2) | - | - | 52 | 10 | 86
Japanese | 2965 (Level 1) | 3390 (Level 2) | - | Hiragana: 83, Katakana: 86 | 52 | 10 | 92
Korean | 4888 | - | - | Hangul: 2350 | 52 | 10 | 87

The 499 Level 2 Simplified Chinese characters are as follows:


RecAPI: Right-to-left language support

  • Language, Character Set and Code page Handling Module related pages
Right-to-left language support

CSDK supports recognition of RTL languages: Arabic and Hebrew. These languages render text from right to left, while embedded English text and numbers are rendered from left to right. The result is bidirectional text combining different logical reading orders. CSDK supports this ordering: it returns text in logical (reading) order. This is true both for the returned LETTER array and the exported text.

Table cells are returned from left to right. Text inside cells is returned in logical order (i.e. RTL for Arabic/Hebrew text and LTR for embedded English text and numbers).

In case of RTL languages the document's global reading order applied by CSDK is RTL. It means that when a line includes text from both RTL and LTR languages the correct display in text viewers (e.g. Notepad) can be achieved by enabling the viewer's "Right to Left Reading Order" property.

The order of characters is almost always suitable for further processing without modification. For the rare cases when you need more control, the R_RTLTEXT makeup bit of the LETTER array is provided.


RecAPI: OCR special filling methods

  • Language, Character Set and Code page Handling Module related pages
OCR special filling methods

The most general OCR special characters are supported by CSDK. The following list contains the description of filling methods containing these special characters. In addition the shapes of these characters are also listed. The codes retrieved by the OCR engines for these characters are shown in the Unicode column below.

IMPORTANT NOTE: The special OCR-A and MICR symbols can be recognized only when the User enables them among the languages plus characters. See kRecSetLanguagesPlus.

  • FM_CMC7
    CMC7. Numbers and the following control characters:
    Name Shape Unicode
    S1 (Internal):
            ':'
    S2 (Terminator):
            ';'
    S3 (Amount):
            '<'
    S4 (Not Used):
            '='
    S5 (Routing):
            '>'
    This filling method is supported by RER OCR engine. The codes retrieved by the engine for special CMC7 characters are located right after the numbers for easier handling of them. At the same time these codes are also according to the ECMA-19 standard.
  • FM_DASHDIGIT
    Ten digits only and the period. Commas are also read, but converted to periods. Though this is in theory a fixed-font, many variants of it are used. This filling method is supported by MAT OCR engine.
  • FM_DOTDIGIT
    Ten digits only and the period. Commas are also read, but converted to periods. Though this is in theory a fixed-font, many variants of it are used. This filling method is supported by MAT OCR engine.
  • FM_MICR
    MICR (E-13B). Digits plus some punctuation and 4 special MICR symbols:
    Name Shape Unicode
    OCR Branch Bank:
            0x2446
    OCR Amount of Check:
            0x2447
    OCR Dash:
            0x2448
    OCR Customer Account Number:
            0x2449
    This filling method is supported by MAT and RER OCR engines.
  • FM_OCRA
    OCR-A. Uppercase English letters (26), digits, some punctuation (see Characters (punctuation / miscellaneous) and modules) and 3 special OCR-A symbols:
    Name Shape Unicode
    OCR Chair:
            0x2441
    OCR Hook:
            0x2440
    OCR Fork:
            0x2442
    This filling method is supported by MAT and RER OCR engines.
  • FM_OCRB
    OCR-B. Uppercase English letters (26), digits and some punctuation. This filling method is supported by MAT and RER OCR engines.


RecAPI: Language identifiers

  • Language, Character Set and Code page Handling Module related pages
Language identifiers

Language identifier names at functions like kRecGetLanguageInfo and kRecFindLanguageEx can be accessed or specified by their English names or by their coding in a range of standards. Note that some standards don't support all of our languages, these are noted below. There is a different problem with the Chinese, Portuguese and Serbian languages: we use two separate language codes in all of these 3 cases based on the country or the script used: Simplified and Traditional Chinese, Portugal and Brazilian Portuguese, Cyrillic and Latin Serbian. The different ISO 639-x standards don't make such a difference. The handling of these languages is described at "In case of language-pairs" below.

CSDK internal code: This is the last 3 letters of the name used by us as the LANGUAGES enum, i.e. the 3 letters following "LANG_". Note that the kRecFindLanguage family of functions accepts both 3-letter internal codes and the "LANG_" prefixed 8-letter ones. This identifier can be used to uniquely identify any of our languages. Standard ISO idetifiers (see later here) all lack some of our languages. The ISO 639-3 superset used by us also has the feature of uniquely identifying all of our languages so if you want to have a close-to-standard identifier then you may consider using that one instead of this internal code. The BCP 47 identifiers are also supported, they can also be used to uniquely identify all of our languages (see below).

ISO 639-1: Some of our languages are not supported by this standard, in such cases kRecGetLanguageInfo returns an empty string in Name_639_1 (see the LANGUAGE_INFO structure). In case of language-pairs the ISO 639-1 standard code is returned at both languages. The kRecFindLanguage family of functions supports both the 2-letter language codes (e.g. en) and the combined BCP 47 style language and country codes (e.g. en-US). Sometimes the country codes are needed for the correct mapping (e.g. pt-BR for Brazilian Portuguese, zh-TW for Traditional Chinese, etc.), while sometimes the script code is necessary (e.g. sr-Cyrl for Cyrillic Serbian and sr-Latn for Latin Serbian). The table below shows those combined codes that could be necessary, but other combinations not shown in the table are supported as well. Note that kRecGetLanguageInfo always returns the 2-letter basic code only in the Name_639_1 field. See also the Name_BCP_47 field (in the LANGUAGE_INFO structure).

ISO 639-2/B: Some of our languages are not supported by this standard, in such cases kRecGetLanguageInfo returns an empty string in Name_639_2B. In case of language-pairs the ISO 639-2/B standard code is returned at the first language of the language-pair only, while an empty string is returned at the second language. Note that some of the identifier codes in our 639-2/B implementation do not refer to a specific language, but a language collection. These identifiers are:

  • myn - for Mayan,
  • nah - for Nahuatl,
  • smi - for Sami,
  • wen - for Sorbian.

ISO 639-3: This language identifier standard can map 1-to-1 to our languages, because it has a method to define local language codes. The used local codes are:

  • qbp - for Brazilian Portuguese
  • qct - for Traditional Chinese
  • qes - for Eskimo
  • qsl - for Latin Serbian
  • qti - for Pirez

In case of language-pairs the ISO 639-3 standard code is returned at the first language of the language-pair only, while a local code is returned at the second language. The Sami language is a language collection that does not have an ISO 639-3 code but has an ISO 639-2/B code. In this case the capitalized 639-2/B code (SMI) is used by us as extended 639-3 code. This is not a standard 639-3 name, but adding it made the 639-3 superset able to identify all of our languages. (In previous versions MYN, NAH and WEN were also used as similar uppercase extensions for the Mayan, Nahuatl and Sorbian language collections; now we use the standard quc, nci and hsb language codes instead that are the 639-3 codes for the largest languages of those families. Simplified Chinese used to be coded with a local code, qcs, now zho is returned. Visayan used to be coded as qis, now it is changed to ceb. Note that all the previously used names can still be used with the kRecFindLanguage family of functions to maintain backwards compatibility.)

BCP 47: This is a newer standard that uniquely identifies all the languages supported by any of the previous 639-x standards. kRecGetLanguageInfo returns such language names (like en-US or sr-Latn-RS, etc.) in Name_BCP_47. These names are mostly based on the 639-1 two-letter standard, but sometimes 3 letter language codes are also used (like hsb-DE). The country-code component is usually 2 letters, but rarely a 3 digit code is used (like pap-029). The kRecFindLanguageEx function supports these names both as BCP 47 codes and 639-1 ones for backwards compatibility.

Windows 3 letter code: This is the GetLocaleInfo(LOCALE_SABBREVLANGNAME) identifier that is sometimes called ISO 639x in the Microsoft documentations, however it does not match any of the ISO standards. It is mostly (but not always) based on the ISO 639-1 two-letter codes by adding a third character. It looks similar to the ISO 639-2/B and ISO 639-3 standards, but has some different codes (e. g. The Swedish language ISO identifier is swe while the Windows identifier is SVE.) Some of our languages are not supported by the Windows 3 letter codes, in such cases kRecGetLanguageInfo returns an empty string in Name_Win_3.

Windows locale ID (LCID): The kRecGetLanguageInfo function returns this identifier as an integer. The kRecFindLanguages and kRecFindLanguageEx functions can use this numeric value directly to find a language, while the kRecFindLanguage as well as the kRecSetUILang functions support a special string representation: "LCID_12345" i.e. the decimal value of the local ID prefixed by the "LCID_" string. In C/C++ it can be generated with the "LCID_%d" sprintf format. Some of our languages are not supported by the LCID codes, in such cases kRecGetLanguageInfo returns the ID of English (0x0409) in LangID.

Note
There are some conflicting values in different language code standards, so take care when using them with the kRecFindLanguage family of functions:
  • CRO means Croatian as an internal code, while cro means Crow as a 639-3 code
  • LAT means Latvian as an internal code, while lat means Latin as a 639-3 or 639-2B code
  • MAY means Mayan as an internal code, while may means Malay as a 639-2B code
  • ROM means Romanian as an internal or Windows code, while rom means Romany as a 639-3 or 639-2B code
  • SRP means Latin Serbian as a Windows code, while srp means Cyrillic Serbian as a 639-3 or 639-2B code
  • pt means both Portugal and Brazilian Portuguese as a 639-1 code
  • sr means both Cyrillic and Latin Serbian as a 639-1 code
  • zh means both Simplified and Traditional Chinese as a 639-1 code
With kRecFindLanguages it's suggested to stick to a single standard and place the language name in the corresponding field of the LANGUAGE_INFO structure, and not the common EnglishName field. With the simpler kRecFindLanguage function you don't have such choice; in case of conflicting languages it returns the most relevant of the possible languages (usually based on the character case) with a warning. If you're using the CSDK internal code with kRecFindLanguage it's best to use it with the "LANG_" prefix. It is suggested to use kRecFindLanguageEx instead of these functions. With kRecFindLanguageEx you can stick to a single standard, and this is the most flexible function even when the general query with LANGCODE_ALL is used. In case of conflicting languages kRecFindLanguageEx returns the most relevant of the possible languages (usually based on the character case) with a warning, and the conflicting other language can be learned as well.

The below table shows all supported languages with the supported language names and identifiers. Some languages have multiple identifiers listed in cells below, in those cases the first ID is the one returned by kRecGetLanguageInfo while the other IDs can also be used with the kRecFindLanguage family of functions.

Name | Alternate Name | enum name | Script | Continent | ISO 639-3 | ISO 639-2/B | ISO 639-1 | BCP 47 | Windows | Microsoft ID
English |  | LANG_ENG | Latin | Europe, Oceania, North America | eng | eng | en | en-US | ENU, ENG, ENA, ENC, ENZ | 0409, 0809, 0C09, 1009, 1409
German |  | LANG_GER | Latin | Europe | deu | ger | de | de-DE | DEU, GER | 0407
French |  | LANG_FRE | Latin | Europe, North America | fra | fre | fr | fr-FR | FRA, FRC | 040C, 0C0C
Dutch | Flemish | LANG_DUT | Latin | Europe | nld | dut | nl | nl-NL | NLD | 0413
Norwegian | Bokmal, Nynorsk | LANG_NOR | Latin | Europe | nor | nor | no, nb, nn | no-NO | NOR, NON | 0414, 0814
Swedish |  | LANG_SWE | Latin | Europe | swe | swe | sv | sv-SE | SVE | 041D
Finnish |  | LANG_FIN | Latin | Europe | fin | fin | fi | fi-FI | FIN | 040B
Danish |  | LANG_DAN | Latin | Europe | dan | dan | da | da-DK | DAN | 0406
Icelandic |  | LANG_ICE | Latin | Europe | isl | ice | is | is-IS | ISL | 040F
Portuguese |  | LANG_POR | Latin | Europe | por | por | pt, pt-PT | pt-PT | PTG | 0816
Spanish |  | LANG_SPA | Latin | Europe, Latin America | spa | spa | es | es-ES | ESN, ESM | 0C0A, 080A
Catalan | Catalonian, Valencian | LANG_CAT | Latin | Europe | cat | cat | ca | ca-ES | CAT | 0403
Galician | Gallegan | LANG_GAL | Latin | Europe | glg | glg | gl | gl-ES | GLC | 0456
Italian |  | LANG_ITA | Latin | Europe | ita | ita | it | it-IT | ITA | 0410
Maltese |  | LANG_MAL | Latin | Europe | mlt | mlt | mt | mt-MT | MLT | 043A
Greek |  | LANG_GRE | Greek | Europe | ell | gre | el | el-GR | ELL | 0408
Polish |  | LANG_POL | Latin | Europe | pol | pol | pl | pl-PL | PLK | 0415
Czech |  | LANG_CZH | Latin | Europe | ces | cze | cs | cs-CZ | CSY | 0405
Slovak |  | LANG_SLK | Latin | Europe | slk | slo | sk | sk-SK | SKY | 041B
Hungarian |  | LANG_HUN | Latin | Europe | hun | hun | hu | hu-HU | HUN | 040E
Slovenian |  | LANG_SLN | Latin | Europe | slv | slv | sl | sl-SI | SLV | 0424
Croatian |  | LANG_CRO | Latin | Europe | hrv | scr | hr | hr-HR | HRV, HRB | 041A, 001A
Romanian | Rumanian | LANG_ROM | Latin | Europe | ron | rum | ro | ro-RO | ROM | 0418
Albanian |  | LANG_ALB | Latin | Europe | sqi | alb | sq | sq-AL | SQI | 041C
Turkish |  | LANG_TUR | Latin | Europe, Asia | tur | tur | tr | tr-TR | TRK | 041F
Estonian |  | LANG_EST | Latin | Europe | est | est | et | et-EE | ETI | 0425
Latvian |  | LANG_LAT | Latin | Europe | lav | lav | lv | lv-LV | LVI | 0426
Lithuanian |  | LANG_LIT | Latin | Europe | lit | lit | lt | lt-LT | LTH | 0427
Esperanto |  | LANG_ESP | Latin | International | epo | epo | eo | eo-001 |  |
Serbian(Latin) | Bosnian | LANG_SRL | Latin | Europe | qsl |  | "", sr-Latn, Lt-sr, bs | sr-Latn-RS | SRL, SRS, SRM, SRP, BSB | 081A, 181A, 241A, 2C1A, 701A, 141A, 681A
Serbian |  | LANG_SRB | Cyrillic | Europe | srp | srp, scc | sr, sr-Cyrl, Cy-sr | sr-Cyrl-RS | SRB, SRN, SRO, SRQ, BSC | 0C1A, 1C1A, 281A, 301A, 6C1A, 7C1A, 201A, 641A, 781A
Macedonian |  | LANG_MAC | Cyrillic | Europe | mkd | mac | mk | mk-MK | MKI | 042F
Moldavian | Moldovan | LANG_MOL | Cyrillic | Europe | mol | mol | mo, ro-MO | ro-MO |  | 0818
Bulgarian |  | LANG_BUL | Cyrillic | Europe | bul | bul | bg | bg-BG | BGR | 0402
Byelorussian | Belarusian, Belarusan | LANG_BEL | Cyrillic | Europe | bel | bel | be | be-BY | BEL | 0423
Ukrainian |  | LANG_UKR | Cyrillic | Europe | ukr | ukr | uk | uk-UA | UKR | 0422
Russian |  | LANG_RUS | Cyrillic | Europe, Asia | rus | rus | ru | ru-RU | RUS | 0419
Chechen |  | LANG_CHE | Cyrillic | Asia | che | che | ce | ce-RU |  |
Kabardian |  | LANG_KAB | Cyrillic | Asia | kbd | kbd |  | kbd-RU |  |
Afrikaans |  | LANG_AFR | Latin | Africa | afr | afr | af | af-ZA | AFK | 0436
Aymara |  | LANG_AYM | Latin | Latin America | aym | aym | ay | ay-BO |  |
Basque |  | LANG_BAS | Latin | Europe | eus | baq | eu | eu-ES | EUQ | 042D
Bemba | Ichibemba | LANG_BEM | Latin | Africa | bem | bem |  | bem-ZM |  |
Blackfoot | Siksika | LANG_BLA | Latin | North America | bla | bla |  | bla-CA |  |
Breton |  | LANG_BRE | Latin | Europe | bre | bre | br | br-FR | BRE | 047E
Brazilian |  | LANG_BRA | Latin | Latin America | qbp |  | "", pt-BR | pt-BR | PTB | 0416
Bugotu | Bughotu | LANG_BUG | Latin | Oceania | bgt |  |  | bgt-SB |  |
Chamorro |  | LANG_CHA | Latin | Oceania | cha | cha | ch | ch-MP |  |
Tswana(Chuana) | Chuana, Setswana | LANG_CHU | Latin | Africa | tsn | tsn | tn | tn-ZA | TSN, TNA | 0432
Corsican |  | LANG_COR | Latin | Europe | cos | cos | co | co-FR | COS | 0483
Crow |  | LANG_CRW | Latin | North America | cro |  |  | cro-US |  |
Eskimo | Inuit | LANG_ESK | Latin | Europe, North America | qes, esx |  |  | esx-CA |  |
Faroese |  | LANG_FAR | Latin | Europe | fao | fao | fo | fo-FO | FOS | 0438
Fijian |  | LANG_FIJ | Latin | Oceania | fij | fij | fj | fj-FJ |  |
Frisian |  | LANG_FRI | Latin | Europe | fry | fry | fy | fy-NL | FYN | 0462
Friulian |  | LANG_FRU | Latin | Europe | fur | fur |  | fur-IT |  |
Gaelic(Irish) | Irish | LANG_GLI | Latin | Europe | gle | gle | ga, gd-IE | ga-IE | IRE | 083C
Gaelic(Scottish) | Scottish | LANG_GLS | Latin | Europe | gla | gla | gd | gd-GB | GLA | 0491, 043C
Ganda(Luganda) | Luganda | LANG_GAN | Latin | Africa | lug | lug | lg | lg-UG |  |
Guarani |  | LANG_GUA | Latin | Latin America | grn | grn | gn | gn-PY |  | 0474
Hani |  | LANG_HAN | Latin | Asia | hni |  |  | hni-CN |  |
Hawaiian |  | LANG_HAW | Latin | Oceania | haw | haw |  | haw-US |  | 0475
Ido |  | LANG_IDO | Latin | International | ido | ido | io | io-001 |  |
Indonesian |  | LANG_IND | Latin | Asia | ind | ind | id | id-ID | IND | 0421
Interlingua |  | LANG_INT | Latin | International | ina | ina | ia | ia-001 |  |
Kasub | Kashubian | LANG_KAS | Latin | Europe | csb | csb |  | csb-PL |  |
Kawa | Wa, Blang | LANG_KAW | Latin | Asia | wbm |  |  | wbm-MM |  |
Kikuyu | Gikuyu | LANG_KIK | Latin | Africa | kik | kik | ki | ki-KE |  |
Kongo |  | LANG_KON | Latin | Africa | kon | kon | kg | kg-CD |  |
Kpelle |  | LANG_KPE | Latin | Africa | kpe | kpe |  | kpe-LR |  |
Kurdish |  | LANG_KUR | Latin | Asia | kur | kur | ku | ku-Latn-TR |  |
Latin |  | LANG_LTN | Latin | International | lat | lat | la | la-001 |  | 0476
Luba |  | LANG_LUB | Latin | Africa | lua | lua |  | lua-CD |  |
Luxembourgish | Luxembourgian, Letzeburgesch, Luxembourgeois | LANG_LUX | Latin | Europe | ltz | ltz | lb | lb-LU | LBX | 046E
Malagasy |  | LANG_MLG | Latin | Africa | mlg | mlg | mg | mg-MG |  |
Malay |  | LANG_MLY | Latin | Asia | msa | may | ms | ms-MY | MSL | 043E
Malinke | Maninkakan, Maninka | LANG_MLN | Latin | Africa | emk, mlq |  |  | emk-GN |  |
Maori |  | LANG_MAO | Latin | Oceania | mri | mao | mi | mi-NZ | MRI | 0481
Mayan | K'iche' | LANG_MAY | Latin | Latin America | quc, myn | myn |  | myn-GT |  | 0486
Miao | Hmong, Mong | LANG_MIA | Latin | Asia | hmn | hmn |  | hmn-CN |  |
Minangkabau | Minankabaw | LANG_MIN | Latin | Asia | min | min |  | min-ID |  |
Mohawk |  | LANG_MOH | Latin | North America | moh | moh |  | moh-CA | MWK | 047C
Nahuatl | Aztec | LANG_NAH | Latin | Latin America | nci, nah | nah |  | nah-MX |  |
Nyanja | Chewa, Chichewa | LANG_NYA | Latin | Africa | nya | nya | ny | ny-ZW |  |
Occidental | Interlingue | LANG_OCC | Latin | International | ile, occ | ile | ie | ie-001 |  |
Ojibway | Ojibwa | LANG_OJI | Latin | North America | oji | oji | oj | oj-CA |  |
Papiamento |  | LANG_PAP | Latin | Latin America | pap | pap |  | pap-029 |  | 0479
PidginEnglish | Tok Pisin | LANG_PID | Latin | Oceania | tpi | tpi |  | tpi-PG |  |
Provencal | Occitan | LANG_PRO | Latin | Europe | oci, prv | oci | oc | oc-FR | OCI | 0482
Quechua |  | LANG_QUE | Latin | Latin America | que, quz | que | qu | qu-PE | QUE | 086B
Rhaetic | Romansh | LANG_RHA | Latin | Europe | roh | roh | rm | rm-CH | RMC | 0417
Romany |  | LANG_ROY | Latin | Europe | rom | rom |  | rom-001 |  |
Rwanda | Ruanda, Kinyarwanda | LANG_RUA | Latin | Africa | kin | kin | rw | rw-RW | KIN |
Rundi |  | LANG_RUN | Latin | Africa | run | run | rn | rn-BI |  |
Samoan |  | LANG_SAM | Latin | Oceania | smo | smo | sm | sm-WS |  |
Sardinian |  | LANG_SAR | Latin | Europe | srd | srd | sc | sc-IT |  |
Shona |  | LANG_SHO | Latin | Africa | sna | sna | sn | sn-ZW |  |
Sioux | Dakota | LANG_SIO | Latin | North America | dak | dak |  | dak-US |  |
Sami |  | LANG_SMI | Latin | Europe | SMI | smi |  | smi-NO | "", SZI | 003B
Sami(Lule) | Lule Sami | LANG_SML | Latin | Europe | smj | smj |  | smj-NO | SMJ | 103B
Sami(Northern) | Northern Sami | LANG_SMN | Latin | Europe | sme | sme | se | se-NO | SME | 043B
Sami(Southern) | Southern Sami | LANG_SMS | Latin | Europe | sma | sma |  | sma-NO | SMA | 183B
Somali |  | LANG_SOM | Latin | Africa | som | som | so | so-SO |  | 0477
Sotho | Sesotho, Sutu | LANG_SOT | Latin | Africa | sot | sot | st | st-ZA |  | 0430
Sundanese |  | LANG_SUN | Latin | Asia | sun | sun | su | su-Latn-ID |  |
Swahili | Kiswahili | LANG_SWA | Latin | Africa | swa | swa | sw | sw-KE | SWK | 0441
Swazi | Swati | LANG_SWZ | Latin | Africa | ssw | ssw | ss | ss-SZ |  |
Tagalog | Filipino, Pilipino | LANG_TAG | Latin | Asia | tgl, fil | tgl, fil | tl | tl-PH | FPO | 0464
Tahitian |  | LANG_TAH | Latin | Oceania | tah | tah | ty | ty-PF |  |
Pirez | Tinpo | LANG_TIN | Latin | Europe, Asia, Africa | qti |  |  | qti-001 |  |
Tongan | Tonga | LANG_TON | Latin | Oceania | ton | ton | to | to-TO |  |
Tun | Tunia | LANG_TUN | Latin | Asia | tug |  |  | tug-TD |  |
Visayan | Cebuano | LANG_VIS | Latin | Asia | ceb, qis |  |  | ceb-PH |  |
Welsh |  | LANG_WEL | Latin | Europe | cym | wel | cy | cy-GB | CYM | 0452
Sorbian(Wend) | Wend | LANG_WEN | Latin | Europe | hsb, dsb, wen | wen, hsb, dsb | "", sb | wen-DE | HSB, DSB | 042E
Wolof |  | LANG_WOL | Latin | Africa | wol | wol | wo | wo-SN | WOL | 0488
Xhosa |  | LANG_XHO | Latin | Africa | xho | xho | xh | xh-ZA | XHO | 0434
Zapotec |  | LANG_ZAP | Latin | Latin America | zap | zap |  | zap-MX |  |
Zulu |  | LANG_ZUL | Latin | Africa | zul | zul | zu | zu-ZA | ZUL | 0435
Japanese |  | LANG_JPN | Asian | Asia | jpn | jpn | ja | ja-JP | JPN | 0411
Chinese(S) | Simplified Chinese | LANG_CHS | Asian | Asia | zho, qcs | chi | zh, zh-CHS, zh-CN, zh-SG | zh-Hans-CN | CHS, ZHI | 0804, 0004, 1004
Chinese(T) | Traditional Chinese | LANG_CHT | Asian | Asia | qct |  | "", zh-CHT, zh-HK, zh-MO, zh-TW | zh-Hant-TW | CHT, ZHH, ZHM | 0404, 7C04, 0C04, 1404
Korean |  | LANG_KRN | Asian | Asia | kor | kor | ko | ko-KR | KOR | 0412
Thai |  | LANG_THA | Asian | Asia | tha | tha | th | th-TH | THA | 041E
Arabic |  | LANG_ARA | Right-to-left | Asia | ara | ara | ar | ar-SA | ARA | 0401
Hebrew |  | LANG_HEB | Right-to-left | Europe, Asia | heb | heb | he | he-IL | HEB | 040D
Vietnamese |  | LANG_VIE | Latin | Asia | vie | vie | vi | vi-VN | VIT | 042A


RecAPI: Code Pages in the Engine

  • Language, Character Set and Code page Handling Module related pages
Code Pages in the Engine

The following table summarizes all the Code Pages supported by the Engine. One of these must be specified as the Code Page of the final output document.

The default code page on Windows is the 8-bit code page of the current OS, on Linux and MacOS it is UTF-8. On newer Windows OSs we suggest using UTF-8 for all languages. See also auto code page.

CODE PAGE NAME | WIDTH | DESCRIPTION | IMPLEMENTATION
Windows ANSI | 8-bit | Code Page 1252 | Hard-coded
Windows Greek | 8-bit | Code Page 1253 | Hard-coded
Windows Eastern | 8-bit | Code Page 1250 | Hard-coded
Windows Turkish | 8-bit | Code Page 1254 | Hard-coded
Windows Baltic | 8-bit | Code Page 1257 | Hard-coded
Windows Cyrillic | 8-bit | Code Page 1251 | Hard-coded
Windows Esperant | 8-bit | Non Standard Win | From file, derived from CP 1252
Wondows Sami | 8-bit | Sami | From file, derived from CP 1252
Latin 1 | 8-bit | ISO 8859-1 | From file, derived from CP 1252
Code Page 437 | 8-bit | DOS Latin US | Hard-coded
Greek-ELOT | 8-bit | DOS Greek | Hard-coded
Greek-MEMOTEK | 8-bit | DOS Greek | Hard-coded
Code Page 850 | 8-bit | DOS Latin 1 | From file, derived from CP 437
Code Page 852 | 8-bit | DOS Latin 2 | From file, derived from CP 437
Code Page 860 | 8-bit | DOS Portuguese | From file, derived from CP 437
Code Page 863 | 8-bit | DOS French-Canadian | From file, derived from CP 437
Code Page 865 | 8-bit | DOS Nordic | From file, derived from CP 437
Code Page 866 | 8-bit | DOS Cyrillic CIS | From file, derived from CP 437
CWI Magyar | 8-bit | DOS Hungarian | From file, derived from CP 437
Magyar Ventura | 8-bit | DOS Hungarian | From file, derived from CP 437
IVKAM C-S | 8-bit | Czech & Slovak | From file, derived from CP 437
Mazowia Polish | 8-bit | DOS Polish | From file, derived from CP 437
Sloven & Croat | 8-bit | 7 bits used | From file, derived from CP 437
Turkish | 8-bit | DOS Turkish | From file, derived from CP 437
Icelandic | 8-bit | DOS Icelandic | From file, derived from CP 437
Macintosh | 8-bit | Mac Western | Hard-coded
Mac INSO Latin 2 | 8-bit | MAC CE | Hard-coded
Mac Central EU | 8-bit | PT 202 | Hard-coded
Mac Primus CE u | 8-bit | MAC CE | Hard-coded
Maltese | 8-bit | Malta; 7 bits used | From file, derived from CP 437
OCR | 8-bit | Non Standard Win | From file, derived from CP 437
Unicode | 16-bit | multilingual | Hard-coded
WordPerfect | 16-bit | multilingual | Hard-coded
WordPerfect Old | 16-bit | multilingual | Hard-coded
Roman 8 | 8-bit | For HP printers | Hard-coded
UTF-8 | 16-bit | multilingual | Hard-coded
Big5 | 16-bit | Traditional Chinese (supports ETen extension and HKscs non-standard mode) | From file
EUC-CN | 16-bit | Simplified Chinese | From file
EUC-JP | 16-bit | Japanese | From file
EUC-TW | 16-bit | Traditional Chinese | From file
GB 18030 | 16-bit | Simplified Chinese | From file
GBK | 16-bit | Simplified Chinese | From file
HKSCS-2004 | 16-bit | Traditional Chinese (HKscs standard mode, supports ETen extension | From file
Shift_JIS | 16-bit | Japanese | From file
UHC | 16-bit | Korean (extended EUC-KR) | From file

For programming, the current Code Page setting of the Engine can be set by kRecSetCodePage and inquired by kRecGetCodePage. The exact list of available Code Pages can be inquired by the functions kRecGetFirstCodePage and kRecGetNextCodePage.

Many derivative Code Pages are offered. Their definitions can be found in the Code Page Definition files, RECOGN.SET, LATIN1.SET and SAMI.SET. Each derivative is based on CP 1252 or CP 437, and the appropriate section in the Code Page Definition file specifies only the changed character positions.

Note
For most languages you may find best to use one of the unicode codepages: "Unicode" or "UTF-8".
The Windows ANSI name is given by only the OmniPage CSDK, it is not connected with the real ANSI character set (ISO 8859-1). Its name comes from a historical evolution. In fact, this is the code page 1252 (Windows CP 1252).
Details of the WordPerfect code pages:
  • WordPerfect: variable length character codes stored on 1 or 4 bytes. It is used from WordPerfect 6.0.
  • WordPerfect Old: similar to WordPerfect, but it is used before WordPerfect 6.0.

Customized Code Pages

If no offered Code Page fulfills your needs, you can develop your own derivative 8-bit Code Page by adding a new Code Page Definition file to the Engine Binary directory. This new file should have a .SET file extension and it should contain a separate section for your custom Code Page. Five Code Pages are available as the basis for customized Code Pages:

  • Windows CP 1252
  • DOS CP 437
  • Greek-Elot
  • Greek Memotek
  • Roman 8

The characters belonging to the custom Code Page should be given in UNICODE and follow the other layout conventions found in the RECOGN.SET basic Code Page Definition file.

Code Page ignored during converting to the output file

In some cases, the Code Page setting of the Engine must be specified together with the Output Text Format for the final output document. With other output formats, specifying the Code Page is superfluous, since these output converters ignore the Code Page setting (e.g. MS Word).


RecAPI: Non-Asian languages and characters

  • Language, Character Set and Code page Handling Module related pages
Non-Asian languages and characters

The languages recognized by the multi-lingual omnifont MOR recognition module are listed alphabetically. Other text recognition modules support a subset of these characters. Twenty-one of these languages have dictionary support in at least the MOR recognition module, as shown in Language Dictionary List. The accented letters indicated are validated whenever that language is enabled.

The accented letters are denoted by their UNICODE names and code values (upper case first/lower case second). The Latin-alphabet characters are also displayed in their compact representation (base letter plus accent). Only the uppercase form is shown, the lower case equivalents are also supported, except where shown otherwise.

The three-letter language identifier, used in the LANGUAGES enum, is where possible the first three letters of the language name, e.g. Afrikaans is denoted by LANG_AFR.

Language | Accented letters | UNICODE values
Afrikaans | (LANG_AFR)
Cap. & Small E Circumflex (E^) | 00CA/00EA
Cap. & Small E Diaeresis (E:) | 00CB/00EB
Albanian | (LANG_ALB)
Cap. & Small C Cedilla (C,) | 00C7/00E7
Cap. & Small E Diaeresis (E:) | 00CB/00EB
Aymara | (LANG_AYM)
Cap. & Small N Tilde (N~) | 00D1/00F1
Basque | (LANG_BAS)
Cap. & Small E Macron (E-) | 0112/0113
Cap. & Small N Tilde (N~) | 00D1/00F1
Cap. & Small R Acute (R’) | 0154/0155
Bemba | (LANG_BEM)
Blackfoot | (LANG_BLA)
Brazilian | (LANG_BRA)
Accents as for Portuguese
Separate spell checking with MTX
Breton | (LANG_BRE)
Cap. & Small A Grave (A) </TD><TD> 00C0/00E0 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Acute (E’) </TD><TD> 00C9/00E9 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Grave (E) | 00C8/00E8
Cap. & Small E Diaeresis (E:) | 00CB/00EB
Cap. & Small E Circumflex (E^) | 00CA/00EA
Cap. & Small I Diaeresis (I:) | 00CF/00EF
Cap. & Small I Circumflex (I^) | 00CE/00EE
Cap. & Small N Tilde (N~) | 00D1/00F1
Cap. & Small O Circumflex (O^) | 00D4/00F4
Cap. & Small U Diaeresis (U:) | 00DC/00FC
Bugotu | (LANG_BUG)
Bulgarian | (LANG_BUL)
Cyrillic: Russian alphabet
Byelorussian | (LANG_BEL)
Cyrillic: Russian alphabet plus:
Cyr. Cap.& Small Byel.-Ukrainian I | 0406/0456
Cyr. Cap.& Small Short U | 040E/045E
Catalan | (LANG_CAT)
Cap. & Small A Grave (A) </TD><TD> 00C0/00E0 </TD></TR> <TR><TD> </TD><TD> Cap. & Small C Cedilla (C,) </TD><TD> 00C7/00E7 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Grave (E) | 00C8/00E8
Cap. & Small E Acute (E’) | 00C9/00E9
Cap. & Small I Diaeresis (I:) | 00CF/00EF
Cap. & Small I Acute (I’) | 00CD/00ED
Cap. & Small O Grave (O) </TD><TD> 00D2/00F2 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Acute (O’) </TD><TD> 00D3/00F3 </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Acute (U’) </TD><TD> 00DA/00FA </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Diaeresis (U:) </TD><TD> 00DC/00FC </TD></TR> <TR><TD>Chamorro </TD><TD> (LANG_CHA) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Diaeresis (A:) </TD><TD> 00C4/00E4 </TD></TR> <TR><TD>Chechen </TD><TD> (LANG_CHE) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cyrillic: Russian alphabet plus: </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cyrillic Cap. Palochka (no lower case)</TD><TD> 04C0 </TD></TR> <TR><TD>Corsican </TD><TD> (LANG_COR) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Grave (A) | 00C0/00E0
Cap. & Small E Acute (E’) | 00C9/00E9
Cap. & Small E Grave (E) </TD><TD> 00C8/00E8 </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Grave (I) | 00CC/00EC
Cap. & Small I Circumflex (I^) | 00CE/00EE
Cap. & Small I Acute (I’) | 00CD/00ED
Cap. & Small O Acute (O’) | 00D3/00F3
Cap. & Small O Grave (O) </TD><TD> 00D2/00F2 </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Acute (U’) </TD><TD> 00DA/00FA </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Grave (U) | 00D9/00F9
Croatian | (LANG_CRO)
Cap. & Small C Acute (C’) | 0106/0107
Cap. & Small C Hacek (Cv) | 010C/010D
Cap. & Small D Stroke (D/) | 0110/0111
Cap. & Small S Hacek (Sv) | 0160/0161
Cap. & Small Z Hacek (Zv) | 017D/017E
Crow | (LANG_CRW)
Czech | (LANG_CZH)
Cap. & Small A Acute (A’) | 00C1/00E1
Cap. & Small C Hacek (Cv) | 010C/010D
Cap. & Small D Hacek (Dv) | 010E/010F
Cap. & Small E Acute (E’) | 00C9/00E9
Cap. & Small E Hacek (Ev) | 011A/011B
Cap. & Small I Acute (I’) | 00CD/00ED
Cap. & Small N Hacek (Nv) | 0147/0148
Cap. & Small O Acute (O’) | 00D3/00F3
Cap. & Small R Hacek (Rv) | 0158/0178
Cap. & Small S Hacek (Sv) | 0160/0161
Cap. & Small T Hacek (Tv) | 0164/1065
Cap. & Small U Acute (U’) | 00DA/00FA
Cap. & Small U Ring (Uo) | 016E/016F
Cap. & Small Y Acute (Y’) | 00DD/00FD
Cap. & Small Z Hacek (Zv) | 017D/017E
Danish | (LANG_DAN)
Cap. & Small A Ring (Ao) | 00C5/00E5
Cap. & Small AE (Ae) | 00C6/00E6
Cap. & Small O Slash (O/) | 00D8/00F8
Dutch | (LANG_DUT)
Cap. & Small A Grave (A) </TD><TD> 00C0/00E0 </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Acute (A’) </TD><TD> 00C1/00E1 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Grave (E) | 00C8/00E8
Cap. & Small E Acute (E’) | 00C9/00E9
Cap. & Small E Diaeresis (E:) | 00CB/00EB
Cap. & Small E Circumflex (E^) | 00CA/00EA
Cap. & Small I Acute (I’) | 00CD/00ED
Cap. & Small I Diaeresis (I:) | 00CF/00EF
Cap. & Small O Acute (O’) | 00D3/00F3
English | (LANG_ENG)
Eskimo | (LANG_ESK)
Cap. & Small A Acute (A’) | 00C1/00E1
Cap. & Small A Circumflex (A^) | 00C2/00E2
Cap. & Small A Diaeresis (A:) | 00C4/00E4
Cap. & Small A Macron (A-) | 0100/0101
Cap. & Small E Circumflex (E^) | 00CA/00EA
Cap. & Small I Acute (I’) | 00CD/00ED
Cap. & Small I Circumflex (I^) | 00CE/00EE
Cap. & Small I Tilde (I~) | 0128/0129
Cap. & Small I Macron (I-) | 012A/012B
Cap. & Small O Macron (O-) | 014C/014D
Cap. & Small R Acute (R’) | 0154/0155
Esperanto | (LANG_ESP)
Cap. & Small C Circumflex (C^) | 0108/0109
Cap. & Small G Circumflex (G^) | 011C/011D
Cap. & Small H Circumflex (H^) | 0124/0125
Cap. & Small J Circumflex (J^) | 0134/0135
Cap. & Small S Circumflex (S^) | 015C/015D
Cap. & Small U Breve (Uv) | 016C/016D
Estonian | (LANG_EST)
Cap. & Small A Diaeresis (A:) | 00C4/00E4
Cap. & Small O Diaeresis (O:) | 00D6/00F6
Cap. & Small O Tilde (O~) | 00D5/00F5
Cap. & Small U Diaeresis (U:) | 00DC/00FC
Faroese | (LANG_FAR)
Cap. & Small A Acute (A’) | 00C1/00E1
Cap. & Small AE (Ae) | 00C6/00E6
Cap. & Small ETH (D)) | 00D0/00F0
Cap. & Small Acute I (I’) | 00CD/00ED
Cap. & Small O Acute (O’) | 00D3/00F3
Cap. & Small O Slash (O/) | 00D8/00F8
Cap. & Small U Acute (U’) | 00DA/00FA
Cap. & Small Y Acute (Y’) | 00DD/00FD
Fijian | (LANG_FIJ)
Cap. & Small A Macron (A-) | 0100/0101
Cap. & Small E Macron (E-) | 0112/0113
Cap. & Small I Macron (I-) | 012A/012B
Cap. & Small O Macron (O-) | 014C/014D
Cap. & Small U Macron (U-) | 016A/016B
Finnish | (LANG_FIN)
Cap. & Small A Ring (Ao) | 00C5/00E5
Cap. & Small A Diaeresis (A:) | 00C4/00E4
Cap. & Small O Diaeresis (O:) | 00D6/00F6
French | (LANG_FRE)
Cap. & Small A Grave (A) </TD><TD> 00C0/00E0 </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Circumflex (A^) </TD><TD> 00C2/00E2 </TD></TR> <TR><TD> </TD><TD> Cap. & Small C Cedilla (C,) </TD><TD> 00C7/00E7 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Acute (E’) </TD><TD> 00C9/00E9 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Diaeresis (E:) </TD><TD> 00CB/00EB </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Circumflex (E^) </TD><TD> 00CA/00EA </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Grave (E) | 00C8/00E8
Cap. & Small I Diaeresis (I:) | 00CF/00EF
Cap. & Small I Circumflex (I^) | 00CE/00EE
Cap. & Small O Circumflex (O^) | 00D4/00F4
Cap. & Small OE (Oe) | 0152/0153
Cap. & Small U Diaeresis (U:) | 00DC/00FC
Cap. & Small U Circumflex (U^) | 00DB/00DC
Cap. & Small U Grave (U) </TD><TD> 00D9/00F9 </TD></TR> <TR><TD>Frisian </TD><TD> (LANG_FRI) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Circumflex (A^) </TD><TD> 00C2/00E2 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Circumflex (E^) </TD><TD> 00CA/00EA </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Acute (U’) </TD><TD> 00DA/00FA </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Grave (U) | 00D9/00F9
Friulian | (LANG_FRU)
Cap. & Small A Circumflex (A^) | 00C2/00E2
Cap. & Small A Grave (A) </TD><TD> 00C0/00E0 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Acute (E’) </TD><TD> 00C9/00E9 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Circumflex (E^) </TD><TD> 00CA/00EA </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Grave (I) | 00CC/00EC
Cap. & Small O Grave (O) </TD><TD> 00D2/00F2 </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Circumflex (U^) </TD><TD> 00DB/00DC </TD></TR> <TR><TD>Gaelic Irish </TD><TD> (LANG_GLI) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Acute (A’) </TD><TD> 00C1/00E1 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Acute (E’) </TD><TD> 00C9/00E9 </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Acute (I’) </TD><TD> 00CD/00ED </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Acute (O’) </TD><TD> 00D3/00F3 </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Acute (U’) </TD><TD> 00DA/00FA </TD></TR> <TR><TD>Gaelic Scottish </TD><TD> (LANG_GLS) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Grave (A) | 00C0/00E0
Cap. & Small E Grave (E) </TD><TD> 00C8/00E8 </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Grave (I) | 00CC/00EC
Cap. & Small O Grave (O) </TD><TD> 00D2/00F2 </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Grave (U) | 00D9/00F9
Galician | (LANG_GAL)
Cap. & Small A Acute (A’) | 00C1/00E1
Cap. & Small A Tilde (A~) | 00C3/00E3
Cap. & Small C Cedilla (C,) | 00C7/00E7
Cap. & Small E Acute (E’) | 00C9/00E9
Cap. & Small E Circumflex (E^) | 00CA/00EA
Cap. & Small I Acute (I’) | 00CD/00ED
Cap. & Small I Diaeresis (I:) | 00CF/00EF
Cap. & Small N Tilde (N~) | 00D1/00F1
Cap. & Small O Acute (O’) | 00D3/00F3
Cap. & Small O Tilde (O~) | 00D5/00F5
Cap. & Small U Acute (U’) | 00DA/00FA
Cap. & Small U Diaeresis (U:) | 00DC/00FC
Inverted question mark | 00BF
Inverted exclamation mark | 00A1
Ganda (Luganda) | (LANG_GAN)
Cap. & Small N Cedilla (N,) | 0145/1046
German | (LANG_GER)
Cap. & Small A Diaeresis (A:) | 00C4/00E4
Cap. & Small O Diaeresis (O:) | 00D6/00F6
Cap. & Small U Diaeresis (U:) | 00DC/00FC
Small sharp S (Ss) | 00DF
Greek | (LANG_GRE)
(Separate Greek alphabet)
Guarani | (LANG_GUA)
Cap. & Small A Acute (A’) | 00C1/00E1
Cap. & Small A Diaeresis (A:) | 00C4/00E4
Cap. & Small E Acute (E’) | 00C9/00E9
Cap. & Small I Acute (I’) | 00CD/00ED
Cap. & Small N Tilde (N~) | 00D1/00F1
Cap. & Small O Diaeresis (O:) | 00D6/00F6
Cap. & Small U Diaeresis (U:) | 00DC/00FC
Hani | (LANG_HAN)
(if written in Latin alphabet)
Hawaiian | (LANG_HAW)
Hungarian | (LANG_HUN)
Cap. & Small A Acute (A’) | 00C1/00E1
Cap. & Small E Acute (E’) | 00C9/00E9
Cap. & Small I Acute (I’) | 00CD/00ED
Cap. & Small O Diaeresis (O:) | 00D6/00F6
Cap. & Small O Acute (O') | 00D3/00F3
Cap. & Small O Double Acute (O") </TD><TD> 0150/0151 </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Diaeresis (U:) </TD><TD> 00DC/00FC </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Acute (U’) </TD><TD> 00DA/00FA </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Double Acute (U") | 0170/0171
Icelandic | (LANG_ICE)
Cap. & Small A Acute (A’) | 00C1/00E1
Cap. & Small AE (Ae) | 00C6/00E6
Cap. & Small ETH (D)) | 00D0/00F0
Cap. & Small E Acute (E’) | 00C9/00E9
Cap. & Small I Acute (I’) | 00CD/00ED
Cap. & Small O Diaeresis (O:) | 00D6/00F6
Cap. & Small O Acute (O’) | 00D3/00F3
Cap. & Small T THORN (T)) | 00DE/00FE
Cap. & Small U Acute (U’) | 00DA/00FA
Cap. & Small Y Acute (Y’) | 00DD/00FD
Ido | (LANG_IDO)
Indonesian | (LANG_IND)
Interlingua | (LANG_INT)
Italian | (LANG_ITA)
Cap. & Small A Grave (A) </TD><TD> 00C0/00E0 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Acute (E’) </TD><TD> 00C9/00E9 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Grave (E) | 00C8/00E8
Cap. & Small I Grave (I) </TD><TD> 00CC/00EC </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Circumflex (I^) </TD><TD> 00CE/00EE </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Acute (I’) </TD><TD> 00CD/00ED </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Acute (O’) </TD><TD> 00D3/00F3 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Grave (O) | 00D2/00F2
Cap. & Small U Acute (U’) | 00DA/00FA
Cap. & Small U Grave (U) </TD><TD> 00D9/00F9 </TD></TR> <TR><TD>Kabardian </TD><TD> (LANG_KAB) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cyrillic: Russian alphabet plus: </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cyrillic Cap. Palochka (no lower case)</TD><TD> 04C0 </TD></TR> <TR><TD>Kasub </TD><TD> (LANG_KAS) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Ogonok (A,) </TD><TD> 0104/0105 </TD></TR> <TR><TD> </TD><TD> Cap. & Small C Acute (C’) </TD><TD> 0106/0107 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Acute (E’) </TD><TD> 00C9/00E9 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Diaeresis (E:) </TD><TD> 00CB/00EB </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Ogonok (E,) </TD><TD> 0118/0119 </TD></TR> <TR><TD> </TD><TD> Cap. & Small L Slash (L/) </TD><TD> 0141/0142 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Diaeresis (O:) </TD><TD> 00D6/00F6 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Acute (O’) </TD><TD> 00D3/00F3 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Circumflex (O^) </TD><TD> 00D4/00F4 </TD></TR> <TR><TD> </TD><TD> Cap. & Small S Acute (S’) </TD><TD> 015A/015B </TD></TR> <TR><TD> </TD><TD> Cap. & Small Z Acute (Z’) </TD><TD> 0179/017A </TD></TR> <TR><TD> </TD><TD> Cap. & Small Z Dot (Z*) </TD><TD> 017B/017C </TD></TR> <TR><TD>Kawa </TD><TD> (LANG_KAW) </TD><TD> </TD></TR> <TR><TD>Kikuyu </TD><TD> (LANG_KIK) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Tilde (I~) </TD><TD> 0128/0129 </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Tilde (U~) </TD><TD> 0168/0169 </TD></TR> <TR><TD>Kongo </TD><TD> (LANG_KON) </TD><TD> </TD></TR> <TR><TD>Kpelle </TD><TD> (LANG_KPE) </TD><TD> </TD></TR> <TR><TD>Kurdish </TD><TD> (LANG_KUR) </TD><TD> </TD></TR> <TR><TD> </TD><TD> (if written in Latin alphabet) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small C Cedilla (C,) </TD><TD> 00C7/00E7 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Circumflex (E^) </TD><TD> 00CA/00EA </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Diaeresis (O:) </TD><TD> 00D6/00F6 </TD></TR> <TR><TD> </TD><TD> Cap. & Small S Cedilla (S,) </TD><TD> 015E/015F </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Circumflex (U^) </TD><TD> 00DB/00DC </TD></TR> <TR><TD>Latin </TD><TD> (LANG_LTN) </TD><TD> </TD></TR> <TR><TD> </TD><TD> see: note #1 </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Macron (A-) </TD><TD> 0100/0101 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Macron (E-) </TD><TD> 0112/0113 </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Macron (I-) </TD><TD> 012A/012B </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Macron (O-) </TD><TD> 014C/014D </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Macron (U-) </TD><TD> 016A/016B </TD></TR> <TR><TD>Latvian </TD><TD> (LANG_LAT) </TD><TD> </TD></TR> <TR><TD> </TD><TD> see: note #2 </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Macron (A-) </TD><TD> 0100/0101 </TD></TR> <TR><TD> </TD><TD> Cap. & Small C Hacek (Cv) </TD><TD> 010C/010D </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Macron (E-) </TD><TD> 0112/0113 </TD></TR> <TR><TD> </TD><TD> Cap. G Cedilla (G,) </TD><TD> 0122 </TD></TR> <TR><TD> </TD><TD> Small G Acute (g’) </TD><TD> glyph variant of 0123 </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Macron (I-) </TD><TD> 012A/012B </TD></TR> <TR><TD> </TD><TD> Cap. & Small K Cedilla (K,) </TD><TD> 0136/0137 </TD></TR> <TR><TD> </TD><TD> Cap. & Small L Cedilla (L,) </TD><TD> 013B/013C </TD></TR> <TR><TD> </TD><TD> Cap. & Small N Cedilla (N,) </TD><TD> 0145/1046 </TD></TR> <TR><TD> </TD><TD> Cap. & Small R Cedilla (R,) </TD><TD> 0156/0157 </TD></TR> <TR><TD> </TD><TD> Cap. & Small S Hacek (Sv) </TD><TD> 0160/0161 </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Macron (U-) </TD><TD> 016A/016B </TD></TR> <TR><TD> </TD><TD> Cap. & Small Z Hacek (Zv) </TD><TD> 017D/017E </TD></TR> <TR><TD>Lithuanian </TD><TD> (LANG_LIT) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Ogonok (A,) </TD><TD> 0104/0105 </TD></TR> <TR><TD> </TD><TD> Cap. & Small C Hacek (Cv) </TD><TD> 010C/010D </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Dot (E*) </TD><TD> 0116/0117 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Ogonok (E,) </TD><TD> 0118/0119 </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Ogonok (I,) </TD><TD> 012E/012F </TD></TR> <TR><TD> </TD><TD> Cap. & Small S Hacek (Sv) </TD><TD> 0160/0161 </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Macron (U-) </TD><TD> 016A/016B </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Ogonok (U,) </TD><TD> 0172/0173 </TD></TR> <TR><TD> </TD><TD> Cap. & Small Z Hacek (Zv) </TD><TD> 017D/017E </TD></TR> <TR><TD>Luba </TD><TD> (LANG_LUB) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small N Tilde (N~) </TD><TD> 00D1/00F1 </TD></TR> <TR><TD> </TD><TD> Cap. & Small S Hacek (Sv) </TD><TD> 0160/0161 </TD></TR> <TR><TD> </TD><TD> Cap. & Small Z Hacek (Zv) </TD><TD> 017D/017E </TD></TR> <TR><TD>Luxembourgish </TD><TD> (LANG_LUX) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Circumflex (A^) </TD><TD> 00C2/00E2 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Acute (E’) </TD><TD> 00C9/00E9 </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Circumflex (U^) </TD><TD> 00DB/00DC </TD></TR> <TR><TD>Macedonian </TD><TD> (LANG_MAC) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cyrillic: Russian alphabet plus: </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cyrillic Cap. & Small GJE </TD><TD> 0403/0453 </TD></TR> <TR><TD> </TD><TD> Cyrillic Cap. & Small DZE </TD><TD> 0405/0455 </TD></TR> <TR><TD> </TD><TD> Cyrillic Cap. & Small JE </TD><TD> 0408/0458 </TD></TR> <TR><TD> </TD><TD> Cyrillic Cap. & Small LJE </TD><TD> 0409/0459 </TD></TR> <TR><TD> </TD><TD> Cyrillic Cap. & Small NJE </TD><TD> 040A/045A </TD></TR> <TR><TD> </TD><TD> Cyrillic Cap. & Small KJE </TD><TD> 040C/045C </TD></TR> <TR><TD> </TD><TD> Cyrillic Cap. & Small DZHE </TD><TD> 040F/045F </TD></TR> <TR><TD>Malagasy </TD><TD> (LANG_MLG) </TD><TD> </TD></TR> <TR><TD> </TD><TD> see: note #3 </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Acute (A’) </TD><TD> 00C1/00E1 </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Grave (A) | 00C0/00E0
Cap. & Small E Acute (E’) | 00C9/00E9
Cap. & Small E Grave (E) </TD><TD> 00C8/00E8 </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Grave (I) | 00CC/00EC
Cap. & Small I Acute (I’) | 00CD/00ED
Cap. & Small O Acute (O’) | 00D3/00F3
Cap. & Small O Grave (O) </TD><TD> 00D2/00F2 </TD></TR> <TR><TD> </TD><TD> Cap. & Small Y Acute (Y’) </TD><TD> 00DD/00FD </TD></TR> <TR><TD>Malay </TD><TD> (LANG_MLY) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Hacek (Ev) </TD><TD> 011A/011B </TD></TR> <TR><TD>Malinke </TD><TD> (LANG_MLN) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Acute (E’) </TD><TD> 00C9/00E9 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Grave (E) | 00C8/00E8
Maltese | (LANG_MAL)
Cap. & Small C Dot (C*) | 010A/010B
Cap. & Small G Dot (G*) | 0120/0121
Cap. & Small H Bar (H/) | 0126/0127
Cap. & Small Z Dot (Z*) | 017B/017C
Maori | (LANG_MAO)
Mayan | (LANG_MAY)
Cap. & Small A Diaeresis (A:) | 00C4/00E4
Miao | (LANG_MIA)
(if written in Latin alphabet)
Minangkabau | (LANG_MIN)
Cap. & Small E Macron (E-) | 0112/0113
Mohawk | (LANG_MOH)
Moldavian | (LANG_MOL)
Cyrillic: Russian alphabet
Nahuatl | (LANG_NAH)
Norwegian | (LANG_NOR)
Cap. & Small A Ring (Ao) | 00C5/00E5
Cap. & Small AE (Ae) | 00C6/00E6
Cap. & Small O Slash (O/) | 00D8/00F8
Nyanja | (LANG_NYA)
Occidental | (LANG_OCC)
Ojibway | (LANG_OJI)
see: note #4
Cap. & Small S Hacek (Sv) | 0160/0161
Papiamento | (LANG_PAP)
Cap. & Small A Acute (A’) | 00C1/00E1
Cap. & Small C Cedilla (C,) | 00C7/00E7
Cap. & Small E Acute (E’) | 00C9/00E9
Cap. & Small N Tilde (N~) | 00D1/00F1
Cap. & Small O Acute (O’) | 00D3/00F3
Pidgin English | (LANG_PID)
Polish | (LANG_POL)
Cap. & Small A Ogonok (A,) | 0104/0105
Cap. & Small C Acute (C’) | 0106/0107
Cap. & Small E Ogonok (E,) | 0118/0119
Cap. & Small L Slash (L/) | 0141/0142
Cap. & Small N Acute (N’) | 0143/0144
Cap. & Small O Acute (O’) | 00D3/00F3
Cap. & Small S Acute (S’) | 015A/015B
Cap. & Small Z Acute (Z’) | 0179/017A
Cap. & Small Z Dot (Z*) | 017B/017C
Portuguese | (LANG_POR)
Cap. & Small A Acute (A’) | 00C1/00E1
Cap. & Small A Circumflex (A^) | 00C2/00E2
Cap. & Small A Grave (A) </TD><TD> 00C0/00E0 </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Tilde (A~) </TD><TD> 00C3/00E3 </TD></TR> <TR><TD> </TD><TD> Cap. & Small C Cedilla (C,) </TD><TD> 00C7/00E7 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Acute (E’) </TD><TD> 00C9/00E9 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Diaeresis (E:) </TD><TD> 00CB/00EB </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Circumflex (E^) </TD><TD> 00CA/00EA </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Grave (E) | 00C8/00E8
Cap. & Small I Grave (I) </TD><TD> 00CC/00EC </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Acute (I’) </TD><TD> 00CD/00ED </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Diaeresis (I:) </TD><TD> 00CF/00EF </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Acute (O’) </TD><TD> 00D3/00F3 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Circumflex (O^) </TD><TD> 00D4/00F4 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Grave (O) | 00D2/00F2
Cap. & Small O Tilde (O~) | 00D5/00F5
Cap. & Small U Diaeresis (U:) | 00DC/00FC
Cap. & Small U Acute (U’) | 00DA/00FA
Feminine Ordinal indicator (a_) | 00AA
Masculine Ordinal indicator (o_) | 00BA
Provençal | (LANG_PRO)
Cap. & Small A Grave (A) </TD><TD> 00C0/00E0 </TD></TR> <TR><TD> </TD><TD> Cap. & Small C Cedilla (C,) </TD><TD> 00C7/00E7 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Acute (E’) </TD><TD> 00C9/00E9 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Grave (E) | 00C8/00E8
Cap. & Small I Diaeresis (I:) | 00CF/00EF
Cap. & Small O Acute (O’) | 00D3/00F3
Quechua | (LANG_QUE)
Cap. & Small N Tilde (N~) | 00D1/00F1
Rhaetic | (LANG_RHA)
see: note #5
Cap. & Small A Circumflex (A^) | 00C2/00E2
Cap. & Small A Grave (A) </TD><TD> 00C0/00E0 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Circumflex (E^) </TD><TD> 00CA/00EA </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Grave (E) | 00C8/00E8
Cap. & Small O Diaeresis (O:) | 00D6/00F6
Cap. & Small O Grave (O) </TD><TD> 00D2/00F2 </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Diaeresis (U:) </TD><TD> 00DC/00FC </TD></TR> <TR><TD>Romanian </TD><TD> (LANG_ROM) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Circumflex (A^) </TD><TD> 00C2/00E2 </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Breve (Av) </TD><TD> 0102/0103 </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Circumflex (I^) </TD><TD> 00CE/00EE </TD></TR> <TR><TD> </TD><TD> Cap. & Small S Cedilla (S,) </TD><TD> 015E/015F </TD></TR> <TR><TD> </TD><TD> Cap. & Small T Cedilla (T,) </TD><TD> 0162/0163 </TD></TR> <TR><TD>Romany </TD><TD> (LANG_ROY) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small C Hacek (Cv) </TD><TD> 010C/010D </TD></TR> <TR><TD> </TD><TD> Cap. & Small S Hacek (Sv) </TD><TD> 0160/0161 </TD></TR> <TR><TD> </TD><TD> Cap. & Small Z Hacek (Zv) </TD><TD> 017D/017E </TD></TR> <TR><TD>Rwanda </TD><TD> (LANG_RUA) </TD><TD> </TD></TR> <TR><TD>Rundi </TD><TD> (LANG_RUN) </TD><TD> </TD></TR> <TR><TD>Russian </TD><TD> (LANG_RUS) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cyrillic: Separate Russian alphabet. </TD><TD> </TD></TR> <TR><TD> </TD><TD> See the topic Characters and Code Pages for a listing.</TD><TD> </TD></TR> <TR><TD> </TD><TD> Letters of the English alphabet remain enabled.</TD><TD> </TD></TR> <TR><TD>Sami </TD><TD> (LANG_SMI) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Acute (A’) </TD><TD> 00C1/00E1 </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Diaeresis (A:) </TD><TD> 00C4/00E4 </TD></TR> <TR><TD> </TD><TD> Cap. & Small AE (Ae) </TD><TD> 00C6/00E6 </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Ring (Ao) </TD><TD> 00C5/00E5 </TD></TR> <TR><TD> </TD><TD> Cap. & Small C Hacek (Cv) </TD><TD> 010C/010D </TD></TR> <TR><TD> </TD><TD> Cap. & Small D Stroke (D/) </TD><TD> 0110/0111 </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Diaeresis (I:) </TD><TD> 00CF/00EF </TD></TR> <TR><TD> </TD><TD> Cap. & Small N Tilde (N~) </TD><TD> 00D1/00F1 </TD></TR> <TR><TD> </TD><TD> Cap. & Small N Acute (N’) </TD><TD> 0143/0144 </TD></TR> <TR><TD> </TD><TD> Cap. & Small ENG </TD><TD> 014a/014b </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Diaeresis (O:) </TD><TD> 00D6/00F6 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Slash (O/) </TD><TD> 00D8/00F8 </TD></TR> <TR><TD> </TD><TD> Cap. & Small S Hacek (Sv) </TD><TD> 0160/0161 </TD></TR> <TR><TD> </TD><TD> Cap. & Small T Bar </TD><TD> 0166/0167 </TD></TR> <TR><TD> </TD><TD> Cap. & Small Z Hacek (Zv) </TD><TD> 017D/017E </TD></TR> <TR><TD>Sami, Lula </TD><TD> (LANG_SML) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Acute (A’) </TD><TD> 00C1/00E1 </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Diaeresis (A:) </TD><TD> 00C4/00E4 </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Ring (Ao) </TD><TD> 00C5/00E5 </TD></TR> <TR><TD> </TD><TD> Cap. & Small N Tilde (N~) </TD><TD> 00D1/00F1 </TD></TR> <TR><TD> </TD><TD> Cap. & Small N Acute (N’) </TD><TD> 0143/0144 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Diaeresis (O:) </TD><TD> 00D6/00F6 </TD></TR> <TR><TD>Sami, Northern (</TD><TD> LANG_SMN) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Acute (A’) </TD><TD> 00C1/00E1 </TD></TR> <TR><TD> </TD><TD> Cap. & Small AE (Ae) </TD><TD> 00C6/00E6 </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Diaeresis(A:) </TD><TD> 00C4/00E4 </TD></TR> <TR><TD> </TD><TD> Cap. & Small C Hacek (Cv) </TD><TD> 010C/010D </TD></TR> <TR><TD> </TD><TD> Cap. & Small D Stroke (D/) </TD><TD> 0110/0111 </TD></TR> <TR><TD> </TD><TD> Cap. & Small ENG 014a/014b </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Diaeresis (O:) </TD><TD> 00D6/00F6 </TD></TR> <TR><TD> </TD><TD> Cap. & Small S Hacek (Sv) </TD><TD> 0160/0161 </TD></TR> <TR><TD> </TD><TD> Cap. & Small T Bar </TD><TD> 0166/0167 </TD></TR> <TR><TD> </TD><TD> Cap. & Small Z Hacek (Zv) </TD><TD> 017D/017E </TD></TR> <TR><TD>Sami, Southern (</TD><TD> LANG_SMS) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Diaeresis (A:) </TD><TD> 00C4/00E4 </TD></TR> <TR><TD> </TD><TD> Cap. & Small AE (Ae) </TD><TD> 00C6/00E6 </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Ring (Ao) </TD><TD> 00C5/00E5 </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Diaeresis (I:) </TD><TD> 00CF/00EF </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Diaeresis (O:) </TD><TD> 00D6/00F6 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Slash (O/) </TD><TD> 00D8/00F8 </TD></TR> <TR><TD>Samoan </TD><TD> (LANG_SAM) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Macron (A-) </TD><TD> 0100/0101 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Macron (O-) ?? </TD><TD> 014C/014D </TD></TR> <TR><TD>Sardinian </TD><TD> (LANG_SAR) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Grave (A) | 00C0/00E0
Cap. & Small E Acute (E’) | 00C9/00E9
Cap. & Small E Grave (E) </TD><TD> 00C8/00E8 </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Grave (I) | 00CC/00EC
Cap. & Small O Grave (O) </TD><TD> 00D2/00F2 </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Grave (U) | 00D9/00F9
Serbian | (LANG_SRB)
Cyrillic: Russian alphabet minus some characters, but plus:
Cyrillic Cap. & Small DJE | 0402/0452
Cyrillic Cap. & Small JE | 0408/0458
Cyrillic Cap. & Small LJE | 0409/0459
Cyrillic Cap. & Small NJE | 040A/045A
Cyrillic Cap. & Small KJE | 040C/045C
Cyrillic Cap. & Small TSHE | 040B/045B
Cyrillic Cap. & Small DZHE | 040F/045F
Serbian, Latinic | (LANG_SRL)
Latin alphabet.
Cap. & Small C Acute (C’) | 0106/0107
Cap. & Small C Hacek (Cv) | 010C/010D
Cap. & Small D Stroke (D/) | 0110/0111
Cap. & Small Z Hacek (Zv) | 017D/017E
Cap. & Small S Hacek (Sv) | 0160/0161
Shona | (LANG_SHO)
Sioux | (LANG_SIO)
Slovak | (LANG_SLK)
Cap. & Small A Diaeresis (A:) | 00C4/00E4
Cap. & Small A Acute (A’) | 00C1/00E1
Cap. & Small C Hacek (Cv) | 010C/010D
Cap. & Small D Hacek (Dv) | 010E/010F
Cap. & Small E Acute (E’) | 00C9/00E9
Cap. & Small I Acute (I’) | 00CD/00ED
Cap. & Small L Acute (L’) | 0139/013A
Cap. & Small L Hacek (Lv) | 013D/013E
Cap. & Small N Hacek (Nv) | 0147/0148
Cap. & Small O Acute (O’) | 00D3/00F3
Cap. & Small O Circumflex (O^) | 00D4/00F4
Cap. & Small R Acute (R’) | 0154/0155
Cap. & Small S Hacek (Sv) | 0160/0161
Cap. & Small T Hacek (Tv) | 0164/1065
Cap. & Small U Acute (U’) | 00DA/00FA
Cap. & Small Y Acute (Y’) | 00DD/00FD
Cap. & Small Z Hacek (Zv) | 017D/017E
Slovenian | (LANG_SLN)
Cap. & Small C Hacek (Cv) | 010C/010D
Cap. & Small S Hacek (Sv) | 0160/0161
Cap. & Small Z Hacek (Zv) | 017D/017E
Somali | (LANG_SOM)
Sorbian (Wend) | (LANG_WEN)
Cap. & Small C Acute (C’) | 0106/0107
Cap. & Small C Hacek (Cv) | 010C/010D
Cap. & Small E Hacek (Ev) | 011A/011B
Cap. & Small L Slash (L/) | 0141/0142
Cap. & Small N Acute (N’) | 0143/0144
Cap. & Small R Hacek (Rv) | 0158/0178
Cap. & Small S Hacek (Sv) | 0160/0161
Cap. & Small S Acute (S') | 015A/015B
Cap. & Small Z Acute (Z') | 0179/017A
Cap. & Small Z Hacek (Zv) | 017D/017E
Sotho, Sesuto | (LANG_SOT)
Cap. & Small E Grave (E) </TD><TD> 00C8/00E8 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Macron (O-) </TD><TD> 014C/014D </TD></TR> <TR><TD> </TD><TD> Cap. & Small S Hacek (Sv) </TD><TD> 0160/0161 </TD></TR> <TR><TD>Spanish </TD><TD> (LANG_SPA) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Acute (A’) </TD><TD> 00C1/00E1 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Acute (E’) </TD><TD> 00C9/00E9 </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Acute (I’) </TD><TD> 00CD/00ED </TD></TR> <TR><TD> </TD><TD> Cap. & Small N Tilde (N~) </TD><TD> 00D1/00F1 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Acute (O’) </TD><TD> 00D3/00F3 </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Diaeresis (U:) </TD><TD> 00DC/00FC </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Acute (U’) </TD><TD> 00DA/00FA </TD></TR> <TR><TD> </TD><TD> Feminine Ordinal indicator (a_) </TD><TD> 00AA </TD></TR> <TR><TD> </TD><TD> Masculine Ordinal indicator (o_) </TD><TD> 00BA </TD></TR> <TR><TD> </TD><TD> Inverted question mark </TD><TD> 00BF </TD></TR> <TR><TD> </TD><TD> Inverted exclamation mark </TD><TD> 00A1 </TD></TR> <TR><TD>Sundanese </TD><TD> (LANG_SUN) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Hacek (Ev) </TD><TD> 011A/011B </TD></TR> <TR><TD> </TD><TD> sometimes written as </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Grave (E) | 00C8/00E8
Swahili | (LANG_SWA)
Swazi | (LANG_SWZ)
Swedish | (LANG_SWE)
Cap. & Small A Diaeresis (A:) | 00C4/00E4
Cap. & Small A Ring (Ao) | 00C5/00E5
Cap. & Small O Diaeresis (O:) | 00D6/00F6
Tagalog | (LANG_TAG)
Tahitian | (LANG_TAH)
Cap. & Small A Circumflex (A^) | 00C2/00E2
Cap. & Small E Circumflex (E^) | 00CA/00EA
Cap. & Small I Diaeresis (I:) | 00CF/00EF
Cap. & Small O Circumflex (O^) | 00D4/00F4
Pirez | (LANG_TIN)
(if written in Latin alphabet)
Tongan | (LANG_TON)
Tswana (Chuana) | (LANG_CHU)
Cap. & Small E Grave (E) </TD><TD> 00C8/00E8 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Circumflex (E^) </TD><TD> 00CA/00EA </TD></TR> <TR><TD> </TD><TD> Cap. & Small N Tilde (N~) </TD><TD> 00D1/00F1 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Macron (O-) </TD><TD> 014C/014D </TD></TR> <TR><TD> </TD><TD> Cap. & Small S Hacek (Sv) </TD><TD> 0160/0161 </TD></TR> <TR><TD>Tun </TD><TD> (LANG_TUN) </TD><TD> </TD></TR> <TR><TD> </TD><TD> (if written in Latin alphabet) </TD><TD> </TD></TR> <TR><TD>Turkish </TD><TD> (LANG_TUR) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Circumflex (A^) </TD><TD> 00C2/00E2 </TD></TR> <TR><TD> </TD><TD> Cap. & Small C Cedilla (C,) </TD><TD> 00C7/00E7 </TD></TR> <TR><TD> </TD><TD> Cap. & Small G Breve (Gv) </TD><TD> 011E/011F </TD></TR> <TR><TD> </TD><TD> Cap. & Small I Circumflex (I^) </TD><TD> 00CE/00EE </TD></TR> <TR><TD> </TD><TD> Cap. I Dot (I*) </TD><TD> 0130 </TD></TR> <TR><TD> </TD><TD> Small Dotless I (i ) </TD><TD> 0131 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Diaeresis (O:) </TD><TD> 00D6/00F6 </TD></TR> <TR><TD> </TD><TD> Cap. & Small S Cedilla (S,) </TD><TD> 015E/015F </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Diaeresis (U:) </TD><TD> 00DC/00FC </TD></TR> <TR><TD> </TD><TD> Cap. & Small U Circumflex (U^) </TD><TD> 00DB/00DC </TD></TR> <TR><TD>Visayan </TD><TD> (LANG_VIS) </TD><TD> </TD></TR> <TR><TD>Ukrainian </TD><TD> (LANG_UKR) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cyrillic: Russian alphabet plus: </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small Cyrillic Ukrainian IE </TD><TD> 0404/0454 </TD></TR> <TR><TD> </TD><TD> Cap. & Small Cyr.Byel.-Ukrainian I </TD><TD> 0406/0456 </TD></TR> <TR><TD> </TD><TD> Cap. & Small Cyrillic YI </TD><TD> 0407/0457 </TD></TR> <TR><TD>Welsh </TD><TD> (LANG_WEL) </TD><TD> </TD></TR> <TR><TD> </TD><TD> see: note #6 </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Acute (A’) </TD><TD> 00C1/00E1 </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Circumflex (A^) </TD><TD> 00C2/00E2 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Acute (E’) </TD><TD> 00C9/00E9 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Diaeresis (E:) </TD><TD> 00CB/00EB </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Acute (O’) </TD><TD> 00D3/00F3 </TD></TR> <TR><TD> </TD><TD> Cap. & Small O Circumflex (O^) </TD><TD> 00D4/00F4 </TD></TR> <TR><TD> </TD><TD> Cap. & Small W Circumflex (W^) </TD><TD> 0174/0175 </TD></TR> <TR><TD> </TD><TD> Cap. & Small Y Acute (Y’) </TD><TD> 00DD/00FD </TD></TR> <TR><TD> </TD><TD> Cap. & Small Y Circumflex (Y^) </TD><TD> 0176/0177 </TD></TR> <TR><TD>Wolof </TD><TD> (LANG_WOL) </TD><TD> </TD></TR> <TR><TD> </TD><TD> Cap. & Small A Circumflex (A^) </TD><TD> 00C2/00E2 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Acute (E’) </TD><TD> 00C9/00E9 </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Circumflex (E^) </TD><TD> 00CA/00EA </TD></TR> <TR><TD> </TD><TD> Cap. & Small E Grave (E) | 00C8/00E8
Cap. & Small O Circumflex (O^) | 00D4/00F4
Cap. & Small U Circumflex (U^) | 00DB/00DC
Xhosa | (LANG_XHO)
Zapotec | (LANG_ZAP)
Zulu | (LANG_ZUL)
Note
Latin normally does not use accented characters, but sometimes in reference works and textbooks macrons or breves are used to indicate long vowels.
The lower case form of (G,) is (g').
Some dialects of Malagasy are written without accented letters.
Ojibway also has a character like a dotless question mark.
Sometimes Raetic (Romansch) is written without accented letters.
No supplied code page except UNICODE supports w^ and y^. These characters appear very rarely in Welsh, so it may be acceptable to use a traditional output code page to handle them.


RecAPI: Languages, geography, Code Pages

  • Language, Character Set and Code page Handling Module related pages
Languages, geography, Code Pages

This table lists the languages alphabetically and tells approximately how many millions of speakers each has (Sp. m.) and in which geographical areas each language is spoken.

It tells which of the basic Code Pages can handle the language. The Code Pages are:

  • Windows 1252 and DOS 850 (West European)
  • Windows 1250 and DOS 852 (East European)
  • Windows 1257 Baltic
  • DOS 437 (IBM ASCII PC8)

The support level is shown as follows:

  • Y = Yes,
  • N = No,
  • A = Almost,
  • C = Suitable, but some upper case accented characters not supported.
Language | Sp. m. | Location | Code Page support |  |  |  | Other Code Pages
 |  |  | 1252 | 1250 | 1257 | 437 |
 |  |  | 850 | 852 |  |  |
Afrikaans | 6 | South Africa | Y | A | Y | C |
Albanian | 4 | Albania, Kosovo | Y | Y | N | C |
Aymara | 2 | Bolivia, Peru | Y | N | N | Y |
Basque | 1 | NE Spain, SW France | N | N | N | N | User set for R'
Bemba | 2 | Zambia | Y | Y | Y | Y |
Blackfoot | <1 | USA/Canada (Alberta) | Y | Y | Y | Y |
Brazilian See Portuguese |
Breton | 1 | NW France | Y | N | N | C |
Bugotu | <1 | Solomon Is. (Pacific) | Y | Y | Y | Y |
Bulgarian | 8 | Bulgaria | N | N | N | N | Cyrillic sets
Byelorussian | 7 | Byelorussia | N | N | N | N | Cyrillic sets
Catalan | 7 | NE Spain, Andorra | Y | N | N | C |
Chamorro | <1 | Guam (Pacific) | Y | Y | Y | Y |
Chechen | <1 | Caucasus | N | N | N | N | Cyrillic sets
Corsican | <1 | Corsica | Y | N | N | C |
Croatian | 5 | Croatia | N | Y | N | N | 7-bit C-S set for DOS
Crow | <1 | USA (Montana) | Y | Y | Y | Y |
Czech | 10 | Czech Republic | N | Y | N | N | IVKAM-CS for DOS
Danish | 5 | Denmark, Greenland | Y | N | Y | N | CP 865 for DOS
Dutch | 15 | NL,Nth BE(as Flemish) | Y | A | Y | C |
English | 350 | US, GB, CA, AU, NZ… | Y | Y | Y | Y |
Eskimo | <1 | Canada,GL,RU | N | N | N | N | User: R'
Esperanto | 1 | Diaspora | N | N | N | N | Esperanto set or Unicode
Estonian | 1 | Estonia | Y | N | Y | N |
Faroese | <1 | Faroe Islands | Y | N | N | N |
Fijian | <1 | Fiji (S. Pacific) | N | N | Y | N | Or a user set.
Finnish | 5 | Finland | Y | A | Y | Y |
French | 75 | FR,BE,CH,CA,Africa... | Y | N | N | C | DOS 863 Canadian-Fr.
Frisian | <1 | N.Netherlands | Y | N | N | C |
Friulian | <1 | Italian Alps | Y | N | N | C |
Gaelic Irish | 1 | Ireland | Y | Y | N | C |
Gaelic Scottish | <1 | Scotland | Y | N | N | C |
Galician | 4 | Spain | Y | N | N | C | CP 860 for DOS
Ganda | 3 | Uganda | A | A | Y | A |
German | 100 | Germany,AT,CH,BE... | Y | Y | Y | Y |
Greek | 10 | Greece, Cyprus | N | N | N | N | Greek sets
Guarani | 3 | Paraguay | Y | A | N | C |
Hani * | <1 | China (Yuny) | Y | Y | Y | Y |
Hawaiian | <1 | Hawaii | Y | Y | Y | Y |
Hungarian | 12 | Hungary, Romania | N | Y | N | N | or Hungarian sets
Icelandic | <1 | Iceland | Y | A | N | N | Icelandic Set for DOS
Ido | – | (Project) | Y | Y | Y | Y |
Indonesian | 160 | Indonesia | Y | Y | Y | Y |
Interlingua | – | (Project) | Y | Y | Y | Y |
Italian | 60 | Italy, S. Switz. | Y | N | N | C |
Kabardian | <1 | Caucasus | N | N | N | N | Cyrillic Sets
Kawa | <1 | Burma | Y | Y | Y | Y |
Kasub | <1 | Gdansk area, Poland | N | Y | A | N |
Kikuyu | 6 | Kenya | N | N | N | N | User set: I- with U~
Kongo | 6 | Zaire/Angola | Y | Y | Y | Y |
Kpelle | 1 | Liberia | Y | Y | Y | Y |
Kurdish * | 4 | Turkey, IQ,IN,SY,RU | N | N | N | N | CP 1254 or Turkish DOS
Latin | – | Diaspora | Y | Y | Y | Y | CP 1257 Baltic for macrons
Latvian | 2 | Latvia | N | N | Y | N |
Lithuanian | 3 | Lithuania | N | N | Y | N |
Luba | 6 | Zaire | N | A | A | N | DOS Sloven&Croat
Luxembourgish | <1 | Luxembourg | Y | A | N | C |
Macedonian | 1 | Macedonia (FYROM) | N | N | N | N | Cyrillic sets
Malagasy | 13 | Madagascar | Y | N | N | C | User set for some dialects
Malay | 11 | Malaysia | N | Y | N | N | or user set for e-breve
Malinke | 3 | W. Africa | Y | N | N | C |
Maltese | <1 | Malta | N | N | N | N | Maltese DOS or Unicode
Maori | <1 | New Zealand | Y | Y | Y | Y |
Mayan | 3 | Mexico, Guatemala | Y | Y | Y | Y |
Miao * | 8 | China/Laos/Cambodia.. | Y | Y | Y | Y |
Minangkabau | 6 | Indonesia,Sumatra | A | N | A | N | User set: E- with I:
Mohawk | <1 | USA (NY)/Canada | Y | Y | Y | Y |
Moldavian | 3 | Moldavia | N | N | N | N | Cyrillic sets
Nahuatl | 2 | Mexico | Y | Y | Y | Y |
Norwegian | 4 | Norway | Y | N | Y | N | CP 865 for DOS
Nyanja | 6 | Malawi/Zambia | Y | Y | Y | Y |
Occidental | – | (project) | N | Y | A | N |
Ojibway | <1 | US (Wisc.),Canada | Y | Y | Y | Y |
Papiamento | <1 | Neth. Antilles | Y | A | N | C |
Pidgin English | <1 | Papua/New Guinea | Y | Y | Y | Y |
Polish | 36 | Poland... | N | Y | Y | N | Mazowia for DOS
Portuguese | 170 | Portugal, Brazil, Africa | Y | N | N | N | CP 860 for DOS
Provençal | 2 | S. France | Y | N | N | C |
Quechua | 7 | Peru, Bolivia, Ecuador | Y | N | N | Y |
Rhaetic | <1 | SE Switzerland | Y | N | N | C |
Romanian | 20 | Romania | N | Y | N | N |
Romany | 5 | Diaspora | N | Y | Y | N |
Rwanda | 12 | Rwanda/Zaire | Y | Y | Y | Y |
Rundi | 7 | Burundi | Y | Y | Y | Y |
Russian | 150 | Russia... | N | N | N | N | Cyrillic sets
Sami | <1 | Norway, Sweden, Finland, Russia | N | Y | Y | N | or own set.
Sami, Lule | <1 | Norway, Sweden | N | Y | Y | N | or own set.
Sami, Northern | <1 | Norway, Sweden, Finland | N | Y | Y | N | or own set.
Sami, Southern | <1 | Norway, Sweden | N | Y | Y | N | or own set.
Samoan | <1 | Samoa (S. Pacific) | N | N | Y | N |
Sardinian | 1 | Sardinia | Y | N | N | C |
Serbian | 8 | Yugoslavia | N | N | N | N |
Serbian, Latinic | 8 | Yugoslavia | N | Y | N | N | 7-bit C-S set for DOS
Shona | 8 | Zimbabwe | Y | Y | Y | Y |
Sioux | <1 | USA (Nebraska) | Y | Y | Y | Y |
Slovak | 5 | Slovakia | N | Y | N | N | IVKAM-CS for DOS
Slovenian | 2 | Slovenia | N | Y | Y | N | 7-bit C-S set for DOS
Somali | 9 | Somalia | Y | Y | Y | Y |
Sorbian (Wend) | <1 | Germany (Saxony) | N | Y | N | N |
Sotho | 5 | Lesotho, South Africa | Y | Y | Y | Y |
Spanish | 325 | Spain, Latin-America | Y | N | N | C |
Sundanese | 25 | Indonesia | N | Y | N | N |
Swahili | 10 | East Africa | Y | Y | Y | Y |
Swazi | <2 | Swaziland and South Africa | Y | Y | Y | Y |
Swedish | 9 | Sweden, Finland | Y | A | Y | Y |
Tagalog | 35 | Philipines | Y | Y | Y | Y |
Tahitian | <1 | Tahiti (S. Pacific) | Y | N | N | C |
Pirez | <1 | China (Yunnan) | Y | Y | Y | Y |
Tongan | <1 | Tonga (Pacific) | Y | Y | Y | Y |
Tswana | 4 | Botswana | A | N | N | N | User set: N~ with Sv
Tun * | <1 | China (Tibet) | Y | Y | Y | Y |
Turkish | 55 | Turkey, Cyprus… | N | N | N | N | CP 1254 or Turkish DOS
Ukrainian | 40 | Ukraine | N | N | N | N | Cyrillic sets
Visayan | 24 | Philipines | Y | Y | Y | Y |
Welsh | <1 | Wales | A | A | N | N | User set: W^ Y^
Wolof | 4 | Senegal | Y | N | N | C |
Xhosa | 8 | South Africa | Y | Y | Y | Y |
Zapotec | 1 | Mexico | Y | Y | Y | Y |
Zulu | 8 | South Africa | Y | Y | Y | Y |

In some languages, accented letters are used in some dialects or variants, but not in others. The range of accents can also vary, either between dialects, purpose of text or differing transcription norms.

* Supported only if written in the Latin alphabet.

Most of the information on the approximate number of speakers in millions and the main areas where the language is spoken was taken from "The Languages of the World" by Kenneth Katzner (Routledge Kegan Paul, 1995). Other sources give very different estimates for the number of speakers for some languages.

The Windows Code Page 1252 (Western Europe) and DOS CP 850 (Multi-lingual, Western Europe) are virtually identical. The only difference between them is upper case Ÿ, which is missing from DOS CP 850 (this affects only French, and only very marginally). The East European sets 1250 (Windows) and 852 (DOS) cover the same characters.


RecAPI: Languages and modules

  • Language, Character Set and Code page Handling Module related pages
Languages and modules

The following table shows the text recognition module support for each languages.

NOTE: the modules MTX and DOT are supported on: Windows, MOR and RER are supported on: Windows, Linux and MacOS x64.

Language | MOR | MTX | FRX | PLUS2W | PLUS3W | DOT | RER
Afrikaans | Yes | No | Yes | Yes | Yes | Yes C | Yes
Albanian | Yes | No | Yes | Yes | Yes | Yes C | Yes
Aymara | Yes | No | Yes | Yes | Yes | Yes | Yes
Basque | Yes | No | Yes | Yes | Yes | No | Yes
Bemba | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Blackfoot | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Brazilian B | Yes B | Yes | Yes | Yes | Yes | Yes | Yes
Breton | Yes | No | Yes | Yes | Yes | Yes C | Yes
Bugotu | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Bulgarian | Yes | No | Yes | Yes | Yes | No | No
Byelorussian | Yes | No | Yes | Yes | Yes | No | No
Catalan | Yes | No | Yes | Yes | Yes | Yes C | Yes
Chamorro | Yes | No | No | Yes | Yes | Yes | Yes
Chechen | Yes | No | No | Yes | Yes | No | No
Corsican | Yes | No | No | Yes | Yes | Yes | Yes
Croatian | Yes | No | Yes | Yes | Yes | No | Yes
Crow | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Czech | Yes | No | Yes | Yes | Yes | No | Yes
Danish | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Dutch | Yes | Yes | Yes | Yes | Yes | Yes C | Yes
English | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Eskimo (Inuit) | Yes | No | Yes | Yes | Yes | No | Yes
Esperanto | Yes | No | No | Yes | Yes | No | No
Estonian | Yes | No | Yes | Yes | Yes | Yes | Yes
Faroese | Yes | No | Yes | Yes | Yes | No | No
Fijian | Yes | No | No | Yes | Yes | No | Yes
Finnish | Yes | Yes | Yes | Yes | Yes | Yes | Yes
French | Yes | Yes | Yes | Yes | Yes | Yes C | Yes
Frisian | Yes | No | Yes | Yes | Yes | Yes C | Yes
Friulian | Yes | No | Yes | Yes | Yes | Yes C | Yes
Gaelic (Irish) | Yes | No | Yes | Yes | Yes | Yes | Yes
Gaelic (Scottish) | Yes | No | Yes | Yes | Yes | Yes C | Yes
Galician | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Ganda | Yes | No | No | Yes | Yes | No | Yes
German | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Greek | Yes | No | Yes | Yes | Yes | Yes | No
Guarani | Yes | No | No | Yes | Yes | Yes C | Yes
Hani * | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Hawaiian | Yes | Yes EN | Yes | Yes | Yes | Yes | Yes
Hungarian | Yes | No | Yes | Yes | Yes | Yes | Yes
Icelandic | Yes | No | Yes | Yes | Yes | No | No
Ido | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Indonesian | Yes | Yes EN | Yes | Yes | Yes | Yes | Yes
Interlingua | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Italian | Yes | Yes | Yes | Yes | Yes | Yes C | Yes
Kabardian | Yes | No | No | Yes | Yes | No | No
Kasub | Yes | No | No | Yes | Yes | No | Yes
Kawa * | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Kikuyu | Yes | No | No | Yes | Yes | No | No
Kongo | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Kpelle | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Kurdish * | Yes | No | Yes | Yes | Yes | No | Yes
Latin L | Yes | Yes L | Yes | Yes | Yes | Yes L | Yes
Latvian | Yes | No | Yes | Yes | Yes | No | Yes
Lithuanian | Yes | No | Yes | Yes | Yes | No | Yes
Luba | Yes | No | No | Yes | Yes | No | Yes
Luxembourgish | Yes | No | No | Yes | Yes | Yes C | Yes
Macedonian | Yes | No | Yes | Yes | Yes | No | No
Malagasy | Yes | Yes EN/M | No | Yes | Yes | Yes C | Yes
Malay | Yes | No | Yes | Yes | Yes | No | Yes
Malinke | Yes | No | No | Yes | Yes | Yes C | Yes
Maltese | Yes | No | No | Yes | Yes | No | No
Maori | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Mayan | Yes | No | No | Yes | Yes | Yes | Yes
Miao * | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Minangkabau | Yes | No | No | Yes | Yes | No | Yes
Mohawk | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Moldavian | Yes | No | No | Yes | Yes | No | No
Nahuatl | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Norwegian | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Nyanja | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Occidental | Yes | No | No | Yes | Yes | Yes | Yes
Ojibway | Yes | No | No | Yes | Yes | No | Yes
Papiamento | Yes | No | No | Yes | Yes | Yes | Yes
Pidgin English | Yes | Yes EN | Yes | Yes | Yes | Yes | Yes
Polish | Yes | No | Yes | Yes | Yes | No | Yes
Portuguese | Yes | Yes | Yes | Yes | Yes | Yes C | Yes
Provençal | Yes | No | No | Yes | Yes | Yes C | Yes
Quechua | Yes | No | No | Yes | Yes | Yes | Yes
Rhaetic | Yes | No | No | Yes | Yes | Yes C | Yes
Romanian | Yes | No | Yes | Yes | Yes | No | No
Romany | Yes | No | No | Yes | Yes | No | Yes
Rwanda | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Rundi | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Russian | Yes | No | Yes | Yes | Yes | No | No
Sami | Yes | No | No | Yes | Yes | No | Yes
Sami, Lule | Yes | No | No | Yes | Yes | No | Yes
Sami, Northern | Yes | No | No | Yes | Yes | No | Yes
Sami, Southern | Yes | No | No | Yes | Yes | No | Yes
Samoan | Yes | No | No | Yes | Yes | Yes C | Yes
Sardinian | Yes | No | No | Yes | Yes | Yes C | Yes
Serbian | Yes | No | Yes | Yes | Yes | No | No
Serbian, Latinic | Yes | No | Yes | Yes | Yes | No | Yes
Shona S | Yes | Yes S | No | Yes | Yes | Yes S | Yes
Sioux | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Slovak | Yes | No | Yes | Yes | Yes | No | Yes
Slovenian | Yes | No | Yes | Yes | Yes | No | Yes
Somali | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Sorbian (Wend) | Yes | No | Yes | Yes | Yes | No | Yes
Sotho | Yes | No | No | Yes | Yes | Yes | Yes
Spanish | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Sundanese SN | Yes | No | No | Yes | Yes | Yes SN | Yes SN
Swahili | Yes | Yes EN | Yes | Yes | Yes | Yes | Yes
Swazi | Yes | No | No | Yes | Yes | No | Yes
Swedish | Yes | Yes | Yes | Yes | Yes | Yes | Yes
Tagalog | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Tahitian | Yes | No | Yes | Yes | Yes | Yes C | Yes
Pirez | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Tongan | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Tswana (Chuana) | Yes | No | No | Yes | Yes | Yes C | Yes
Tun * | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Turkish | Yes | No | Yes | Yes | Yes | No | Yes T
Ukrainian | Yes | No | Yes | Yes | Yes | No | No
Visayan | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Welsh | Yes | No | Yes | Yes | Yes | Yes W | Yes W
Wolof | Yes | No | No | Yes | Yes | Yes C | Yes
Xhosa | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Zapotec | Yes | Yes EN | No | Yes | Yes | Yes | Yes
Zulu | Yes | No | Yes | Yes | Yes | No | Yes

Footnotes on languages / General:

  • * = This language can be handled only if it is written in the Latin alphabet.
  • B = Brazilian has a separate dictionary from Portuguese in the MTX and FRX modules. Other modules treat Brazilian as Portuguese. Brazilian is available for language marking in the output document.
  • L = Latin is usually written without accented letters, but sometimes breves or macrons are placed over vowels. In these cases, the indicated modules do not provide support.
  • M = Some dialects of Malagasy are written without accents. In these cases, MTX provides support.
  • S = Shona may be written without accents, but sometimes uses acutes and graves on vowels. In these cases the indicated modules do not provide full support.
  • SN = Sundanese uses only one accented letter; sometimes this is E-breve, sometimes E-acute. The indicated modules support E-acute but not E-breve.
  • W = Welsh contains two rarely used characters: W-circumflex and Y-circumflex. These modules can handle Welsh with the exception of these two characters.

Footnotes on modules / MTX:

The twelve selectable languages are those with Yes with no added footnote letter. For these languages this module uses its own language dictionaries.

  • EN = Languages denoted are thought to contain no accented letters. To read them, select English and disable spell checking from a main dictionary.

Footnotes on modules / DOT:

  • C = Not all uppercase letters are supported. See the module specification for a precise listing. This is probably not a serious restriction, since many 9-pin dot-matrix printers cannot print all the accented uppercase characters.

Footnotes on modules / RER:

  • T = The module cannot handle the lowercase dotless-i.


RecAPI: Characters, languages, modules

  • Language, Character Set and Code page Handling Module related pages
Characters, languages, modules

This is an alphabetical listing of all the accented letters of the Latin alphabet the Engine can handle. The recognition modules cannot be reliably trained to read accented letters beyond this listing. The Engine can also read digits, punctuation and miscellaneous characters and the Greek and Cyrillic alphabets, as listed elsewhere.

Letter images:
These are displayed as bitmapped images and represent current Windows representation with the font Arial.

Letter names:
These follow the official ISO and UNICODE character names.

UNICODE character codes:
Where two codes appear, the first is the uppercase letter, the second lowercase.

Languages:
This defines the languages for which the character is automatically validated. Characters needed but not displayed for a given language can be validated for recognition individually.

Dictionary support:
This relates in the first instance to the MOR recognition module. Other modules offer varying levels of dictionary support.

Module support:
MOR supports all letters; therefore it is not listed. Only language-based modules are listed, i.e. MTX, DOT, and RER. DOT* = lowercase support only.

NOTE: The modules MTX and DOT are supported on: Windows, MOR and RER are supported on: Windows, Linux and MacOS x64.

Code Page support:
This is shown for two basic West European Code Pages: ASCII 437 for DOS and ANSI 1252 for Windows. Support is indicated by the code value; the first code is for uppercase, the second for lowercase. MIS = Missing.

Other Code Pages:
1250 = Windows East European; 1254 = Windows Turkish; 1257 = Windows Baltic

Letter Image | Letter name | Uni- code | Languages using the character Dictionary support; without support | Module support | ASCII 437 | ANSI 1252 | Other Code Pages
 | A Diaeresis | 00c4 00e4 | Finnish, German, Swedish, Chamorro, Eskimo, Estonian, Guarani, Mayan, Slovak. | MTX, FRX, DOT, RER | 142 132 | 196 228 | 1250 1254 1257
 | A Acute | 00c1 00e1 | Czech, Dutch, French, Hungarian, Icelandic, Portuguese, Spanish, Eskimo, Faroese, Gaelic (I), Guarani, Malagasy, Papiamento, Welsh. | MTX, FRX, DOT, RER | MIS 160 | 193 225 | 1250 1254
 | A Ring | 00c5 00e5 | Danish, Finnish, Norwegian, Swedish. | MTX, FRX, DOT, RER | 143 134 | 197 229 | 1254 1257
 | A Circumflex | 00c2 00e2 | French, Portuguese, Eskimo, Frisian, Friulian, Luxembourgish, Rhaetic, Romanian, Tahitian, Turkish, Welsh, Wolof. | MTX, FRX, DOT, RER | MIS 131 | 194 226 | 1250 1254
 | A Grave | 00c0 00e0 | Catalan, Dutch, French, Italian, Portuguese, Breton, Friulian, Gaelic (S), Malagasy, Provencal, Rhaetic, Sardinian. | MTX, FRX, DOT*, RER | MIS 133 | 192 224 | 1254
 | A Tilde | 00c3 00e3 | Portuguese. | MTX, FRX, DOT, RER | MIS | 195 227 |
 | Sml. A Feminine Ordinal indicator | 00aa | Spanish, Portuguese. | MTX, FRX | 166 | 170 | 1254
 | A Breve | 0102 0103 | Romanian. | FRX | MIS | MIS | 1250
 | A Ogonok | 0104 0105 | Polish, Kasub, Lithuanian. | FRX, RER | MIS | MIS | 1250 1257
 | A Macron | 0100 0101 | Eskimo, Fijian, Latvian,Samoan. | FRX, DOT* RER | MIS | MIS | 1257
 | AE | 00c6 00e6 | Danish, Norwegian, Faroese, Icelandic. | MTX FRX, DOT, RER | 146 145 | 198 230 | 1254 1257
 | C Acute | 0106 0107 | Polish, Croatian, Kasub, Sorbian. | FRX, RER | MIS | MIS | 1250 1257
 | C Circumflex | 0108 0109 | Esperanto. |  | MIS | MIS |
 | C Hacek | 010c 010d | Czech, Croatian, Lappish, Latvian, Lithuanian, Romany, Slovak, Slovenian, Sorbian. | FRX, RER | MIS | MIS | 1250 1257
 | C Dot | 010a 010b | Maltese. |  | MIS | MIS |
 | C Cedilla | 00c7 00e7 | Catalan, French, Portuguese, Albanian, Kurdish, Papiamento, Provencal, Turkish. | FRX, MTX, DOT, RER | 128 135 | 199 231 | 1250 1254
 | D Hacek (lower as apostrophe) | 010e 010f | Czech, Slovak. | FRX, RER | MIS | MIS | 1250
 | D Stroke | 0110 0011 | Croatian | FRX | MIS | 208 MIS | 1250
 | ETH | 00d0 00f0 | Icelandic, Faroese. | FRX | MIS | 208 240 | Uppercase in 1250
 | E Acute | 00c9 00e9 | Catalan, Czech, Dutch, French, Hungarian, Italian, Portuguese, Spanish, Breton, Friulian, Gaelic (I), Guarani, Icelandic, Kasub, Luxembourgish, Malagasy, Malinke, Papiamento, Provencal, Sardinian, Slovak, Welsh, Wolof. | FRX, MTX, DOT, RER | 144 130 | 201 233 | 1250 1254 1257
 | E Diaeresis | 00cb 00eb | Dutch, French, Portuguese, Afrikaans, Albanian, Breton, Kasub, Welsh. | FRX, MTX, DOT* | MIS 137 | 203 235 | 1250 1254
 | E Circumflex | 00ca 00ea | Dutch, French, Portuguese, Afrikaans, Breton, Chuana, Eskimo, Frisian, Friulian, Kurdish, Rhaetic, Tahitian, Wolof. | FRX, MTX, DOT* RER | MIS 136 | 202 234 | 1254
 | E Grave | 00c8 00e8 | Catalan, Dutch, French, Italian, Portuguese, Breton, Chuana, Gaelic (S), Malagasy, Malinke, Provencal, Rhaetic, Sardinian, Suto, Wolof. | FRX, MTX, DOT*, RER | MIS 138 | 200 232 | 1254
 | E Hacek | 011a 011b | Czech, Malay (really E-breve), Slovak,Sorbian, Sundanese. | FRX, RER | MIS | MIS | 1250
 | E Dot | 0116 0117 | Lithuanian. | FRX, RER | MIS | MIS | 1257
 | E Ogonok | 0118 0119 | Polish, Kasub, Lithuanian. | FRX, RER | MIS | MIS | 1250 1257
 | E Macron | 0112 0113 | Basque, Eskimo, Fijian, Latvian, Minangkabau. | FRX, RER | MIS | MIS | 1257
 | G Circumflex | 011c 011d | Esperanto. |  | MIS | MIS |
 | G Breve | 011e 011f | Turkish. | FRX, RER | MIS | MIS | 1254
 | G Dot | 0120 0121 | Maltese. |  | MIS | MIS |
 | Cap.G Cedilla Sml. G apost. | 0122 0123 | Lappish, Latvian. | FRX, RER | MIS | MIS | 1257
 | H Circumflex | 0124 0125 | Esperanto. |  | MIS | MIS |
 | H Bar | 0126 0127 | Maltese. |  | MIS | MIS |
 | I Diaeresis | 00cf 00ef | Catalan, Dutch, French, Portuguese, Breton, Minangkabau, Provencal, Tahitian. | FRX, MTX, DOT*, RER | MIS 139 | 207 239 | 1254
 | I Grave | 00cc 00ec | Italian, Portuguese, Corsican, Friulian, Gaelic (S), Malagasy, Sardinian. | FRX, MTX, DOT*, RER | MIS 141 | 204 236 | 1254
 | I Circumflex | 00ce 00ee | French, Italian, Breton, Eskimo, Romanian, Turkish. | FRX, MTX, DOT*, RER | MIS 140 | 206 238 | 1254
 | I Acute | 00cd 00ed | Catalan, Czech, Dutch, Hungarian, Italian, Portuguese, Spanish, Eskimo, Faroese, Gaelic (I), Guarani, Icelandic, Malagasy, Slovak. | FRX, MTX, DOT, RER | MIS 161 | 205 237 | 1250 1254
 | I Tilde | 0128 0129 | Eskimo, Kikuyu. |  | MIS | MIS |
 | Cap. I Dot Small Dotless I | 0130 0131 | Turkish. | FRX, RER (Cap I only) | MIS | MIS | 1254
 | I Ogonok | 012e 012f | Lithuanian. | FRX, RER | MIS | MIS | 1257
 | I Macron | 012a 012b | Eskimo, Fijian, Latvian. | FRX, RER | MIS | MIS | 1257
 | I Hacek | 012c 012d | (Latin – for I-breve) Currently not enabled. |  | MIS | MIS |
 | J Circumflex | 0134 0135 | Esperanto. |  | MIS | MIS |
 | K Cedilla | 0136 0137 | Latvian. | FRX, RER | MIS | MIS | 1257
 | L Acute | 0139 013a | Slovak. | FRX, RER | MIS | MIS | 1250
 | L Hacek (shown as apostrophe) | 013d 013e | Slovak. | FRX, RER | MIS | MIS | 1250
 | L Slash | 0141 0142 | Polish, Kasub, Sorbian. | FRX, RER | MIS | MIS | 1250 1257
 | L Cedilla | 013b 013c | Latvian. | FRX, RER | MIS | MIS | 1257
 | N Tilde | 00d1 00f1 | Spanish, Aymara, Basque, Chuana, Guarani, Luba, Papiamento, Quechua. | FRX, MTX, DOT, RER | 165 164 | 209 241 | 1254
 | N Acute | 0143 0144 | Polish, Sorbian. | FRX, RER | MIS | MIS | 1250 1257
 | N Hacek | 0147 0148 | Czech, Slovak. | FRX, RER | MIS | MIS | 1250
 | N Cedilla | 0145 0146 | Ganda, Latvian. | FRX, RER | MIS | MIS | 1257
 | ENG | 014a 014b | Lappish, IPA (currently not supported) |  | MIS | MIS |
 | O Diaeresis | 00d6 00f6 | Finnish, German, Hungarian, Swedish, Estonian, Guarani, Icelandic, Kurdish, Turkish. | FRX, MTX, DOT, RER | 153 148 | 214 246 | 1250 1254 1257
 | O Acute | 00d3 00f3 | Catalan, Czech, Dutch, Hungarian, Italian, Polish, Portuguese, Spanish, Faroese, Gaelic (I), Icelandic, Malagasy, Papiamento, Provencal, Slovak, Welsh. | FRX, MTX, DOT, RER | MIS 162 | 211 243 | 1250 1254 1257
 | O Circumflex | 00d4 00f4 | French, Portuguese, Breton, Tahitian, Slovak, Welsh, Wolof. | FRX, MTX, DOT*, RER | MIS 147 | 212 244 | 1250 1254
 | O Grave | 00d2 00f2 | Catalan, Italian, Portuguese, Tswana, Friulian, Gaelic (S), Malagasy, Sardinian. | FRX, MTX, DOT*, RER | MIS 149 | 210 242 | 1254
 | O Tilde | 00d5 00f5 | Portuguese, Estonian. | FRX, MTX, DOT, RER | MIS | 213 245 | 1254 1257
 | Sml. O Masculine Ordinal indicator | 00ba | Spanish, Portuguese. | FRX, MTX, DOT | 167 | 186 | 1254
 | O Double Acute | 0150 0151 | Hungarian. | FRX, MTX, DOT | MIS | MIS | 1250
 | O Macron | 014c 014d | Eskimo, Fijian, Latvian, Samoan, Sotho, Tswana. | FRX, DOT*, RER | MIS | MIS | 1257
 | O Breve | 014e 014f | (Latin) Currently not implemented |  | MIS | MIS |
 | O Slash | 00d8 00f8 | Danish, Norwegian, Faroese. | FRX, MTX, DOT, RER | MIS | 216 248 | 1254 1257
 | O E | 0152 0153 | French. | FRX, MTX, DOT | MIS | 140 156 |
 | R Acute | 0154 0155 | Basque, Eskimo, Slovak. | FRX, RER | MIS | MIS | 1250
 | R Hacek | 0158 0159 | Czech, Sorbian. | FRX, RER | MIS | MIS | 1250
 | R Cedilla | 0156 0157 | Latvian. | FRX, RER | MIS | MIS | 1257
 | S Hacek | 0160 0161 | Czech, Croatian, Lappish, Latvian, Lithuanian, Luba, Romany, Slovak, Slovenian, Sorbian, Sotho, Tswana. | FRX, RER | MIS | 138 154 | 1250 1257
 | S Acute | 015a 015b | Polish, Sorbian. | FRX, RER | MIS | MIS | 1250 1257
 | S Circumflex | 015c 015d | Esperanto. |  | MIS | MIS |
 | S Cedilla | 015e 015f | Kurdish, Romanian, Turkish. | FRX, RER | MIS | MIS | 1250 1254
 | T Hacek (lower as apostrophe) | 0164 0165 | Czech, Slovak. (Lower case sometimes appears as hacek) | FRX, RER | MIS | MIS | 1250
 | T Cedilla | 0162 0163 | Romanian. | FRX | MIS | MIS | 1250
 | T Thorn | 00de 00fe | Icelandic. |  | MIS | 222 254 |
 | T Bar | 0166 0167 | Lappish (currently not supported). |  | MIS | MIS |
 | U Diaeresis | 00dc 00fc | Catalan, French, German, Portuguese, Spanish, Breton, Estonian, Guarani, Turkish. | FRX, MTX, DOT, RER | 154 129 | 220 252 | 1250 1254 1257
 | U Acute | 00da 00fa | Catalan, Czech, Hungarian, Italian, Portuguese, Spanish, Faroese, Frisian, Gaelic (I), Icelandic, Slovak. | FRX, MTX, DOT, RER | MIS 163 | 218 250 | 1250 1254
 | U Circumflex | 00db 00fb | French, Frisian, Kurdish, Luxembourgish, Turkish, Wolof. | FRX, MTX, DOT*, RER | MIS 150 | 219 251 | 1254
 | U Grave | 00d9 00f9 | French, Italian, Frisian, Friulian, Gaelic (S), Sardinian. | FRX, MTX, DOT*, RER | MIS 151 | 217 249 | 1254
 | U Tilde | 0168 0169 | Kikuyu. |  | MIS | MIS |
 | U Double Acute | 0170 0171 | Hungarian. | FRX, DOT, RER | MIS | MIS | 1250
 | U Breve | 016c 016d | Esperanto,( Latin). |  | MIS | MIS |
 | U Ring | 016e 016f | Czech. | FRX, RER | MIS | MIS | 1250
 | U Macron | 016a 016b | Fijian, Latvian, Lithuanian. | FRX, RER | MIS | MIS | 1257
 | U Ogonok | 0172 0173 | Lithuanian. | FRX, RER | MIS | MIS | 1257
 | W Circumflex | 0174 0175 | Welsh. Not frequent |  | MIS | MIS |
 | Y Acute | 00dd 00fd | Czech, Faroese, Icelandic, Malagasy, Slovak, Welsh. | FRX, RER | MIS | 221 253 | 1250
 | Y Diaeresis | 0178 00ff | French (very rare). At present disabled | FRX, MTX, DOT | MIS 152 | 159 255 | 1254
 | Y Circumflex | 0176 0177 | Welsh. Not frequent. |  | MIS | MIS |
 | Z Acute | 0179 017a | Sorbian. | FRX, RER | MIS | MIS | 1250
 | Z Hacek | 017d 017e | Czech, Polish, Croatian, Latvian, Lithuanian, Luba, Romany, Slovak, Slovenian, Sorbian. | FRX, RER | MIS | MIS | 1250 1257
 | Z Dot | 017b 017c | Polish, Maltese. | FRX, RER | MIS | MIS | 1250 1257


RecAPI: Characters (punctuation/miscellaneous) and modules

  • Language, Character Set and Code page Handling Module related pages
Characters (punctuation/miscellaneous) and modules

The omnifont recognition modules MOR, MTX, FRX, PLUS2W and PLUS3W support almost all of the following characters. This is why these modules do not appear below in separate columns. (But e.g. MTX does not support the Euro Sign).

NOTE: The modules MTX, DOT, MAT, HNR are supported on: Windows, MOR and RER are supported on: Windows, Linux and MacOS x64.

Almost all the punctuation is language independent. The only exceptions are the Inverted Exclamation Mark and the Inverted Question Mark characters, which are validated only when the Spanish language is enabled.

PUNCTUATION CHARACTERS
Name of the Character | UNICODE | DOT | RER | HNR | MAT
Apostrophe-Quote | 0x0027 | DOT | RER |  |
Closing Curly Bracket | 0x007d | DOT | RER |  |
Closing Parenthesis | 0x0029 | DOT | RER |  |
Closing Square Bracket | 0x005d | DOT | RER |  |
Colon | 0x003a | DOT | RER |  |
Comma | 0x002c | DOT | RER | HNR | OCRA, OCRB
Em dash | 0x2014 |  |  |  |
En dash | 0x2013 |  |  |  |
Exclamation Mark | 0x0021 | DOT | RER |  |
Hyphen-Minus | 0x002d | DOT | RER | HNR |
Inverted Exclamation Mark | 0x00a1 | DOT |  |  |
Inverted Question Mark | 0x00bf | DOT |  |  |
Low Dbl. Comma Quot. Mark | 0x201e |  |  |  |
Low Single Comma Quot. Mark | 0x201a |  |  |  |
Opening Curly Bracket | 0x007b | DOT | RER |  |
Opening Parenthesis | 0x0028 | DOT | RER |  |
Opening Square Bracket | 0x005b | DOT | RER |  |
Period (full-stop) | 0x002e | DOT | RER | HNR | All MAT
Question Mark | 0x003f | DOT | RER |  |
Quotation Mark | 0x0022 | DOT | RER |  |
Semicolon | 0x003b | DOT | RER |  |
Left Pointing Single Guillemet | 0x2039 |  |  |  |
Right Pointing Single Guillemet | 0x203a |  |  |  |
Soft Hyphen | 0x20ad |  |  |  |
Spacing Grave | 0x0060 | DOT |  |  |
MISCELLANEOUS CHARACTERS
Name of the Character | UNICODE | DOT | RER | HNR | MAT
Acute | 0x00b4 |  |  |  |
Ampersand | 0x0026 | DOT | RER |  |
Asterisk | 0x002a | DOT | RER |  | OCRA
Backslash | 0x005c | DOT | RER |  | OCRA
Bullet | 0x2022 |  |  |  |
Broken Bar | 0x00a6 |  |  |  |
Cedilla | 0x00b8 |  |  |  |
Cent Sign | 0x00a2 | DOT |  |  |
Circumflex | 0x02c6 |  |  |  |
Commercial At | 0x0040 | DOT | RER |  | MICR
Copyright Sign | 0x00a9 |  |  |  |
Currency Sign | 0x00a4 |  |  |  |
Dagger | 0x2020 |  |  |  |
Degree Sign | 0x00b0 |  |  |  |
Diaresis | 0x00a8 |  |  |  |
Dollar Sign | 0x0024 | DOT | RER |  | OCRA
Double Dagger | 0x2021 |  |  |  |
Equals Sign | 0x003d | DOT | RER |  |
Euro Sign | 0x20ac |  |  |  |
Greater-Than Sign | 0x003e | DOT | RER |  | OCRA, OCRB
Horizontal Ellipsis | 0x2026 |  |  |  |
Left Pointing Guillemet | 0x00ab | DOT |  |  |
Less-Than Sign | 0x003c | DOT | RER |  | OCRA, OCRB
Macron | 0x00af |  |  |  |
Math Division Sign | 0x00f7 |  |  |  |
Math Multipication Sign | 0x00d7 |  |  |  |
Micron | 0x00b5 |  |  |  |
Midddle Dot | 0x00b7 |  |  |  |
Not Sign | 0x00ac |  |  |  |
Number Sign | 0x0023 | DOT | RER |  | MICR
Per Mille Sign | 0x2030 |  |  |  |
Percent Sign | 0x0025 | DOT | RER |  |
Pilcrow Sign | 0x00b6 |  |  |  |
Plus Sign | 0x002b | DOT | RER | HNR | OCRA, OCRB
Plus-OR-Minus Sign | 0x00b1 | DOT |  |  |
Pound Sign | 0x00a3 | DOT |  |  |
Registered Trade Mark Sign | 0x00ae |  |  |  |
Right Pointing Guillemet | 0x00bb | DOT |  |  |
Section Sign | 0x00a7 | DOT |  |  |
Slash | 0x002f | DOT | RER |  | OCRA, OCRB
Sml. Script F | 0x0192 |  |  |  |
Sml. Tilde | 0x02dc |  |  |  |
Space | 0x0020 | DOT | RER | HNR | all MAT
Spacing Circumflex | 0x005e | DOT |  |  |
Spacing Underscore | 0x005f | DOT | RER |  |
Superscript One | 0x00b9 |  |  |  |
Superscript Three | 0x00b3 |  |  |  |
Superscript Two | 0x00b2 |  |  |  |
Tilde | 0x007e | DOT |  |  |
Trade Mark Sign | 0x2122 |  |  |  |
Vertical Bar | 0x007c | DOT | RER |  |
Vulgar Fraction Three Quarter | 0x00be |  |  |  |
Vulgar Fraction One Half | 0x00bd |  |  |  |
Vulgar Fraction One Quarter | 0x00bc |  |  |  |
Yen Sign | 0x00a5 | DOT |  |  |


RecAPI: Image File Handling Module related pages

Image File Handling Module related pages

Image File Format List


RecAPI: Image File Format List

  • Image File Handling Module related pages
Image File Format List

This topic lists the image file formats that are supported by the Engine of the OmniPage Capture SDK v2025.1. These may be for reading only, or for reading and writing. All image file formats listed here are associated with a Format ID constant (IMF_FORMAT enum).

Name | Format ID | Load | Save | Color | Compression | Multi-page | Notes
Tagged Image File Formats (TIFF)
Uncompressed TIFF | FF_TIFNO | Yes | Yes | B/W, 4-bit and 8-bit grayscale, 24-bit true-color, and 8-bit palette-color | Uncompressed (TIFF compression-tag = 1) | Yes | See Note #2 below
Group 3 Modified TIFF | FF_TIFHU | Yes | Yes | B/W | CCITT 1D (TIFF compression-tag = 2) | Yes |
Standard G3 1D TIFF | FF_TIFG31 | Yes | Yes | B/W | Group 3 Fax (TIFF compression-tag = 3) | Yes |
Standard G3 2D TIFF | FF_TIFG32 | Yes | Yes | B/W | Group 3 Fax (TIFF compression-tag = 3) | Yes |
Standard G4 TIFF | FF_TIFG4 | Yes | Yes | B/W | Group 4 Fax (TIFF compression-tag = 4) | Yes |
TNT2 (JPEG-encoded TIFF) | FF_TIFJPGNEW | Yes | Yes | 8-bit grayscale and 24-bit true-color | NEWJPEG (TIFF compression-tag = 7) | Yes | See Note #1 below
Packbits TIFF | FF_TIFPB | Yes | Yes | B/W, 4-bit and 8-bit grayscale, 24-bit true-color, and 8-bit palette-color | PackBits (TIFF compression-tag = 32773) | Yes | See Note #2 below
LZW-compressed TIFF | FF_TIFLZW | Yes | Yes | B/W, 4-bit and 8-bit grayscale, 24-bit true-color, and 8-bit palette-color | LZW (TIFF compression-tag = 5) | Yes | See Note #2 below
TIFF-FX format
TIFF-FX format | FF_XIFF | Yes | No | B/W, 4-bit and 8-bit grayscale, and 24-bit true-color |  | Yes | Supports Profiles M1, T, S, F, C images. See also Note #2 below
PCX / DCX
Single Page PCX | FF_PCX | Yes | Yes | B/W, 4-bit and 8-bit grayscale, 24-bit true-color, and 8-bit palette-color | ZSoft-proprietary | No | See Note #2 below
Multiple Page PCX (DCX) | FF_DCX | Yes | Yes | B/W, 4-bit and 8-bit grayscale, 24-bit true-color, and 8-bit palette-color | ZSoft-proprietary | Yes | See Note #2 below
Microsoft Windows bitmap format
Windows bitmap format without compression | FF_BMP_NO | Yes | Yes | B/W, 4-bit and 8-bit grayscale, 24-bit true-color, and 8-bit palette-color | None | No | See Note #2 below
Windows bitmap format with RLE8 compression | FF_BMP_RLE8 | Yes | Yes | B/W, 4-bit and 8-bit grayscale, 24-bit true-color and 8-bit palette-color | RLE8 | No | See Note #2 below
Windows bitmap format with RLE4 compression | FF_BMP_RLE4 | Yes | No | B/W, 4-bit grayscale and 4-bit palette color | RLE4 | No | See Note #2 below
JPEG formats
JPEG format with negligible information loss | FF_JPG_SUPERB | Yes | Yes | 8-bit grayscale and 24-bit true-color | JPEG (Joint Photographics Experts Group compression) | No | See Note #3 below
JPEG format with average information loss | FF_JPG_GOOD | Yes | Yes | 8-bit grayscale and 24-bit true-color | JPEG (Joint Photographics Experts Group compression) | No | See Note #3 below
JPEG format optimized for minimum image file size | FF_JPG_MIN | Yes | Yes | 8-bit grayscale and 24-bit true-color | JPEG (Joint Photographics Experts Group compression) | No | See Note #3 below
JPEG2000 formats
JPEG2000 format with negligible information loss | FF_JPG2K_SUPERB | Yes | Yes | 8-bit grayscale and 24-bit true-color |  | No |
JPEG2000 format with average information loss | FF_JPG2K_GOOD | Yes | Yes | 8-bit grayscale and 24-bit true-color |  | No |
JPEG2000 format optimized for minimum image file size | FF_JPG2K_MIN | Yes | Yes | 8-bit grayscale and 24-bit true-color |  | No |
JBIG2 formats
JBIG2 format with no information loss | FF_JBIG2_LOSSLESS | Yes | Yes | B/W |  | No |
JBIG2 optimized for minimum image file size | FF_JBIG2_LOSSY | Yes | Yes | B/W |  | No |
Portable image format for Network Graphics
Portable Network Graphics (PNG) | FF_PNG | Yes | Yes | B/W, 4-bit and 8-bit grayscale, 24-bit true-color, and 8-bit palette-color | PNG proprietary | No | See Note #2 below
PaperPort MAX file format
MAX format without information loss | FF_MAX_LOSSLESS | Yes | No | B/W, 8-bit grayscale and 24-bit true-color | B/W: Run End Encoding, Gray-scale: modified PNG, Color: JPEG | Yes | LZW-compressed MAX files are not supported.
MAX format with average information loss | FF_MAX_GOOD | Yes | No | B/W, 8-bit grayscale and 24-bit true-color | B/W: Run End Encoding, Gray-scale: modified PNG, Color: JPEG | Yes | LZW-compressed MAX files are not supported.
MAX format optimized for minimum image file size | FF_MAX_MIN | Yes | No | B/W, 8-bit grayscale and 24-bit true-color | B/W: Run End Encoding, Gray-scale: modified PNG, Color: JPEG | Yes | LZW-compressed MAX files are not supported.
Adobe PDF format
Adobe Portable Document Format | FF_PDF_* (see IMF_FORMAT) | Yes | Yes | As the result of the image loading process either a B/W, or a 8-bit grayscale or a 24-bit true-color image will be created in the Engine |  | Yes | Supports standard PDF files compliant up to the PDF v2.0 specification.
CompuServe GIF format
Graphic Interchange Format | FF_GIF | Yes | Yes | Standard GIF format (256-color palette) |  | Yes. Only the first frame |
XPS format
 | FF_XPS | Yes | No |  |  |  |
Microsoft HD Photo
 | FF_WMP | Yes | Yes | B/W, 8-bit grayscale and 24-bit true-color |  | No |
ScanSoft Pagis XIF format
XIF format (eXtended Image Format) | FF_XIFF | Yes | No | B/W, 4-bit and 8-bit grayscale, and 24-bit true-color |  | Yes | See Note #2 below
ScanSoft’s proprietary format
ScanSoft’s simple image file format | FF_SIM | Yes | Yes | B/W | None |  | Uncompressed raw image data. First word is the image width in bytes while the second word corresponds to the image height in pixels.
Caere’s proprietary format
 | FF_PDA | Yes | No |  |  |  | Only images with a single zone.
Note
1. The Engine is able to load 'old style' JPEG compressed TIFF image files (TIFF compression=6).
2. On loading, 4-bit greyscale images are converted into the 8-bit greyscale format, and 4-bit palette color images are converted into the 8-bit palette color format.
3. When a 8-bit palette color image is saved into JPEG format, it is coverted to 24-bit color.


RecAPI: Form Recognition Module related pages

Form Recognition Module related pages

Retrieved data format of kRecGetFindFormTemplateInfo


RecAPI: Retrieved data format of kRecGetFindFormTemplateInfo

  • Form Recognition Module related pages
Retrieved data format of kRecGetFindFormTemplateInfo

The function kRecGetFindFormTemplateInfo is useful mainly in template definition step. It provides information about the previous run of kRecFindFormTemplate. It gives XML format data in a memory buffer. The retrieved data may contain the following nodes. Indentation means embedding of nodes.

Name |  |  |  |  |  |  |  |  | Description | Value
FindFormTemplate |  |  |  |  |  |  |  |  | root |
 | Templates |  |  |  |  |  |  |  |  |
 |  | Template |  |  |  |  |  |  |  |
 |  |  | name |  |  |  |  |  | name of the form template | string
 |  |  | index |  |  |  |  |  | index of the form template in form template array | int
 |  |  | enabled |  |  |  |  |  | template enabled or not (see: kRecFindFormTemplate filters) | Yes/No
 |  |  | matchings |  |  |  |  |  | number of successfull matchings | int
 |  |  | select |  |  |  |  |  | 0 if selector anchor not found, otherwise 1 | 0/1
 |  |  | match |  |  |  |  |  | successful matching |
 |  |  |  | ID |  |  |  |  | matching ID | hexadecimal
 |  |  |  | confidence |  |  |  |  | confidence | int
 |  |  |  | err |  |  |  |  | error code (RECERR) | hexadecimal
 |  |  |  | rank |  |  |  |  | the rank of matching (confidence order, the rank of best matching is 0) | int
 |  |  |  | anchor |  |  |  |  |  |
 |  |  |  |  | zoneindex |  |  |  | index of the anchor zone | int
 |  |  |  |  | type |  |  |  | type of the anchor zone | AT_SELECTOR AT_POSITIONAL AT_REFERENCE AT_CHECK
 |  |  |  |  | content |  |  |  | content of the anchor zone | AC_TEXT AC_BARCODE
 |  |  |  |  | driftX |  |  |  | drift value | int
 |  |  |  |  | driftY |  |  |  | drift value | int
 |  |  |  |  | value |  |  |  | text | string
 |  |  |  |  | regexp |  |  |  | regular expression | string
 |  |  |  |  | err |  |  |  | error code (RECERR) | hexadecimal
 |  |  |  |  | l |  |  |  | rectangle: left | int
 |  |  |  |  | t |  |  |  | rectangle: top | int
 |  |  |  |  | r |  |  |  | rectangle: right | int
 |  |  |  |  | b |  |  |  | rectangle: bottom | int
 |  |  |  |  | OCR |  |  |  | recognized text in zone | string
 |  |  | nonmatch |  |  |  |  |  | unsuccesful matching |
 |  |  |  | confidence |  |  |  |  | confidence | int
 |  |  |  | err |  |  |  |  | error code (RECERR) | hexadecimal
 |  |  |  | anchor |  |  |  |  |  |
 |  |  |  |  | zoneindex |  |  |  | index of the anchor zone | int
 |  |  |  |  | type |  |  |  | type of the anchor zone | AT_SELECTOR AT_POSITIONAL AT_REFERENCE AT_CHECK
 |  |  |  |  | content |  |  |  | content of the anchor zone | AC_TEXT AC_BARCODE
 |  |  |  |  | driftX |  |  |  | drift value | int
 |  |  |  |  | driftY |  |  |  | drift value | int
 |  |  |  |  | value |  |  |  | text | string
 |  |  |  |  | regexp |  |  |  | regular expression | string
 |  |  |  |  | err |  |  |  | error code (RECERR) | hexadecimal
 |  |  |  |  | l |  |  |  | rectangle: left | int
 |  |  |  |  | t |  |  |  | rectangle: top | int
 |  |  |  |  | r |  |  |  | rectangle: right | int
 |  |  |  |  | b |  |  |  | rectangle: bottom | int
 |  |  |  |  | dl |  |  |  | drift rectangle: left | int
 |  |  |  |  | dt |  |  |  | drift rectangle: top | int
 |  |  |  |  | dr |  |  |  | drift rectangle: right | int
 |  |  |  |  | db |  |  |  | drift rectangle: bottom | int
 |  |  |  |  |  | RecognizedWords |  |  | contains recognized words in drift area |
 |  |  |  |  |  |  | wd |  | one recognized word in drift area |
 |  |  |  |  |  |  |  | l | word rectangle: left | int
 |  |  |  |  |  |  |  | t | word rectangle: top | int
 |  |  |  |  |  |  |  | r | word rectangle: right | int
 |  |  |  |  |  |  |  | b | word rectangle: bottom | int
 |  |  |  |  |  |  |  | OCR | recognized word | string


RecAPI: Scanner related pages

Scanner related pages

The Scanning Module is supported on: Windows.

Standard paper sizes


RecAPI: Standard paper sizes

  • Scanner related pages
Standard paper sizes

The Scanning Module is supported on: Windows.

The standard paper size can be queried by calling kRecGetScanStandardPaperSize. The following table shows all the possible queriable paper types.

RSDPP | code | inches | mm
RSDPP_CUSTOM | custom size |  |
RSDPP_SCNMAX | scanner's maximum (paper source dependent!) |  |
ISO
RSDPP_A0 | A0 | 33.11 * 46.81 | 841 * 1189
RSDPP_A1 | A1 | 23.39 * 33.11 | 594 * 841
RSDPP_A2 | A2 | 16.54 * 23.39 | 420 * 594
RSDPP_A3 | A3 | 11.69 * 16.54 | 297 * 420
RSDPP_A4 | A4 | 8.27 * 11.69 | 210 * 297
RSDPP_A5 | A5 | 5.83 * 8.27 | 148 * 210
RSDPP_A6 | A6 | 4.13 * 5.83 | 105 * 148
RSDPP_A7 | A7 | 2.91 * 4.13 | 74 * 105
RSDPP_A8 | A8 | 2.05 * 2.91 | 52 * 74
RSDPP_B0 | B0 (ISO) | 39.37 * 55.67 | 1000 * 1414
RSDPP_B1 | B1 (ISO) | 27.83 * 39.37 | 707 * 1000
RSDPP_B2 | B2 (ISO) | 19.69 * 27.83 | 500 * 707
RSDPP_B3 | B3 (ISO) | 13.90 * 19.69 | 353 * 500
RSDPP_B4 | B4 (ISO) | 9.84 * 13.90 | 250 * 353
RSDPP_B5 | B5 (ISO) | 6.93 * 9.84 | 176 * 250
RSDPP_B6 | B6 (ISO) | 4.92 * 6.93 | 125 * 176
RSDPP_B7 | B7 (ISO) | 3.46 * 4.92 | 88 * 125
RSDPP_B8 | B8 (ISO) | 2.44 * 3.46 | 62 * 88
RSDPP_C0 | C0 | 36.10 * 51.06 | 917 * 1297
RSDPP_C1 | C1 | 25.51 * 36.10 | 648 * 917
RSDPP_C2 | C2 | 18.03 * 25.51 | 458 * 648
RSDPP_C3 | C3 | 12.76 * 18.03 | 324 * 458
RSDPP_C4 | C4 | 9.02 * 12.76 | 229 * 324
RSDPP_C5 | C5 | 6.38 * 9.02 | 162 * 229
RSDPP_C6 | C6 | 4.49 * 6.38 | 114 * 162
RSDPP_C7 | C7 | 3.19 * 4.49 | 81 * 114
RSDPP_C8 | C8 | 2.24 * 3.19 | 57 * 81
JIS (Japanese)
RSDPP_B0JIS | B0 (JIS) | 40.55 * 57.32 | 1030 * 1456
RSDPP_B1JIS | B1 (JIS) | 28.66 * 40.55 | 728 * 1030
RSDPP_B2JIS | B2 (JIS) | 20.28 * 28.66 | 515 * 728
RSDPP_B3JIS | B3 (JIS) | 14.33 * 20.28 | 364 * 515
RSDPP_B4JIS | B4 (JIS) | 10.12 * 14.33 | 257 * 364
RSDPP_B5JIS | B5 (JIS) | 7.17 * 10.12 | 182 * 257
RSDPP_B6JIS | B6 (JIS) | 5.04 * 7.17 | 128 * 182
RSDPP_B7JIS | B7 (JIS) | 3.58 * 5.04 | 91 * 128
RSDPP_B8JIS | B8 (JIS) | 2.52 * 3.58 | 64 * 91
Engineering
RSDPP_A | A | 8.50 * 11.00 | 216 * 279
RSDPP_B | B | 11.00 * 17.00 | 279 * 432
RSDPP_C | C | 17.00 * 22.00 | 432 * 559
RSDPP_D | D | 22.00 * 34.00 | 559 * 864
RSDPP_E | E | 34.00 * 44.00 | 864 * 1118
North American
RSDPP_INVOICE | Invoice | 5.50 * 8.50 | 140 * 216
RSDPP_EXECUTIVE | Executive | 7.25 * 10.50 | 184 * 267
RSDPP_LETTER | Letter | 8.50 * 11.00 | 216 * 279
RSDPP_FOLIO | Folio | 8.50 * 13.00 | 216 * 330
RSDPP_LEGAL | Legal | 8.50 * 14.00 | 216 * 356
RSDPP_LEDGER | Ledger | 11.00 * 17.00 | 279 * 432
RSDPP_DLETTER | Double Letter | 11.00 * 17.00 | 279 * 432
North American envelopes
RSDPP_PERSONAL | Envelope Personal | 3.63 * 6.50 | 92 * 165
RSDPP_MONARCH | Envelope Monarch | 3.88 * 7.50 | 98 * 191
RSDPP_DL | Envelope DL | 4.33 * 8.66 | 110 * 220
RSDPP_COM9 | Envelope #9 | 3.88 * 8.88 | 98 * 225
RSDPP_COM10 | Envelope #10 | 4.13 * 9.50 | 105 * 241
RSDPP_COM11 | Envelope #11 | 4.50 * 10.38 | 114 * 264
RSDPP_COM12 | Envelope #12 | 4.75 * 11.00 | 121 * 279
RSDPP_COM14 | Envelope #14 | 5.00 * 11.50 | 127 * 292
Other
RSDPP_COUPON | Coupon | 1.00 * 4.00 | 25 * 102
RSDPP_BCARD | Business Card | 2.16 * 3.58 | 55 * 91
RSDPP_PCHECK | Personal Check | 3.00 * 5.00 | 76 * 127
RSDPP_BCHECK | Business Check | 4.00 * 8.50 | 102 * 216


RecAPI: Output formats of RecAPIPlus

Output formats of RecAPIPlus

The following list contains all the selectable output formats of the converters.

The converters can be adjusted through converter settings. The settings of a given converter are created when the given converter is selected for the first time (RecSetOutputFormat). Thus before this these settings cannot be accessed.

The output converters can generate the output file in different output levels (OUTPUTLEVEL, RecSetOutputLevel). See the connection between converters and output levels.

See also
Vertical text support of the converters.

The output converters are parts of RecAPIPlus, thus they are supported on: Windows, Linux, Embedded Linux, MacOS. However not all the formats exist on all these platforms. See below the differing ones. On platforms where RecAPIPlus is not supported or at using only KernelAPI level, instead, use Direct TXT Output Converter Module.

MP3 Audio - This converter create MP3 files from the recognition result. MP3 Audio converter utilizes Windows Speech API for generating mp3 files. Audio converter is supported on: Windows 32-bit.
See the settings of MP3 converter.

HTML 3.2 - The HTML 3.2 format is a clear, small but useable HTML format, this format is supported by ‘all’ HTML interpreters (contrary to HTML 4.0.). See the settings of HTML 3.2 converter.

HTML 4.0 and 5.0 - The HTML 4.0 and 5.0 formats are not so clear as HTML 3.2, but Cascading Style Sheet (CSS) technology can be used for box-like absolute positioned objects, styles and manipulating all paragraph and character attributes. See the settings of HTML 4.0 and 5.0 converters.

HTML 5.0 Essay mode - see the description below

Microsoft Excel 2003, XP - This converter generates files compatible with the older Microsoft Excel file formats (XLS). This converter is supported on: Windows. See the settings of Excel converters.

RTF Word 2000 - RTF format with features available from Microsoft Word 2000. See the settings of RTF converters.

RTF Word 2000 Essay mode - see the description below

Microsoft Powerpoint 97 - An RTF-based converter that generates a plain and simple RTF file, which can be interpreted by Microsoft Powerpoint. This converter is supported on: Windows. See the settings of Powerpoint converters.

Microsoft Publisher 98 - An RTF-based converter that generates a plain and simple RTF file, which can be interpreted by Microsoft Publisher. This converter is supported on: Windows. See the settings of Publisher converter.

WordPad - An RTF-based converter that generates a plain and simple RTF file, which can be interpreted by Microsoft Wordpad (and other simple RTF readers). This converter is supported on: Windows. See the settings of WordPad converter.

WordPerfect 9, 10 - Wordperfect binary file format for WordPerfect 9 and up. This converter is supported on: Windows. See the settings of WordPerfect 9 and up converters.

Microsoft Word WordML - A converter for the XML-based file format of Microsoft Word 2003. Its features, capabilities and layout retention quality are practically the same as in the RTF Word 2000 converter. This converter is supported on: Windows. See the settings of WordML converter.

Text - This converter writes the recognized text into a simple text file that can be read by most text editors and word processors. See the settings of Text converters.

Comma Separated Text - This converter writes the recognized text into a tabled text file (Comma delimited text file) that can be read by Excel. “List Separator” separates the cells and NL (new line character) separates the lines of the table. See the settings of Text converters.

Formatted Text - This converter writes the recognized text into a text file, but tries to retain the layout of the page by inserting extra spaces. See the settings of Text converters.

Text with linebreaks - The same as Text converter, but this converter inserts line breaks at the end of lines instead of only inserting them at the end of the paragraphs. See the settings of Text converters.

Unicode Text - Same as Text, but using two-byte Unicode characters. See the settings of Text converters.

Unicode Comma Separated Text - Same as Comma Separated Text, but using two-byte Unicode characters. See the settings of Text converters.

Unicode Formatted Text - Same as Formatted Text, but using two-byte Unicode characters. See the settings of Text converters.

Unicode Text with linebreaks - Same as Text with linebreaks, but using two-byte Unicode characters. See the settings of Text converters.

Kindle Document - Kindle e-book converter. This converter is supported on: Windows. See the settings of Kindle converter.

ePub, ePub Simple and ePub Poem - ePub e-book converters. This converter is supported on: Windows, Linux, MacOS. See the settings of ePub converters.

XML - An XML file format conforming to the OmniPage XML schema (http://www.scansoft.com/omnipage/xml/ssdoc-schema3.xsd). It contains almost all layout related information and paragraph and character attributes. The page XML output format contains a general description of this format. This converter is supported on: Windows, Linux, MacOS. See the settings of XML converter.

XML Paper Specification and XPSsearchable - Microsoft has released a technology called “XML Paper Specification (XPS)” Its specification is available for download at http://www.microsoft.com/whdc/xps/xpsspec.mspx. This file type has nearly the same functionality as Adobe’s PDF. It can “package” electronic documents into a file, so they yield the same look on every output device, such as monitors, printers or even handheld devices. CSDK can open and process XPS files in their native formats; no special software is needed for this. The level of support is very close to that for PDF files. The Toolkit can convert documents to the XPS file type, with a sub-set of the switches available for PDF and with three ‘flavors’:

  • Image Only
  • Image on Text (Searchable)
  • Normal

This converter is supported on: Windows. See the settings of XPS converters.

PDF with image on text - A PDF converter where the original (input) image are retained in the foreground with the recognized text hidden in the background (but in the correct position). Perfect for archiving & indexing documents. This converter is supported on: Windows, Linux, MacOS. See the settings of PDF converters.

PDF - A highly configurable, general PDF output converter. It supports many PDF features, but relies heavily on the position of the recognized characters. This converter is supported on: Windows, Linux, MacOS. See the settings of PDF converters.

PDF with image substitues - A special PDF converter, where the suspect words are covered by their images cut out from the original image. This converter is supported on: Windows, Linux, MacOS. See the settings of PDF converters.

PDF - Edited - This PDF converter does not rely on the position of the recognized charactes, so it can be used even after inserting large new text portions in the editor. This converter is supported on: Windows, Linux, MacOS. See the settings of PDF converters.

Office 2007 support

The Toolkit can generate output for the Office 2007 file types DOCX (supported on: Windows, Linux, Embedded Linux, MacOS), XLSX (supported on: Windows, Linux, Embedded Linux, MacOS) and PPTX (supported on: Windows, Linux, MacOS). In addition, there is a special DOCX Essay Mode converter, which is described below.

The DOCX philosophy is using a set of separate XML, picture and font files, all compressed into one ZIP-like package file. The real document content is housed in a set of XML files, but there are other XML files that define the connections between the content files and the other files. This allows DOCX file sizes to be typically much smaller than a corresponding DOC file.

This DOCX file type specification can download from: http://www.ecma-international.org/news/TC45_current_work/TC45_available_docs.htm

The DOCX/XLSX/PPTX file types conform with a new Microsoft standard called “Open Packaging Conventions (OPC)” whose specification is available for download at http://go.microsoft.com/fwlink/?linkID=71255

In the CSDK, the DOCX file type is similar to the existing RTF and has similar settings.

Our experiences show that the word processor application Pages of MacOS cannot handle the more complex DOCX documents. Thus we introduced a new, not too complex converter for less formatted output formats. The Pages converter generates DOCX files, but inside it supports only plain text (OL_NOFORMAT) and formatted text (OL_RFP) output levels. See the detailed description of different output levels at RecSetOutputLevel. This converter is supported everywhere DOCX is supported.

The Toolkit does not accept DOCX document input. PowerPDF can generate PDF files from DOCX documents.

See also
Settings of
  • XLSX converter
  • DOCX converter
  • Pages converter
  • PPTX converter

Essay Mode

Besides True Page and Flowing Page layouts where text precisely matches the raw picture, in essay mode size and positioning do not matter. In this layout the text consists of blocks with unified formatting. The separately formatted blocks have common metadata. It allows the end user to format the text easily by changing font and paragraph attributes of large blocks of text with the same style. The style updates affect all text that belong to the same style even if the text is in separate blocks. Moreover, removing headers and footers allows users to reformat the whole text easier, and present it as an HTML page.​

Essay mode supports the following functions:

  • Attribute-based style categorization for text
  • Building Table of Contents directly from heading levels in DOCX and RTF formats
  • Header and footer can be removed to get a continuous text.
  • Any of the above features can be used separately or in any combination.
  • Besides these features, it is also possible to use the Flowing Page mode modified with special flags, that provides the closest layout.

The essay mode can be used in DOCX, RTF and HTML 5.0 outputs by selecting as separate output converters (supported on: Windows, Linux, Embedded Linux, MacOS):

  • Converters.Text.DocXEssay
  • Converters.Text.Html50Essay
  • Converters.Text.RTF2000Essay
See also
Settings of Essay mode converters


RecAPI: Output Converters and Output Levels

  • Output formats of RecAPIPlus
Output Converters and Output Levels

The following table lists all the output converters of the CSDK and shows which OUTPUTLEVELs are supported by each of them. (Not all the output converters are supported on all the platforms. See the description of output formats for details.)

Letter D specifies the default output level for each converter.

 | Plain text OL_NOFORMAT | Formatted text OL_RFP | Spreadsheet OL_SPREADSHEET | True Page OL_TRUEPAGE | Flowing Page OL_FLOWINGPAGE
MP3 Audio | YES (D) | NO | NO | NO | NO
MP3 Audio Premium Quality | YES (D) | NO | NO | NO | NO
ePub | YES | YES (D) | NO | NO | NO
ePub Simple | YES | YES (D) | NO | NO | NO
ePub Poem | YES | YES (D) | NO | NO | NO
Kindle Document | YES | YES (D) | NO | YES | YES
HTML 3.2 | YES | YES | YES (D) | NO | NO
HTML 4.0 | YES | YES | NO | YES (D) | NO
Microsoft Excel 2003, XP | YES | YES (D) | YES | NO | NO
Microsoft Excel 2007 (XLSX) | YES | YES (D) | YES | NO | NO
Microsoft PowerPoint 97 | YES | YES (D) | NO | NO | NO
Microsoft PowerPoint 2007 (PPTX) | NO | NO | NO | YES (D) | NO
Microsoft Publisher 98 | YES | YES (D) | NO | NO | NO
Microsoft Word WordML | YES | YES | NO | YES | YES (D)
Pages (limited DOCX) | YES | YES (D) | NO | NO | NO
PDF | NO | NO | NO | YES (D) | NO
PDF – Edited | YES | YES | NO | YES (D) | NO
PDF with image on text | NO | NO | NO | YES (D) | NO
PDF with image substitutes | NO | NO | NO | YES (D) | NO
RTF Word 2000 | YES | YES | NO | YES | YES (D)
Microsoft Office Open XML Format Document (DOCX) | YES | YES | NO | YES | YES (D)
Text | YES (D) | NO | NO | NO | NO
Comma Separated Text | YES (D) | NO | NO | NO | NO
Formatted Text | NO | NO | NO | YES (D) | NO
Text with line breaks | YES (D) | NO | NO | NO | NO
Unicode Text | YES (D) | NO | NO | NO | NO
Unicode Comma Separated Text | YES (D) | NO | NO | NO | NO
Unicode Formatted Text | NO | NO | NO | YES (D) | NO
Unicode Text with line breaks | YES (D) | NO | NO | NO | NO
WordPad | YES | YES (D) | NO | NO | NO
WordPerfect 9, 10 | YES | YES | NO | YES (D) | YES
XML | NO | NO | NO | YES (D) | NO
XML Paper Specification (XPS) | NO | NO | NO | YES (D) | NO
XPSsearchable | NO | NO | NO | YES (D) | NO


RecAPI: Vertical text support of the converters

  • Output formats of RecAPIPlus
Vertical text support of the converters

The CSDK since version 16 supports the vertical text detection either for the vertical text of the CCJK laguages or for the left and right text of the Western languages.

The following table lists which types of vertical text are supported by the output converters of the CSDK per OUTPUTLEVELs. Empty cells mean the converter does not support the output level, YES/NO specifies whether the converter supports the given vertical text type on the given output level.

 | Plain text |  | Formatted text |  | Spread Sheet |  | True Page |  | Flowing Page
 | Left and right | Vertical | Left and right | Vertical | Left and right | Vertical | Left and right | Vertical | Left and right | Vertical
MP3 Audio | YES | YES |  |  |  |  |  |  |  |
MP3 Audio Premium Quality | YES | YES |  |  |  |  |  |  |  |
ePub | YES | YES | YES | YES |  |  |  |  |  |
ePub Simple | YES | YES | YES | YES |  |  |  |  |  |
ePub Poem | YES | YES | YES | YES |  |  |  |  |  |
Kindle Document | YES | YES | YES | YES |  |  | YES | YES | YES | YES
HTML 3.2 | YES | YES | YES | YES | NO | NO |  |  |  |
HTML 4.0 | YES | YES | YES | YES |  |  | NO | YES |  |
Microsoft Excel 2003, XP | YES | YES | YES | YES | YES | YES |  |  |  |
Microsoft Excel 2007 (XLSX) | YES | YES | YES | YES | YES | YES |  |  |  |
Microsoft PowerPoint 97 | YES | YES | YES | YES |  |  |  |  |  |
Microsoft PowerPoint 2007 (PPTX) | YES | YES | YES | YES |  |  |  |  |  |
Microsoft Publisher 98 | YES | YES | YES | YES |  |  |  |  |  |
Microsoft Word WordML | YES | YES | YES | YES |  |  | YES | YES | YES | YES
PDF |  |  |  |  |  |  | YES | YES |  |
PDF – Edited | NO | NO | NO | NO |  |  | NO | NO |  |
PDF with image on text |  |  |  |  |  |  | YES | YES |  |
PDF with image substitutes |  |  |  |  |  |  | YES | YES |  |
RTF Word 2000 | YES | YES | YES | YES |  |  | YES | YES | YES | YES
Microsoft Office Open XML Format Document (DOCX) | YES | YES | YES | YES |  |  | YES | YES | YES | YES
Text | YES | NO |  |  |  |  |  |  |  |
Comma Separated Text | YES | NO |  |  |  |  |  |  |  |
Formatted Text |  |  |  |  |  |  | NO | NO |  |
Text with line breaks | YES | NO |  |  |  |  |  |  |  |
Unicode Text | YES | YES |  |  |  |  |  |  |  |
Unicode Comma Separated Text | YES | YES |  |  |  |  |  |  |  |
Unicode Formatted Text |  |  |  |  |  |  | NO | NO |  |
Unicode Text with line breaks | YES | YES |  |  |  |  |  |  |  |
WordPad | YES | YES | YES | YES |  |  |  |  |  |
WordPerfect 9, 10 | YES | NO | YES | NO |  |  | NO | NO | NO | NO
XML |  |  |  |  |  |  | YES | YES |  |
XML Paper Specification (XPS) |  |  |  |  |  |  | YES | YES |  |
XPSsearchable |  |  |  |  |  |  | YES | YES |  |


RecAPI: XML output format

  • Output formats of RecAPIPlus
XML output format

The XML (Extensible Markup Language) is a simple and flexible text format based on SGML. XML is a W3C recommendation (http://www.w3.org/XML). The XML was designed to describe structured data, to store it and to send it through the Web. The XML tags are not predefined; we need to define tags. Our XML uses the XSD schema to define tags and attributes. (http://www.scansoft.com/omnipage/xml/ssdoc-schema3.xsd)

We recommend this format to SDK users wanting to send the output through the Web or wanting to process the output. It can be sent easily because it is a plain text file. It can be processed easily because there are many library and tools to process it. The XML file can be parsed with the help of MSXML, .Net, Xerces … The user can parse the XML file to create a tree (DOM) in memory containing all data in the XML file (e.g. MSXML contains DOM). The DOM can also be used to modify and save data. The XML file can also be parsed with help of SAX (and the SAX part of MSXML also) This is a read-only and forward-only interface, but it cannot read all data into memory at the same time. The other possibility to process the XML file is the XSLT. It can transform any XML file to any other text file (plain text, html, xml). The user has to create an xsl file containing rules for the transformation.

An XML contains structured data, represented as a tree. Each node in the tree may include attributes, texts and other nodes. There are tags (e.g. <name>) attributes <name attribute=”value”> text (<name> xy </name>) comment (<— comment —>)... An xml file has to be “Well Formed”. A “Well Formed” xml document has correct XML syntax. An xml file may be “Valid”. A “Valid” xml document conforms to the schema. The parsers cannot read an xml file when it is not “Well Formed”, but some (e.g. MSXML) can read it even if it is not “Valid”. The schema (or DTD) defines the legal elements of an XML document. We support the XSD schema that is maintained by W3C (http://www.scansoft.com/omnipage/xml/ssdoc-schema3.xsd) and we can support the obsolete XDR schema. The schema defines the document structure with a list of legal elements, attributes, the possible relationships between elements, the order and the number of child elements, the types for elements and attributes and others.

This is a simple XML file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<document author=”Name of author” date=”Created at”>
<title>Document Title</title>
<body>The text of document.</body>
</document>


RecAPI: RecPDFAPI related pages

RecPDFAPI related pages

Command strings of rPdfOptAddCommandStr


RecAPI: Command strings of rPdfOptAddCommandStr

  • RecPDFAPI related pages
Command strings of rPdfOptAddCommandStr

The function rPdfOptAddCommandStr of RecPDF Module uses command strings for setting up the optimization process. The below lists show the possible command strings.

Note
The command strings are case-sensitive.

The structure of a command string:

CommandStr[:Specifier[:Exact Value]]

The below lists show the CommandStr in bold. Sublists show the Specifiers if any, and the possible Exact Values are also shown where they can be used.

Basic functions

  • XRef - Compress the XRef structure.
  • CompressObjects - Compress the uncompressed data objects.
  • ZIPStreams - Use Zip compression instead of LZW.
  • Linearize - Optimize for fast web view.

Set the version of the PDF

  • PDF13 - Convert to 1.3
  • PDF14 - Convert to 1.4
  • PDF15 - Convert to 1.5
  • PDF16 - Convert to 1.6
  • PDF17 - Convert to 1.7

Tag handling

  • RemoveTags - Remove the tags from the PDF.

Font handling

  • SubsetFonts - Subset all embedded fonts.

Security

  • NoSec - Remove security.
  • Sec40 - Protect with 40 bit RC4 encryption.
  • Sec128 - Protect with 128 bit RC4 encryption.
  • Sec128AES - Protect with 128 bit AES encryption.
  • Sec256 - Protect with 256 bit AES encryption.
  • OwnerPassword - Set the owner password. Separate the password with ':'! E.g.: OwnerPassword:123A24d
  • Restrictions - Set the security restrictions. Separate the integer value of the combined restriction flags with ':'! Use the flags of RPDF_RESTRICTIONS. E.g. for disabling printing and changing: Restrictions:8448

Image compression

  • BWImages - Set the compression of the black and white images. Possible specifiers:
    • CCITTFax - Group4 compression.
    • JBIG2 - JBIG2 compression. Possible exact values: 1...100
      • E.g.: BWImages:JBIG2:80
  • GrayImages - Set the compression of the grayscale images. Possible specifiers:
    • JPEG - JPEG compression. Possible exact values: 1...100
    • JPEG2000 - JPEG2000 compression. Possible exact values: 1...100
    • ZIP - Zip compression.
  • ColorImages - Set the compression of the color images. Possible specifiers:
    • JPEG - JPEG compression. Possible exact values: 1...100
    • JPEG2000 - JPEG2000 compression. Possible exact values: 1...100
    • ZIP - Zip compression.

Colorspace conversions

  • ImagesToBW - Convert all images to black and white.
  • ImagesToGray - Convert color images to grayscale.
  • ConvertToGray - Convert all PDF content to grayscale.

Metadata handling

  • MetaAdd - Add metadata entry. E.g:
    • MetaAdd:dc:title:TITLE
    • MetaAdd:dc:creator:AUTHOR
    • MetaAdd:dc:description:SUBJECT
    • MetaAdd:pdf:producer:PRODUCER
    • MetaAdd:pdf:Keywords:KYWRD1, KYWRD2
    • MetaAdd:xmp:creatortool: CREATORTOOL
  • MetaRemove - Remove metadata entry. E.g:
    • MetaRemove:dc:title
    • MetaRemove:dc:creator

Sample code fragment

#include "RecPDF.h"
RPDF_DOC rpdf_h = NULL;
rPdfInit();
rPdfOpen(strInpFileName, NULL, &rpdf_h);
rPdfOptAddCommandStr(rpdf_h, L"PDF16");
rPdfOptAddCommandStr(rpdf_h, L"MetaAdd:dc:title:TITLE");
rPdfOptAddCommandStr(rpdf_h, L"MetaAdd:dc:creator:AUTHOR");
rPdfOptAddCommandStr(rpdf_h, L"MetaRemove:dc:description");
rPdfOptimize(rpdf_h, strOutFileName);
rPdfClose(rpdf_h);
rPdfOpen
RECERR PDFASMAPI rPdfOpen(LPCTSTR pFileName, LPCTSTR password, RPDF_DOC *handle)
Open a PDF file.
RPDF_DOC
struct tagRPDF_DOC * RPDF_DOC
Handle of a PDF document.
Definition recpdf.h:48
rPdfInit
RECERR PDFASMAPI rPdfInit(void)
Initialize the RecPDF.
rPdfOptAddCommandStr
RECERR PDFASMAPI rPdfOptAddCommandStr(RPDF_DOC handle, LPCTSTR command)
Add an optimization command string to a handle.
rPdfOptimize
RECERR PDFASMAPI rPdfOptimize(RPDF_DOC handle, LPCTSTR pOptFileName)
Do the optimization process.
rPdfClose
RECERR PDFASMAPI rPdfClose(RPDF_DOC handle)
Close a PDF document.


RecAPI: List of all the RecAPI settings

List of all the RecAPI settings

The settings of the RecAPI can be modified through Settings Manager Module. These settings can be separated into two sets. One contains the settings that existed in the previous version of the CSDK. In most of these cases there are API functions for modifying them, but they can also be changed using the StsMan. (E.g. Kernel.Decomp.PageDesc and kRecGetPageDescription, kRecSetPageDescription.) The other set contains the new settings that generally can be changed only through StsMan calls.

  • Global settings
  • Settings of KernelAPI
    • Settings of the Image File Handling Module
    • Settings of the Scanner Module
    • Settings of the Image Handling Module
    • Settings of the Zone Handling Module
    • Settings of the Form Recognition Module
    • Settings of the Recognition Module
      • The settings of the Asian Recognition Engine Module
      • The settings of the Arabic Recognition Engine Module
      • The settings of the BAR Recognition Engine Module
      • The settings of the HNR Recognition Engine Module
      • The settings of the MAT Recognition Engine Module
      • The settings of the OMR Recognition Engine Module
      • The settings of the RER Recognition Engine Module
    • Settings of the Character and Code Page Handling Module
    • The settings of the Spell Checking Module
    • Settings of the Direct TXT Module
      • Settings of the DTXT Simple Text converter
      • Settings of the DTXT CSV converter
      • Settings of the DTXT Formatted Text converter
      • Settings of the DTXT PDF Image-on-text converter (Searchable PDF)
      • Settings of the DTXT XML converter
      • Settings of the DTXT Binary converter
      • Settings of the DTXT ALTO converter
  • Settings of the RecAPIPlus
    • Settings of Simple Multipage Document Handling
    • Settings of the One Step Functions
    • Settings of the Layout Retention Output
      • Settings of the Formatter
      • Settings of the converters

Global settings

These settings are global in scope, i.e. they are available from KernelAPI, RecAPIPlus and even the IPRO level (see the separate IPRO documentation).

Name | Type | Flags | Default value | Description
Global.UILanguage | STRING | GLOBAL | English | See kRecSetUILang.
Processing.Mode | ENUM (PROCESSING_MODE) | DEFAULT | PROCESSING_NORMAL | Switching between processing modes. See description of PROCESSING_MODE.

Top of page.

Settings of KernelAPI

These settings are defined in the KernelAPI level. Of course, they are available at all levels based on KernelAPI, such as RecAPIPlus, or IPRO (see the separate IPRO documentation).

Name | Type | Flags | Default value | Description
Kernel.Timeout | INT | DEFAULT | 180000 | See kRecSetTimeOut and description of timeout handling.
Kernel.Timeout.Hard | INT | DEFAULT | 10000 | See description of timeout handling.

Top of page.

Settings of the Image File Handling Module

These settings are used by Image File Handling Module.

Name | Type | Flags | Default value | Description
Kernel.IMF.CompressionLevel | INT | DEFAULT | 3 | For FF_PDF, FF_PDF_MRC, FF_JPG, FF_JPG2K, DTXT_IOTPDF and DTXT_IOTPDF_MRC output formats this setting specifies the compression level to be used. This setting can be changed by kRecSetCompressionLevel. See also the details about usage.
Kernel.IMF.CompressionTradeoff | ENUM (COMPRESSION_TRADEOFF) | DEFAULT | COMPRESSION_ADVANCED | For FF_PDF and FF_PDF_MRC output formats this setting specifies the compression method to be used. This setting can be changed by kRecSetCompressionTradeoff. See also documentation of COMPRESSION_TRADEOFF for details.
Kernel.IMF.DataStream.Save | BOOL | DEFAULT | TRUE | This setting allows the saving operations (any kRecSaveImg* and also any kRecConvert2DTXT*) to save the DataStream if possible. See: Using images without decompression.
Kernel.IMF.DataStream.TryToLoad | BOOL | DEFAULT | FALSE | If this setting is true, the standard image loading functions (kRecLoadImg, kRecLoadImgF) load the DataStream if possible, otherwise they load the decompressed image. See: Using images without decompression.
Kernel.IMF.DefaultDPI | INT | DEFAULT | 300 | If an input image file does not contain DPI information, Engine considers as if it would be DefaultDPI.
Kernel.IMF.JBIG2.DefaultLosslessMode | INT | DEFAULT | 1 | This selects the actual default lossless-mode for JBIG2-config. It has effect only if the below setting Kernel.IMF.JBIG2.ForceLosslessMode is 0 or -1. See the details in the section JBIG2 compression in CSDK.
Kernel.IMF.JBIG2.ForceLosslessMode | INT | DEFAULT | -1 | This forces the use of a specific JBIG2 lossless mode or enables lossy/lossless modes. See the details in the section JBIG2 compression in CSDK.
Kernel.IMF.JBIG2.GenRecEnc.IgnoreWhitePageMargin | BOOL | DEFAULT | TRUE | This setting has effect on generic region-based encoding only. If set to true, only the minimal bounding box of the relevant (black) pixels will be explicitly encoded (the default pixel color is white, so the white page margin can be implicitly represented). If set to false, the whole page-image will be explicitly encoded (including the white page margin).
Kernel.IMF.JBIG2.LossyMode | INT | DEFAULT | -1 | This selects the actual symbol-based lossy-mode for JBIG2-config. It has effect only if the above setting Kernel.IMF.JBIG2.ForceLosslessMode is 0. See the details in the section JBIG2 compression in CSDK.
Kernel.IMF.JBIG2.MaxCCNumLossless1 | INT | DEFAULT | 32768 | If according to the actual config the current input would be compressed using lossless-mode 1 and the number of connected components of the input is greater than the configured MaxCCNumLossless1 value, the generic region-based lossless-mode will be selected instead.
Kernel.IMF.JBIG2.MaxCCNumLossless2 | INT | DEFAULT | 32768 | If according to the actual config the current input would be compressed using lossless-mode 2 and the number of connected components of the input is greater than the configured MaxCCNumLossless2 value, the generic region-based lossless-mode will be selected instead.
Kernel.IMF.JBIG2.MaxCCNumLossy0 | INT | DEFAULT | 32768 | If according to the actual config the current input would be compressed using lossy-mode 0 and the number of connected components of the input is greater than the configured MaxCCNumLossy0 value, the actually configured lossless-mode will be selected instead.
Kernel.IMF.JBIG2.MaxCCNumLossy1 | INT | DEFAULT | 32768 | If according to the actual config the current input would be compressed using lossy-mode 1 and the number of connected components of the input is greater than the configured MaxCCNumLossy1 value, the actually configured lossless-mode will be selected instead.
Kernel.IMF.JPG.GrayQualityMult | INT | DEFAULT | -1 | This may be a percentage value between 1 and 100, or -1. This setting influences the compression of grayscale images when saving into JPEG or JPEG2000 files. For grayscale images the quality percentage is multiplied by this value. In default case the multiplier is 0.8. See also kRecSetJPGQuality.
Kernel.IMF.JPG.Orientation | ENUM (JPG_ORIENTATION) | DEFAULT | JPG_ORIENTATION_USEEXIF | For details see the documentation of the enum type.
Kernel.IMF.JPG.Quality | INT | DEFAULT | -1 | See kRecSetJPGQuality.
Kernel.IMF.JPG.Resolution | ENUM (JPG_RESOLUTION) | DEFAULT | JPG_RES_USEDEFAULTDPI | For details see the documentation of the enum type.
Kernel.IMF.PDF.Author | USTRING | DEFAULT | (empty string) | Author field of the PDF document properties. See also the setting Kernel.IMF.PDF.EnableMetaData.
Kernel.IMF.PDF.BWFormat | INT | DEFAULT | 3 | Default compression format for B/W images with both MRC and non-MRC PDF. Possible values: 2 - TIFF-G4, 3 - JBIG2. This setting is to be used for the newer FF_PDF, FF_PDF_MRC, DTXT_IOTPDF and DTXT_IOTPDF_MRC formats.
Kernel.IMF.PDF.ColorFormat | INT | DEFAULT | 1 | Default compression format for Color images with both MRC and non-MRC PDF. Possible values: 0 - JPEG, 1 - JPEG2000. The size of the resulting file may be smaller using JPEG2000. This setting is to be used for the newer FF_PDF, FF_PDF_MRC, DTXT_IOTPDF and DTXT_IOTPDF_MRC formats.
Kernel.IMF.PDF.Compatibility | ENUM (IMF_PDFCOMPATIBILITY) | DEFAULT | IMF_PDF16 | PDF compatibility.
Kernel.IMF.PDF.Creator | USTRING | DEFAULT | (empty string) | Creator name field of the PDF document properties. This is written into the generated PDFs. If it's an empty string, the string "OmniPage CSDK 2025.1" will be used. See also the setting Kernel.IMF.PDF.EnableMetaData.
Kernel.IMF.PDF.CustomMetaData | USTRING | DEFAULT | (empty string) | This setting can contain custom meta-data in an XMP XML subtree. In this case the meta-data XML of the output PDF file will contain also this subtree beside the tags of the PDF document properties. See also the setting Kernel.IMF.PDF.EnableMetaData.
Kernel.IMF.PDF.DefaultImageAltTextPattern | USTRING | DEFAULT | L"image $I - page $P" | Default alt-text string-pattern for images when generating PDF/A-[123]a output, if otherwise no specific alt-text is explicitly specified for the related image-zone. [Special patterns: $P - insert page ID, $I - insert image ID]
Kernel.IMF.PDF.EnableMetaData | BOOL | DEFAULT | FALSE | If this setting is TRUE, a document-level meta-data is written into the output PDF file. This meta-data is an XMP XML stream, containing the fields of the PDF document properties. It can contain custom meta-data as well.
Kernel.IMF.PDF.Keywords | USTRING | DEFAULT | (empty string) | Keywords field of the PDF document properties. See also the setting Kernel.IMF.PDF.EnableMetaData.
Kernel.IMF.PDF.Linearized | BOOL | DEFAULT | FALSE | If this setting is TRUE, the saved PDF will be a linearized PDF.
Kernel.IMF.PDF.LoadFlags | INT | DEFAULT | IMF_PDF_NO_TAGS | all IMF_PDF_ANN_* | See kRecSetImfLoadFlags and the different load flags.
Kernel.IMF.PDF.LoadOriginalDPI | BOOL | DEFAULT | FALSE | See the details on the resolution of the rendered bitmap.
Kernel.IMF.PDF.MRC.BGLayer.ConsolidationStrength | INT | DEFAULT | 3 | This setting determines the consolidation of the background layer. In the case of 0 there is no consolidation. Higher value means stronger consolidation. Maximum value is 3. This is used by FF_PDF_MRC and DTXT_IOTPDF_MRC formats.
Kernel.IMF.PDF.MRC.BGLayer.DilatationSteps | INT | DEFAULT | 1 | This setting determines the number of dilatation steps used during the creation of background layer. Possible values: 0-2. This is used by FF_PDF_MRC and DTXT_IOTPDF_MRC formats.
Kernel.IMF.PDF.MRC.BGLayer.JPGQuality | INT | DEFAULT | -1 | This sets the quality level of background layer (JPEG or JPG2000) in FF_PDF_MRC and DTXT_IOTPDF_MRC output. This is a value between 1 (min) and 100 (max) or -1 (predefined JPG quality of compression level 3). This setting is to be used for the mentioned newer output formats.
Kernel.IMF.PDF.MRC.BGLayer.Method | INT | DEFAULT | 0 | This setting switches between background layer creation method #0 and #1. This is used by FF_PDF_MRC and DTXT_IOTPDF_MRC formats.
Kernel.IMF.PDF.MRC.BGLayer.Smoothing | BOOL | DEFAULT | TRUE | This setting determines whether smoothing algorithm is used during backgorund layer creation or not. This is used by FF_PDF_MRC and DTXT_IOTPDF_MRC formats.
Kernel.IMF.PDF.MRC.BGLayer.SubSampleRate | INT | DEFAULT | 0 | This setting specifies the rate of subsampling used during creation of background layer. This is used by FF_PDF_MRC and DTXT_IOTPDF_MRC formats. The possible values can be 0, 1, 2, 3, etc. The setting expresses a rate how the resolution of the background MRC layer will be decreased. For example, applying a SubSampleRate value of 3 results in a resolution for the layer, which is one third of the original. Accordingly, selecting higher number for the SubSampleRate will have an effect on the quality of the image (since the resolution will be lower and because of applying the MRC technology). A value of zero (i.e. the default) means that the CSDK itself will determine the SubSampleRate values.
Kernel.IMF.PDF.MRC.BWFormat | INT | DEFAULT | 3 | Deprecated. Default compression format for B/W images with both MRC and non-MRC PDF. Possible values: 2 - TIFF-G4, 3 - JBIG2. This setting is to be used for the older FF_PDF_MIN, FF_PDF_MRC_MIN, (also GOOD and SUPERB) and DTXT_PDFIOT formats. For newer formats use the above setting Kernel.IMF.PDF.BWFormat. For details see the section about newer image formats.
Kernel.IMF.PDF.MRC.ColorFormat | INT | DEFAULT | 1 | Deprecated. Default compression format for Color images with both MRC and non-MRC PDF. Possible values: 0 - JPEG, 1 - JPEG2000. The size of the resulting file may be smaller using JPEG2000. This setting is to be used for the older FF_PDF_MIN, FF_PDF_MRC_MIN, (also GOOD and SUPERB) and DTXT_PDFIOT formats. For newer formats use the above setting Kernel.IMF.PDF.ColorFormat. For details see the section about newer image formats.
Kernel.IMF.PDF.MRC.EnableMultipleFG | INT | DEFAULT | 1 | This setting enables the use of multiple foregorund layers. Possible values: 0 and 1. In the case of 0 the PDF has a coloured (or gray) background layer, a coloured (or gray) foreground layer and a selector layer. The value 1 enables more than one monochrome foreground layer. In this latter case there are no selector layers.
Kernel.IMF.PDF.MRC.FGLayer.JPGQuality | INT | DEFAULT | -1 | This sets the quality level of foreground layer (JPEG or JPG2000) in FF_PDF_MRC and DTXT_IOTPDF_MRC output. This is a value between 1 (min) and 100 (max) or -1 (predefined JPG quality of compression level 3). This setting is to be used for the mentioned newer output formats.
Kernel.IMF.PDF.MRC.FGLayer.Method | INT | DEFAULT | 1 | This setting switches between foreground layer creation method #0 and #1. This is used by FF_PDF_MRC and DTXT_IOTPDF_MRC formats.
Kernel.IMF.PDF.MRC.FGLayer.SubSampleRate | INT | DEFAULT | 0 | This setting specifies the rate of subsampling used during creation of foreground layer. This is used by FF_PDF_MRC and DTXT_IOTPDF_MRC formats. The possible values can be 0, 1, 2, 3, etc. The setting expresses a rate how the resolution of the foreground MRC layer will be decreased. For example, applying a SubSampleRate value of 3 results in a resolution for the layer, which is one third of the original. Accordingly, selecting higher number for the SubSampleRate will have an effect on the quality of the image (since the resolution will be lower and because of applying the MRC technology). A value of zero (i.e. the default) means that the CSDK engine itself will determine the SubSampleRate values.
Kernel.IMF.PDF.MRC.EnableUseImagette | INT | DEFAULT | 1 | This setting belongs to the latest MRC Level 5. Allows high quality saving of small images, graphics, diagrams on a document above the standard 3 layers. This will make the image look very similar to the original, yet the file size is much smaller than the original. This is used by FF_PDF_MRC and DTXT_IOTPDF_MRC formats. See Kofax Omnipage Capture SDK User's Guide MRC description section.
Kernel.IMF.PDF.MRC.MRC.EnableUseBigSelector | INT | DEFAULT | 1 | This setting belongs to the latest MRC Level 5. It smooths out the pixel errors and triples the resolution of the text (selector) layer, greatly improving character contour. As a result, PDF readers display the text contour smoother than on the source image, even at high zoom levels. This is used by FF_PDF_MRC and DTXT_IOTPDF_MRC formats. See Kofax Omnipage Capture SDK User's Guide MRC description section.
Kernel.IMF.PDF.MRC.Selector.Method | INT | DEFAULT | 0 | This setting switches between selector layer creation method #0 and #1. This is used by FF_PDF_MRC and DTXT_IOTPDF_MRC formats.
Kernel.IMF.PDF.MRC.SelLayer.SubSampleRate | INT | DEFAULT | 0 | This setting specifies the rate of subsampling used during creation of selector layer. This is used by FF_PDF_MRC and DTXT_IOTPDF_MRC formats.
Kernel.IMF.PDF.MRC.JPGQualityBGMIN | INT | DEFAULT | 50 | Deprecated. This sets the quality level of background for JPEG and JPG2000 image compression within MRC PDF using MRC_MIN in every possible output converter level (see FF_PDF_MRC_MIN, IMF_MRCLEVEL_MIN and Converters.Text.PDF*.UseMRC). This is a percentage value between 1 (min) and 100 (max) or -1 (meaning default). This setting is to be used for the mentioned older output formats. For newer formats use the above setting Kernel.IMF.PDF.MRC.BGLayer.JPGQuality.
Kernel.IMF.PDF.MRC.JPGQualityBGGOOD | INT | DEFAULT | 75 | Deprecated. This sets the quality level of background for JPEG and JPG2000 image compression within MRC PDF using MRC_GOOD in every possible output converter level (see FF_PDF_MRC_GOOD, IMF_MRCLEVEL_GOOD and Converters.Text.PDF*.UseMRC). This is a percentage value between 1 (min) and 100 (max) or -1 (meaning default). This setting is to be used for the mentioned older output formats. For newer formats use the above setting Kernel.IMF.PDF.MRC.BGLayer.JPGQuality.
Kernel.IMF.PDF.MRC.JPGQualityBGMAX | INT | DEFAULT | 75 | Deprecated. This sets the quality level of background for JPEG and JPG2000 image compression within MRC PDF using MRC_SUPERB or MRC_LOSSLESS in every possible output converter level (see FF_PDF_MRC_SUPERB, IMF_MRCLEVEL_SUPERB and Converters.Text.PDF*.UseMRC). This is a percentage value between 1 (min) and 100 (max) or -1 (meaning default). This setting is to be used for the mentioned older output formats. For newer formats use the above setting Kernel.IMF.PDF.MRC.BGLayer.JPGQuality.
Kernel.IMF.PDF.MRC.JPGQualityFGMAX | INT | DEFAULT | 50 | Deprecated. This sets the quality level of foreground for JPEG and JPG2000 image compression within MRC PDF using MRC_SUPERB or MRC_LOSSLESS in every possible output converter level (see FF_PDF_MRC_SUPERB, IMF_MRCLEVEL_SUPERB and Converters.Text.PDF*.UseMRC). This is a percentage value between 1 (min) and 100 (max) or -1 (meaning default). This setting is to be used for the mentioned older output formats. For newer formats use the above setting Kernel.IMF.PDF.MRC.FGLayer.JPGQuality.
Kernel.IMF.PDF.PDFA | BOOL | DEFAULT | FALSE | Deprecated. Use Kernel.IMF.PDF.Compatibility instead.
Kernel.IMF.PDF.PDFSecurity.EnableAdd | BOOL | DONTSAVE | FALSE | Enables adding or modifying text annotations. See the section Saving new encrypted PDF files.
Kernel.IMF.PDF.PDFSecurity.EnableAssemble | BOOL | DONTSAVE | FALSE | Enables assembling the document. See the section Saving new encrypted PDF files.
Kernel.IMF.PDF.PDFSecurity.EnableCopy | BOOL | DONTSAVE | FALSE | Enables copying text and graphics of the document. Copy permission includes also extract permission. See the section Saving new encrypted PDF files.
Kernel.IMF.PDF.PDFSecurity.EnableExtract | BOOL | DONTSAVE | FALSE | Enables extracting text and graphics of the document for supporting accessibility to users with disabilities. See the section Saving new encrypted PDF files.
Kernel.IMF.PDF.PDFSecurity.EnableForms | BOOL | DONTSAVE | FALSE | Enables filling in forms and signing the document. See the section Saving new encrypted PDF files.
Kernel.IMF.PDF.PDFSecurity.EnableModify | BOOL | DONTSAVE | FALSE | Enables modifying the contents of the document. See the section Saving new encrypted PDF files.
Kernel.IMF.PDF.PDFSecurity.EnablePrint | BOOL | DONTSAVE | FALSE | Enables printing permission flag. See the section Saving new encrypted PDF files.
Kernel.IMF.PDF.PDFSecurity.EnablePrintQ | BOOL | DONTSAVE | FALSE | If printing is enabled, this flag enables higher quality printing as well. See the section Saving new encrypted PDF files.
Kernel.IMF.PDF.PDFSecurity.EncryptMetaData | BOOL | DONTSAVE | FALSE | If this setting is TRUE, the meta-data of the output PDF file will be encrypted.
Kernel.IMF.PDF.PDFSecurity.Type | ENUM (IMF_PDFENCRYPTION) | DONTSAVE | IMF_PDFSECURITY_NONE | Specifies the encryption mode used at saving a PDF.
Kernel.IMF.PDF.PDFSecurity.OwnerPassword | USTRING | DONTSAVE | (empty string) | The permissions (or owner, or master) password to be used at saving a new encrypted PDF files.
Kernel.IMF.PDF.PDFSecurity.OwnerPassword8Bit | STRING | DONTSAVE | (empty string) | The permissions (or owner, or master) password to be used at saving a new encrypted PDF files. This is used without any conversion. Use it if you know what you are doing, otherwise use the USTRING version above.
Kernel.IMF.PDF.PDFSecurity.ProcessPassword | USTRING | DONTSAVE | (empty string) | This is the password for opening an existing PDF to be modified and saved.
Kernel.IMF.PDF.PDFSecurity.ProcessPassword8Bit | STRING | DONTSAVE | (empty string) | This is the password for opening an existing PDF to be modified and saved. This is used without any conversion. Use it if you know what you are doing, otherwise use the USTRING version above.
Kernel.IMF.PDF.PDFSecurity.UserPassword | USTRING | DONTSAVE | (empty string) | The open (or user) password to be used at saving a new encrypted PDF files.
Kernel.IMF.PDF.PDFSecurity.UserPassword8Bit | STRING | DONTSAVE | (empty string) | The open (or user) password to be used at saving a new encrypted PDF files. This is used without any conversion. Use it if you know what you are doing, otherwise use the USTRING version above.
Kernel.IMF.PDF.Producer | USTRING | DEFAULT | (empty string) | Producer name field of the PDF document properties. This is written into the generated PDFs. If it's an empty string, the product name set by the functions kRecInit or RecInitPlus will be used. If the product name is not set, the string "OmniPage CSDK 2025.1" will be used. See also the setting Kernel.IMF.PDF.EnableMetaData.
Kernel.IMF.PDF.Resolution | INT | DEFAULT | 0 | See the details on the resolution of the rendered bitmap.
Kernel.IMF.PDF.SplitMaxPages | INT | DEFAULT | 0 | If this is not 0, OPSDK tries to generate output files containing at most the specified number of pages instead of one file. The name of the output files are generated from the User-specified filename using ordinal numbers.
Kernel.IMF.PDF.SplitMaxSize | INT | DEFAULT | 0 | If this is not 0, OPSDK tries to generate output files having their size lower than the specified bytes instead of generating one file. The name of the output files are generated from the User-specified filename using ordinal numbers. In some cases the resulted sizes may be over the specified one depending on the content of the pages.
Kernel.IMF.PDF.Subject | USTRING | DEFAULT | (empty string) | Subject field of the PDF document properties. See also the setting Kernel.IMF.PDF.EnableMetaData.
Kernel.IMF.PDF.Title | USTRING | DEFAULT | (empty string) | Title field of the PDF document properties. See also the setting Kernel.IMF.PDF.EnableMetaData.

Top of page.

Settings of the Scanner Module

These settings are used by Scanning Module.

Name | Type | Flags | Default value | Description
Kernel.Scanner | STRING | INFO | DONTSETTODEFAULT | SLINK | (empty string) | Node name of the currently selected scanner under setting Scanners. It is set by kRecSetScannerSelected. For details, see Different ways of adjusting scanner settings.
Kernel.Scanner.Bps | INT | DONTSAVE | Scanner dependent (RSDII_BW). | Bits per sample setting (see RSDII). It is set by kRecSetScanBitsPerSample.
Kernel.Scanner.Brightness | INT | DONTSAVE | Scanner dependent (50). | Brightness setting as a percentage (0...100). It is set by kRecSetScanBrightness or kRecSetScanBrightnessVal.
Kernel.Scanner.BrightnessVal | INT | DONTSAVE | Scanner dependent. | Brightness setting of the scanner. It is set by kRecSetScanBrightness or kRecSetScanBrightnessVal.
Kernel.Scanner.Contrast | INT | DONTSAVE | Scanner dependent (50). | Contrast setting as a percentage (0...100). It is set by kRecSetScanContrast or kRecSetScanContrastVal.
Kernel.Scanner.ContrastVal | INT | DONTSAVE | Scanner dependent. | Contrast setting of the scanner. It is set by kRecSetScanContrast or kRecSetScanContrastVal.
Kernel.Scanner.Dropout | INT | DONTSAVE | Scanner dependent (RSDLC_WHITE). | Dropout setting (see RSDLC). It is set by kRecSetScanDropout.
Kernel.Scanner.Duplex | INT | DONTSAVE | Scanner dependent (RSDDX_SINGLE). | Duplex setting (see RSDDX). It is set by kRecSetScanDuplex.
Kernel.Scanner.GetParamsFromScanner | BOOL | DONTSAVE | FALSE | Scan parameters are retrieved from the scanning system. It is set by kRecSetScanParamSource.
Kernel.Scanner.IgnoreErrors | BOOL | DONTSAVE | FALSE | Ignore errors in the kRecSetScanParamsBySettings function. It is set by kRecSetScanErrorMode.
Kernel.Scanner.Left | INT | DONTSAVE | 0 | Left margin in 1/1200 inches. It is set by kRecSetScanArea.
Kernel.Scanner.Length | INT | DONTSAVE | 14031 or 13200 | Difference between the bottom and top margins in 1/1200 inches. It is set by kRecSetScanArea.
Kernel.Scanner.Name | STRING | INFO | DONTSAVE | (Scanner dependent) | Name of the currently selected scanner. It is set by kRecSetScannerSelected.
Kernel.Scanner.Orientation | INT | DONTSAVE | Scanner dependent (RSDOR_NORMAL). | Orientation setting (see RSDOR). It is set by kRecSetScanOrientation.
Kernel.Scanner.PaperLength | INT | DONTSAVE | 14031 or 13200 | Paper length in 1/1200 inches. It is set by kRecSetScanPaperSize.
Kernel.Scanner.PaperSource | INT | DONTSAVE | Scanner dependent. | Paper source setting (see RSDPS). It is set by kRecSetScanPaperSource.
Kernel.Scanner.PaperWidth | INT | DONTSAVE | 9921 or 10200 | Paper width in 1/1200 inches. It is set by kRecSetScanPaperSize.
Kernel.Scanner.Resolution | INT | DONTSAVE | 300 | Resolution setting in DPI. It is set by kRecSetScanResolution.
Kernel.Scanner.StartMode | INT | DONTSAVE | Scanner dependent. | Start mode setting (see RSDST). It is set by kRecSetScanStartMode.
Kernel.Scanner.Top | INT | DONTSAVE | 0 | Top margin in 1/1200 inches. It is set by kRecSetScanArea.
Kernel.Scanner.Width | INT | DONTSAVE | 9921 or 10200 | Difference between the right and left margins in 1/1200 inches. It is set by kRecSetScanArea.
Scanners | STRING | INFO | DONTSETTODEFAULT | (empty string) | This is the root of the setting subtrees of all the scanners initialized so far. Each such scanner has a separated subtree containing similar nodes. The settings of the selected scanner can be accessed from its own subtree or through the above settings Kernel.Scanner.*. kRecSetScannerSelected fills the subtree of the selected scanner. kRecGetScanners creates the subtrees of all the scanners included in the scanner init file. The value of this setting is the real name of the selected scanner. For details, see Different ways of adjusting scanner settings.

Top of page.

Settings of the Image Handling Module

These settings are used by Image Handling Module during its operations.

Name | Type | Flags | Default value | Description
Kernel.Img.Binarization.Brightness | INT | DEFAULT | 50 | See kRecSetImgBrightness.
Kernel.Img.Binarization.PrimaryMode | ENUM (IMG_CONVERSION) | DEFAULT | CNV_NO | See kRecSetImgConvMode.
Kernel.Img.Binarization.SecondaryMode | ENUM (IMG_CONVERSION) | DEFAULT | CNV_AUTO | See kRecSetImgBinarizationMode.
Kernel.Img.Binarization.Threshold | INT | DEFAULT | 128 | See kRecSetImgThreshold.
Kernel.Img.BlankPage.Margin.Bottom | INT | DEFAULT | 0 | This determines how many pixel rows are skipped by blank page detection at the bottom of the image.
Kernel.Img.BlankPage.Margin.Left | INT | DEFAULT | 0 | This determines how many pixel rows are skipped by blank page detection at the left side of the image.
Kernel.Img.BlankPage.Margin.Right | INT | DEFAULT | 0 | This determines how many pixel rows are skipped by blank page detection at the right side of the image.
Kernel.Img.BlankPage.Margin.Top | INT | DEFAULT | 0 | This determines how many pixel rows are skipped by blank page detection at the top of the image.
Kernel.Img.BlankPage.Sensitivity | INT | DEFAULT | 50 | This determines the sensitivity of the blank page detection algorithm. It can be between 0 and 100. 100 is the most sensitive way, when some little spots may cause that the image is considered as non-blank.
Kernel.Img.BookSize.X | INT | DEFAULT | 0 | See kRecCreateBookPages.
Kernel.Img.BookSize.Y | INT | DEFAULT | 0 | See kRecCreateBookPages.
Kernel.Img.Camera.EstimateResolution | BOOL | DEFAULT | TRUE | In cases of camera images this setting determines whether Preprocess estimates the resolution of the image based on character sizes or not.
Kernel.Img.Deskew.KeepPageSize | BOOL | DEFAULT | TRUE | When this setting is true, the image size does not change during deskew, therefore the edges of the page may be truncated (compatible with previous versions). When this setting is false, deskew may enlarge the page before processing (filling the edges with white pixels), so the edges will not be truncated. Note that in this case the size of the page may vary depending on how skewed the processed image was. If you process multi-page scanned document and want to convert it to some formatted output, then the pages of the output document may be of different sizes.
Kernel.Img.Deskew.Mode | ENUM (IMG_DESKEW) | DEFAULT | DSK_2D | See kRecSetImgDeskew
Kernel.Img.Deskew.Padding | INT | DEFAULT | -1 | This setting specifies the pixel-values used for filling the empty areas generated at the corners of the image during 2D deskewing. -1 means white. Otherwise deskew uses only the lower byte of the value. For B/W images it can be only 0 (white) and 255. For grayscale images the value used as a gray-level (i.e. 255 is white).
Kernel.Img.Deskew.SkewDetect.MinLetterNum | INT | DEFAULT | 20 | It is used by automatic deskew. If the number of letters on the page is less than this value, the program does not detect the skew of the image.
Kernel.Img.Deskew.Slope | INT | DEFAULT | 0 | See kRecSetImgSlope
Kernel.Img.Despeckle.Halftone | INT | DEFAULT | -1 | This setting switches on and off the special despeckle algorithm for detecting and removing halftone or dithering type noises. 0 means off, 1 means on. In case of -1 the current preprocessing trade-off (Kernel.OcrMgr.TradeOff.PreProc) determines whether this halftone detection and removal is applied or not. It is not applied if trade-off is TO_FAST. See also details in the section Despeckle for halftone images.
Kernel.Img.DespeckleMode | BOOL | DEFAULT | TRUE | See kRecSetImgDespeckleMode.
Kernel.Img.DropoutColor.Blue | INT | DEFAULT | 29 | See kRecSetDropoutColorWeights.
Kernel.Img.DropoutColor.Green | INT | DEFAULT | 150 | See kRecSetDropoutColorWeights.
Kernel.Img.DropoutColor.Red | INT | DEFAULT | 77 | See kRecSetDropoutColorWeights.
Kernel.Img.EnableInterpolation | BOOL | DEFAULT | TRUE | This is used by deskew and kRecTransformImg (if the image is being made smaller). These functions use interpolation on 8-bit grayscale and 24-bit true-color images if this setting is TRUE. Interpolation is slower but gives better image quality.
Kernel.Img.FaxCorrectionEnabled | BOOL | DEFAULT | TRUE | See kRecSetFaxCorrection.
Kernel.Img.ForceTestRecognition | INT | DEFAULT | 0 | This is used by autorotation. In order to detect whether the image is upside-down the program may perform a test-recognition on a small part of the image. If this setting is FALSE, the program first tries to detect the orientation of the image by a simpler algorithm and applies test-recognition only if the first algorithm can not detect it. If this setting is TRUE, autorotation always performs test recognition.
Kernel.Img.Invert | ENUM (IMG_INVERT) | DEFAULT | INV_AUTO | See kRecSetImgInvert.
Kernel.Img.KeepOriginalImage | BOOL | DEFAULT | FALSE | See kRecSetPreserveOriginalImg.
Kernel.Img.LineOrder | ENUM (IMG_LINEORDER) | DEFAULT | TOP_DOWN | See kRecSetImgFormat.
Kernel.Img.Max.Pix.X | INT | DEFAULT | 8400 | This is used by image loading functions: maximum enabled image size (in x direction) in pixels. If the size of the image is greater than this value, image loading returns IMG_SIZE_ERR error.
Kernel.Img.Max.Pix.Y | INT | DEFAULT | 8400 | This is used by image loading functions: maximum enabled image size (in y direction) in pixels. If the size of the image is greater than this value, image loading returns IMG_SIZE_ERR error.
Kernel.Img.Min.Pix.X | INT | DEFAULT | 16 | This is used by image loading functions: minimum enabled image size (in x direction) in pixels. If the size of the image is less than this value, image loading returns IMG_SIZE_ERR error.
Kernel.Img.Min.Pix.Y | INT | DEFAULT | 16 | This is used by image loading functions: minimum enabled image size (in y direction) in pixels. If the size of the image is less than this value, image loading returns IMG_SIZE_ERR error.
Kernel.Img.Padding | ENUM (IMG_PADDING) | DEFAULT | PAD_WORDBOUNDARY | See kRecSetImgFormat.
Kernel.Img.ReconstructAngle | INT | DEFAULT | 35 | See Reconstruct algorithm.
Kernel.Img.Resolution.Restore | BOOL | DEFAULT | FALSE | See the notes about changing resolution of the images at kRecPreprocessImg.
Kernel.Img.ResolutionEnhancement | ENUM (IMG_RESENH) | DEFAULT | RE_AUTO | See kRecSetImgResolEnhancement.
Kernel.Img.RGBOrder | ENUM (IMG_RGBORDER) | DEFAULT | COLOR_RGB | See kRecSetImgFormat.
Kernel.Img.Rotation | ENUM (IMG_ROTATE) | DEFAULT | ROT_AUTO | See kRecSetImgRotation
Kernel.Img.ScreenCapture | ENUM (IMG_SCREENCAPTURE) | DEFAULT | SCR_NO | See the description of screen capture processing.
Kernel.Img.StraightenTextLines | BOOL | DEFAULT | TRUE | Used by automatic 3D-deskew (i.e. when the deskew mode is DSK_3D). If this setting is TRUE, 3D-deskew performs text line straightening (see also Digital camera input).
Kernel.Img.StretchMode | ENUM (IMG_STRETCHMODE) | DEFAULT | STRETCH_DELETE | See kRecSetImgStretchMode.
Kernel.Img.Thumbnail.BitsPerPixel | INT | DEFAULT | 24 | See kRecSetThumbnailImgInfo.
Kernel.Img.Thumbnail.Color | INT | DEFAULT | 0 | See kRecSetThumbnailImgInfo.
Kernel.Img.Thumbnail.Size.X | INT | DEFAULT | 100 | See kRecSetThumbnailImgInfo.
Kernel.Img.Thumbnail.Size.Y | INT | DEFAULT | 100 | See kRecSetThumbnailImgInfo.
Kernel.Img.ViewDownsample | BOOL | DEFAULT | FALSE | See kRecSetImgDownsample.
Kernel.Img.Whiteboard.Strength | INT | DEFAULT | 50 | Strength of correction used by kRecEnhanceWhiteboardImg. The value must be between 0 and 100. Higher value causes greater modification on the image.
Kernel.LegalPleading | BOOL | DEFAULT | FALSE | See the handling of legal documents.
Kernel.OcrMgr.RetainColor | ENUM (RETAINCOLOR) | DEFAULT | RETAINCOLOR_YES | See kRecSetRetainColor.

Top of page.

Settings of the Zone Handling Module

These settings are used by the Zone Handling Module during its operations.

Name | Type | Flags | Default value | Description
Kernel.Decomp.EnableNonGrid | BOOL | DEFAULT | TRUE | See kRecSetNongriddedTableDetect.
Kernel.Decomp.FindRotatedText | BOOL | DEFAULT | TRUE | Used by DCM_STANDARD method of auto zoning on Western languages. If this setting is TRUE, DCM_STANDARD performs vertical (left and right rotated) text detection. See vertical text support.
Kernel.Decomp.ForceSingleColumn | BOOL | DEFAULT | FALSE | See kRecSetForceSingleColumn.
Kernel.Decomp.LineDetection.EnhanceGrayImage INT DEFAULT 1 This setting has an effect on line detection during the zoning process. When this setting is set, the zoning algorithm can find the pale rule lines better. The setting has no effect on black and white images. Possible values:
  • 0: the algorithm works in the cases of CCJK languages only (default).
  • 1: the algorithm works for any languages.
  • 2: the algorith does not work.
Kernel.Decomp.Method | ENUM (IMG_DECOMP) | DEFAULT | DCM_AUTO | See kRecSetDecompMethod.
Kernel.Decomp.PageDesc | ENUM (see Page Descriptor defines) | BITFIELD | 0 | See kRecSetPageDescription.
Kernel.Decomp.Table.NGSplitters | BOOL | DEFAULT | TRUE | A gridded table may contain non-gridded cells, which is detected by the table detection algorithm. It analyzes the numerical columns, examines the first letter of the text to see if it is capitalized, etc. Based on this information, it decides whether a non-gridded cell is needed or not. This algorithm sometimes makes mistakes, so the non-gridded cell search can be turned off with FALSE value of this setting.

Top of page.

Settings of the Form Recognition Module

These settings are used by the Form Recognition Module during its operations.

Name | Type | Flags | Default value | Description
Kernel.Form.ContinueOnMissingRefAnchors | BOOL | DEFAULT | FALSE | This setting affects the behavior of kRecFindFormTemplate when one or more reference anchors was/were not found. If it is FALSE, then the template matching fails when any reference anchor was not found. If it is TRUE, then the confidence value is reduced, and if the confidence value is greater than or equal to the threshold specified by Kernel.Form.MatchingConfidence setting then the matching succeeds.
Kernel.Form.MatchingConfidence | INT | DEFAULT | 65 | During kRecFindFormTemplate a confidence value is calculated for each template. If this confidence value is lower than the value of the setting, the given template is considered as non-matching. Its value can be between 0 and 100.
Kernel.Form.UseLetters | BOOL | DEFAULT | TRUE | If this setting is FALSE or HPAGE does not contain letters, kRecFindFormTemplate recognizes those parts of the image, where anchors may occur (i.e. the union of the anchor locations including drifts). If it is TRUE and HPAGE contains letters, kRecFindFormTemplate does not recognize the image, but uses the existing letters instead.
Kernel.Form.UseLinesOnMatching | BOOL | DEFAULT | TRUE | This determines whether to use the lines around the zones for a better fit.

Top of page.

Settings of the Recognition Module

These settings are used in tuning the recognition engines. See Recognition Module.

Name | Type | Flags | Default value | Description
Kernel.OcrMgr.DefaultFillingMethod | ENUM (FILLINGMETHOD) | DEFAULT | FM_OMNIFONT | See kRecSetDefaultFillingMethod.
Kernel.OcrMgr.DefaultRecognitionModule | ENUM (RECOGNITIONMODULE) | DEFAULT | RM_AUTO | See kRecSetDefaultRecognitionModule.
Kernel.OcrMgr.DetectFillingMethod | BOOL | DEFAULT | FALSE | This setting is useful when the input image could be a dotmatrix printed page.
Kernel.OcrMgr.DisableFullPostProc | INT | DEFAULT | -1 | The 1 value of this setting switches off the steps of Post-Processing (e.g. background and foreground color detection, rule line and frame detection, bullet recognition, font attribute detection, DropCap and Superscript/Subscript detection end-of-paragraph marking, language consolidation. The -1 value means that the performance settings decide about Post-Processing.
Kernel.OcrMgr.EmbeddedEngine | BOOL | DEFAULT | FALSE | See the section Recognition modules and setting of their performance.
Kernel.OcrMgr.FontSizeCon | BOOL | DEFAULT | TRUE | This determines whether the font size consolidation is to be run. It may be disabled when the integrating application uses PLUS engines, because PLUS engines have their own font size consolidation algorithm.
Kernel.OcrMgr.Images.KeepOcrImage | BOOL | DEFAULT | TRUE | This is used by the recognition process. If it is FALSE the OCR image (II_OCR) is deleted after recognition. It is recommended to keep it TRUE when creating MRC compressed PDF output.
Kernel.OcrMgr.Pages | INT | INFO | DONTSAVE | 0 | Number of recognized pages since the last call to kRecInit.
Kernel.OcrMgr.PDF.ProcessingMode | ENUM (PDF_PROC_MODE) | DEFAULT | PDF_PM_AUTO | PDF processing mode. See PDF recognition and PDF_PROC_MODE.
Kernel.OcrMgr.PDF.RecognitionMode | ENUM (PDF_REC_MODE) | DEFAULT | PDF_RM_ALWAYSRECOGNIZE | PDF recognition mode. See PDF recognition and PDF_REC_MODE.
Kernel.OcrMgr.PDF.TradeOff | ENUM (RMTRADEOFF) | DEFAULT | TO_BALANCED | When the recognition mode is RM_OMNIFONT_PLUS2W or RM_OMNIFONT_PLUS3W, this can affect the speed of recognition of normal PDF files (non-image-only PDF). This setting is designed for speeding up the general trade-off (Kernel.OcrMgr.TradeOff). If the general trade-off is faster than PDF trade-off, the general one is the dominant.
Kernel.OcrMgr.PreferAccurateEngine | BOOL | DEFAULT | TRUE | See the section Recognition modules and setting of their performance.
Kernel.OcrMgr.PreferFastEngine | BOOL | DEFAULT | FALSE | See the section Recognition modules and setting of their performance.
Kernel.OcrMgr.SureText | BOOL | DEFAULT | FALSE | If this setting is TRUE, the OCR engine and the standard zoning apply a lower probability to classifying a shape as noise instead of a character. It may be useful when the zones contain a small number of characters and the User is sure the shapes in the zones are characters. However, it is only a hint for the OCR engines and the zoning.
Kernel.OcrMgr.TradeOff | ENUM (RMTRADEOFF) | DEFAULT | TO_ACCURATE | See kRecSetRMTradeoff.
Kernel.OcrMgr.TradeOff.PreProc | ENUM (RMTRADEOFF) | DEFAULT | -1 | This setting specifies the trade-off setting used by preprocessing. Its default value is -1, which means that preprocessing uses the general trade-off setting (Kernel.OcrMgr.TradeOff above, see also: kRecSetRMTradeoff) . In addition it can be set to TO_FAST, TO_BALANCED and TO_ACCURATE allowing to use specific trade-off setting for preprocessing. See also kRecPreprocessImg.
Kernel.OcrMgr.Training.FileName | STRING | DEFAULT | (empty string) | See kRecSetTrainingFileName.
Kernel.RPP.OutputFileName | INT | DEFAULT | 0 | Specifies how kRecProcessPagesEx generates output documents. In case of 1 separate output file is generated for each input file. 0 means one output file containing all the pages.
Kernel.RPP.RecThreadCount (supported on: Windows, Linux) | INT | DEFAULT | -1 | This determines the maximum number of recognition threads started by kRecProcessPagesEx and RecProcessPagesEx. In case of -1 (also 0) the maximum number of threads is equal to the number of virtual CPU's (including hyper threads). 8 is a current maximum number of OCR engine instances that can run parallel. It could be less depending on the actual distributed runtime file set. Check the number of xocr*, mor*, FireWrx*, etc. files. This setting is useful if the application wants to limit the cpu load.

Top of page.

The settings of the Asian Recognition Engine Module

These settings are used by the Asian Recognition Engine Module during its operations.

Name | Type | Flags | Default value | Description
Kernel.OcrMgr.Asian.CHTIncludesHKSCS | BOOL | DEFAULT | FALSE | If it is switched on and Chinese Traditional (LANG_CHT) OCR language is selected, the Asian Recognition Module recognizes characters also from Hong Kong character set. This may cause some decreasing of the accuracy of Chinese Traditional OCR.
Kernel.OcrMgr.Asian.ConvertFullWidthToHalfWidth | BOOL | DEFAULT | TRUE | If it is switched on, the full width Latin characters will be replaced with their half width counterparts.
Kernel.OcrMgr.Asian.ConvertPunctuationToHorizontal | BOOL | DEFAULT | TRUE | If it is switched on, the vertical punctuation marks will be replaced with their horizontal counterparts.
Kernel.OcrMgr.Asian.FullCharacterSet | INT | DEFAULT | 0 | Possible values: 0, 1, 2. Larger values extend the set of recognizable CCJK characters. See Supported characters with the CCJK languages for details.

Top of page.

The settings of the Arabic Recognition Engine Module

These settings are used by the Arabic Recognition Engine Module during its operations.

Name | Type | Flags | Default value | Description
Kernel.Img.Deskew.EnabledForArabic | BOOL | DEFAULT | FALSE | If it is switched on, the deskew mode DSK_AUTO works for Arabic language similarly to the Western languages. If it is switched off, the DSK_AUTO will be the same as DSK_NO for Arabic language.
Kernel.Img.Rotation.EnabledForArabic | BOOL | DEFAULT | TRUE | If it is switched on, the rotation mode ROT_AUTO works for Arabic language similarly to the Western languages. If it is switched off, the ROT_AUTO will be the same as ROT_NO for Arabic language.

Top of page.

The settings of the BAR Recognition Engine Module

These settings are used by the BAR Recognition Engine Module during its operations.

Name | Type | Flags | Default value | Description
Kernel.OcrMgr.BarBinary | BOOL | DEFAULT | FALSE | This setting forces the barcode modules to create binary output without any character conversion or formatting. See also Binary output and DTXT_BINARY.
Kernel.OcrMgr.BarCheckBarTypes.Enable.C39_C32 | BOOL | DEFAULT | FALSE | Generally it is useful when the recognition engine automatically decides between Code39 and Code32 barcodes. The TRUE value of this setting makes BAR engine capable to accept both BAR_C39 and BAR_C32 together, thus it can find out the more likely barcode type. For the value FALSE the function kRecCheckBarTypes does not allow to enable them together. Note that some 6-character long C39 barcodes can be misdetected as C32 due to the nature of C32 encoding.
Kernel.OcrMgr.BarCheckBarTypes.Enable.C39_C39EXT BOOL DEFAULT TRUE

Generally it is useful when the recognition engine automatically decides between Code39 and Code39 Extended barcodes. The TRUE value of this setting makes BAR engine capable to accept both BAR_C39 and BAR_C39_EXT together, thus it can find out the more likely barcode type. For example in the string "2+3", '+' is a modificator character which modifies the upper case letter to lower case in BAR_C39_EXT. Thus this mode results a NO_TXT_WARN because "+3" is not a valid full ASCII character combination. If this setting is TRUE, the result is "2+3", since it is a valid string in BAR_C39!

For the value FALSE the function kRecCheckBarTypes does not allow to enable them together. There may be some cases, when the engine cannot decide automatically between these barcode types, so the User should force one of them. For example, the string "ARM/CHAIR" is read by BAR_C39 as "ARM/CHAIR". However, if BAR_C39_EXT type is enabled, the result is "ARM#HAIR" because the sequence "/C" is equal to '#' in BAR_C39_EXT.

Kernel.OcrMgr.BarEnable1D2D | BOOL | DEFAULT | TRUE | This setting enables searching 1D and 2D barcodes on a page at the same time.
Kernel.OcrMgr.BarEnableFamily | BOOL | DEFAULT | TRUE | See the details here.
Kernel.OcrMgr.BarFastMode | BOOL | DEFAULT | FALSE | TRUE value of this setting switches on a faster operation of BAR Module for supporting batch separation.
Kernel.OcrMgr.BarTypes | SET (BAR_TYPE) | DEFAULT | BAR_EAN, BAR_ITF, BAR_C39, BAR_C128, BAR_CB | See also kRecSetBarTypes and kRecGetAutoBarTypes.
Kernel.OcrMgr.Codes.CtrlOffset INT DEFAULT 0x2800

Recognized control codes (in most cases from binary barcodes) are returned with this offset added to their value. This means the control codes are shifted to the Unicode Braille Patterns area (0x2800) by default. E.g. 0x001F is returned as 0x281F by default. (Note: this unicode area are not recognized normally.)
When this setting has a negative value, all control characters are replaced with the absolute value of this setting. E.g. If the setting value is -0xE000, the 0x001F is returned as 0xE000. See details about BAR Output and Non-standard encoding of PDF input.

Kernel.Ocr.BAR.bar1D.MinHeight | INT | DEFAULT | 120 | Minimum height of valid barcode in 1/1200 inches. It can be useful to avoid some misrecognitions.
Kernel.Ocr.BAR.bar1D.MinLength | INT | DEFAULT | 3 | Minimum length of valid barcode. It can be useful to avoid some misrecognitions.
Kernel.Ocr.BAR.bar1D.MinBarLines | INT | DEFAULT | 14 | If the number of bars in a barcode is less than this value, the barcode is omitted.
Kernel.Ocr.BAR.bar1D.MaxBars | INT | DEFAULT | 25 | Size of buffer used to store the recognized barcodes per zone. This is used as the upper limit of the recognized barcodes per zone.
Kernel.Ocr.BAR.bar2D.OneBarInZones | BOOL | DEFAULT | FALSE | Its TRUE value means that there is only one 2D barcode in the zone.
Kernel.Ocr.BAR.bar1D.UseOriginalImage | Deprecated.
Kernel.Ocr.BAR.bar2D.UseOriginalImage

Deprecated.

Kernel.Ocr.BAR.bar1D.2of5.CDX | BOOL | DEFAULT | FALSE | This setting enables checksum verification for BAR_2of5. If this is TRUE, the result contains only barcodes having correct checksum.
Kernel.Ocr.BAR.bar1D.4STATE.AusPost.CustomerEncoding | ENUM (AUSPOST_ENC) | DEFAULT | AUSPOST_ENC_CHARACTER | This determines the encoding method supposed to be used at generating the Australian Post barcode.
Kernel.Ocr.BAR.bar1D.EAN.SUPPL | BOOL | DEFAULT | FALSE | This setting enables supplement recognition of EAN 8 and EAN 13 barcodes (BAR_EAN).
Kernel.Ocr.BAR.bar1D.M2of5.CDX | BOOL | DEFAULT | FALSE | This setting enables checksum verification for BAR_MAT25. If this is TRUE, the result contains only barcodes having correct checksum.
Kernel.Ocr.BAR.bar1D.MSI.CDX | BOOL | DEFAULT | TRUE | This setting enables checksum verification for BAR_MSI. If this is TRUE, the result contains only barcodes having correct checksum. MSI uses one or two check digits, which may be calculated in a number of different ways. It is itself the barcode generator application who selects which algorithm is implemented. OPSDK can recognize only check digits created by Luhn algorithm.
Kernel.Ocr.BAR.bar1D.UPCA.SUPPL | BOOL | DEFAULT | FALSE | This setting enables supplement recognition of UPC A barcodes (BAR_UPC_A).
Kernel.Ocr.BAR.bar1D.UPCE.SUPPL | BOOL | DEFAULT | FALSE | This setting enables supplement recognition of UPC E barcodes (BAR_UPC_E).
Kernel.Ocr.BAR.bar1D.ITF.CDX | BOOL | DEFAULT | FALSE | This setting enables checksum verification for BAR_ITF. If this is TRUE, the result contains only barcodes having correct checksum.
Kernel.Ocr.BAR.bar1D.C39.CDX | BOOL | DEFAULT | FALSE | This setting enables checksum verification for BAR_C39. If this is TRUE, the result contains only barcodes having correct checksum.
Kernel.Ocr.BAR.bar1D.C39.SST | BOOL | DEFAULT | FALSE | This setting enables start-stop character transmission for BAR_C39.
Kernel.Ocr.BAR.bar1D.C39.FA | BOOL | DEFAULT | FALSE | This setting enables full ASCII recognition mode for BAR_C39.
Kernel.Ocr.BAR.bar1D.C128.CDT | BOOL | DEFAULT | FALSE | This setting enables check digit transmission for BAR_C128.
Kernel.Ocr.BAR.bar1D.CB.SST | BOOL | DEFAULT | TRUE | This setting enables start-stop character transmission for BAR_CB.
Kernel.Ocr.BAR.bar1D.PATCH.AllSides | BOOL | DEFAULT | FALSE | This setting enables to find Patch codes (BAR_PATCH) on all sides of the page.
Kernel.Ocr.BAR.bar1D.POSTNET.CDT BOOL DEFAULT FALSE

This setting enables check digit transmission for BAR_POSTNET.

Kernel.Ocr.BAR.bar2D.PDF417.CodePage | STRING | DEFAULT | (empty string) | Code page used for converting codes in BAR_PDF417 barcodes. The default means automatic code page detection. See Barcode code page handling for details.
Kernel.Ocr.BAR.bar2D.QR.CodePage | STRING | DEFAULT | (empty string) | Code page used for converting codes in BAR_QR barcodes. The default means automatic code page detection. See Barcode code page handling for details.
Kernel.Ocr.BAR.bar2D.DMATRIX.CodePage | STRING | DEFAULT | (empty string) | Code page used for converting codes in BAR_DMATRIX barcodes. The default means automatic code page detection. See Barcode code page handling for details.

Top of page.

The settings of the HNR Recognition Engine Module

These settings are used by the HNR Recognition Engine Module during its operations.

This recognition module is supported on: Windows.

Name | Type | Flags | Default value | Description
Kernel.Ocr.HNR.box_height | INT | DEFAULT | 0 | See kRecSetHnrParams.
Kernel.Ocr.HNR.box_space | INT | DEFAULT | 0 | See kRecSetHnrParams.
Kernel.Ocr.HNR.box_width | INT | DEFAULT | 0 | See kRecSetHnrParams.
Kernel.Ocr.HNR.Database | ENUM (HNR_STYLE) | DEFAULT | STYLE_EURO | See kRecSetHnrStyle.
Kernel.Ocr.HNR.icrMethod | ENUM | DEFAULT | 1 | Possible values: 0 - Fewer rejected characters in the output, more misrecognized, but overall a higher number of correctly recognized characters; 1 - More rejected characters in the output, fewer misrecognized characters, but a lower number of correctly recognized characters.
Kernel.Ocr.HNR.Spaces | BOOL | DEFAULT | TRUE | See kRecSetHnrParams.

Top of page.

The settings of the MAT Recognition Engine Module

These settings are used by the MAT Recognition Engine Module during its operations.

This recognition module is supported on: Windows.

Name | Type | Flags | Default value | Description
Kernel.Ocr.MAT.SpecParam | STRING | DEFAULT | (empty string) | This contains the path of the INI file containing the single/multi line mode selection.

Top of page.

The settings of the OMR Recognition Engine Module

These settings are used by the OMR Recognition Engine Module during its operations.

Name | Type | Flags | Default value | Description
Kernel.Ocr.OMR.Code.Filled | INT | DEFAULT | '1' | This setting determines the character indicating the filled checkboxes in LETTER::code.
Kernel.Ocr.OMR.Code.FilledinError | INT | DEFAULT | '2' | This setting determines the character indicating the filled in error (shaded) checkboxes in LETTER::code.
Kernel.Ocr.OMR.Code.Unfilled | INT | DEFAULT | '0' | This setting determines the character indicating the unfilled checkboxes in LETTER::code.
Kernel.Ocr.OMR.Fill | BOOL | DEFAULT | FALSE | See kRecSetOmrParams.
Kernel.Ocr.OMR.Frame | ENUM (OMR_FRAME) | DEFAULT | FRAME_AUTO | See kRecSetOmrParams.
Kernel.Ocr.OMR.Sense | ENUM (OMR_SENSE) | DEFAULT | SENSE_NORMAL | See kRecSetOmrParams.
Kernel.Ocr.OMR.ZoneCorrection | BOOL | DEFAULT | FALSE | See the Accuracy Issues.

Top of page.

The settings of the RER Recognition Engine Module

These settings are used by the RER Recognition Engine Module during its operations.

This module is supported on: Windows, Linux and MacOS x64.

Name | Type | Flags | Default value | Description
Kernel.Ocr.RER.UseParamFile | STRING | DEFAULT | (empty string) | The recognition module can be fine-tuned through the INI file specified this setting.

Top of page.

Settings of the Character and Code Page Handling Module

These settings are used by the Character and Code Page Handling Module during its operations.

Name | Type | Flags | Default value | Description
Kernel.Chr.CodePage | ENUM | DEFAULT | -1 (auto code page) | See kRecSetCodePage.
Kernel.Chr.CodePage.Default | ENUM | DEFAULT | Windows: code page of the current OS, Linux and MacOS: UTF-8 | This setting specifies the current code page when the value of the above setting Kernel.Chr.CodePage is -1.
Kernel.Chr.DefaultFilter | INT | DEFAULT | FILTER_ALL | See kRecSetDefaultFilter.
Kernel.Chr.FilterPlus | USTRING | DEFAULT | (empty string) | See kRecSetFilterPlus.
Kernel.Chr.LanguagesPlus | USTRING | DEFAULT | (empty string) | See kRecSetLanguagesPlus.
Kernel.Chr.Missing | INT | DEFAULT | '^' (0x005E) | See kRecSetMissingSymbol.
Kernel.Chr.Rejected | INT | DEFAULT | '~' (0x007E) | See kRecSetRejectionSymbol.
Kernel.Languages | SET (LANGUAGES) | DEFAULT | LANG_ENG | See kRecSetLanguages.
Kernel.OcrMgr.DetectSingleLanguage | BOOL | DEFAULT | FALSE | See kRecSetSingleLanguageDetection.

Top of page.

The settings of the Spell Checking Module

These settings are used by the Spell Checking Module during its operations.

Name | Type | Flags | Default value | Description
Kernel.OcrMgr.Spell.CorrectionEnabled | BOOL | DEFAULT | TRUE | Retained only for compatibility.
Kernel.OcrMgr.Spell.SpellEnabled | BOOL | DEFAULT | TRUE | See kRecSetSpell.
Kernel.OcrMgr.Spell.SpellLang | ENUM (LANGUAGES) | DEFAULT | LANG_AUTO | See kRecSetSpellLanguage.
Kernel.OcrMgr.Spell.UserDictionary.FileName | STRING | DEFAULT | (empty string) | See kRecSetUserDictionary.
Kernel.OcrMgr.Spell.VerticalDictionaries | STRING | DEFAULT | (empty string) | See kRecSetVerticalDictionaries.

Top of page.

Settings of the Direct TXT Module

These settings are used by the Direct TXT Module during its operations. The first table below contains the settings used by at least two DTXT output converters. The detailed description of the module contains setting lists for each converter.

Name | Type | Flags | Default value | Description
Kernel.DTxt.DirectTxtFormat | ENUM (DTXTOUTPUTFORMATS) | DEFAULT | DTXT_TXTS | See kRecSetDTXTFormat.
Kernel.DTxt.IncludeSinglePageBreak | BOOL | DEFAULT | FALSE | This is only for backward compatibility. If the value of this setting is TRUE and the output is a single page text document, DTXT puts a page break (determined by the setting Kernel.DTxt.PageBreak) at the end of the file.
Kernel.DTxt.IntelByteOrder | BOOL | DEFAULT | TRUE | Bigendian or Littleendian
Kernel.DTxt.PageBreak | USTRING | DEFAULT | \f | This is the string that separates pages.
Kernel.DTxt.txt.LineBreak | USTRING | DEFAULT | \r\n | This is a unicode string setting the end-of-line mark.
Kernel.DTxt.UnicodeFileHeader | USTRING | DEFAULT | \xFEFF | This is the file header for a Unicode text file, it identifies the Unicode Text file.

Top of page.

Settings of the DTXT Simple Text converter

This table contains the settings used only by DTXT Simple Text (DTXT_TXTS). There are some settings that are shared for more than one DTXT converter. They are documented in a common table above. See also the complete list of settings used by DTXT Simple Text converter.

Name | Type | Flags | Default value | Description
Kernel.DTxt.txt.BeginCell | USTRING | DEFAULT | (empty string) | This is a unicode string setting the prefix for each cell.
Kernel.DTxt.txt.CellLineBreak | USTRING | DEFAULT | \v | This is a unicode string setting the end-of-line mark inside a cell.
Kernel.DTxt.txt.CellSeparator | USTRING | DEFAULT | \t | This is a unicode string setting the separator string between cells.
Kernel.DTxt.txt.EndCell | USTRING | DEFAULT | (empty string) | This is a unicode string setting the postfix for each cell.
Kernel.DTxt.txt.IgnoreSpaceAtEOL | BOOL | DEFAULT | FALSE | Ignore white spaces at end of line.
Kernel.DTxt.txt.ZoneSeparator | USTRING | DEFAULT | (empty string) | This is a unicode string setting the separator string between zones.

Top of page.

Settings of the DTXT CSV converter

This table contains the settings used only by DTXT CSV converter (DTXT_TXTCSV). There are some settings that are shared for more than one DTXT converter. They are documented in a common table above. See also the complete list of settings used by DTXT CSV converter.

Name | Type | Flags | Default value | Description
Kernel.DTxt.csv.BeginField | USTRING | DEFAULT | " </TD> <TD> This is the prefix for each data field. </TD></TR> <TR><TD>Kernel.DTxt.csv.EndField </TD> <TD> USTRING </TD><TD> DEFAULT </TD><TD> " | This is the postfix for each data field.
Kernel.DTxt.csv.EndOfCellLineAsFieldSeparator | BOOL | DEFAULT | FALSE | This creates separate field for each line of text in a text cell.
Kernel.DTxt.csv.EndOfLineAsFieldSeparator | BOOL | DEFAULT | FALSE | This creates a separate field for each line of text in a text zone.
Kernel.DTxt.csv.EndOfRecord | USTRING | DEFAULT | \r\n | This is the unicode string that sets the end of record mark.
Kernel.DTxt.csv.FieldSeparator | USTRING | DEFAULT | , | This is a unicode string setting the field separator mark.
Kernel.DTxt.csv.RecordSeparator | ENUM | DEFAULT | 0 | This enum controls what is a record. "Line" (0) means each line is a discrete record, "Zone" (1) means each zone is a discrete record, "Page" (2) means each page is a record

Top of page.

Settings of the DTXT Formatted Text converter

There are some settings that are shared for more than one DTXT converter. They are documented in a common table above. DTXT Formatted Text converter (DTXT_TXTF) uses only such settings. See also the complete list of settings used by DTXT Formatted Text converter.

Top of page.

Settings of the DTXT PDF Image-on-text converter (Searchable PDF)

This table contains the settings used only by DTXT PDF Image-on-text converter (DTXT_IOTPDF) (supported on: Windows, Linux, Embedded Linux, MacOS). There are some settings that are shared for more than one DTXT converter. They are documented in a common table above. See also the complete list of settings used by DTXT PDF Image-on-text converter.

Name | Type | Flags | Default value | Description
Kernel.DTxt.PDF.CompressContentStream | BOOL | DEFAULT | TRUE | the content streams in the output will be compressed.
Kernel.DTxt.PDF.Linearized | BOOL | DEFAULT | FALSE | the output will be also a linearized PDF.
Kernel.DTxt.PDF.SplitMaxPages | INT | DEFAULT | 0 | If this is not 0, DTXT tries to generate output files containing at most the specified number of pages instead of one file. The name of the output files are generated from the User-specified filename using ordinal numbers.
Kernel.DTxt.PDF.SplitMaxSize | INT | DEFAULT | 0 | If this is not 0, DTXT tries to generate output files having their size lower than the specified bytes instead of generating one file. The name of the output files are generated from the User-specified filename using ordinal numbers. In some cases the resulted sizes may be over the specified one depending on the content of the pages.
Kernel.IMF.PDF.Compatibility | ENUM (IMF_PDFCOMPATIBILITY) | DEFAULT | IMF_PDF16 | PDF compatibility.

NOTE: DTXT image-on-text PDF output also provides the different PDF qualities. Selecting it the given quality levels by calling kRecSetCompressionLevel. The image is saved to specific formats, use kRecSetCompressionTradeoff.

Deprecated settings of the DTXT PDF Image-on-text converter (Searchable PDF DTXT_PDF_IOT)

Name | Type | Flags | Default value | Description
Kernel.DTxt.PDF.BWFormat | ENUM | DEFAULT | 3 (JBIG2) | Specifies the compression used in PDF output for B/W images. 2 for "TIF_G4" or 3 for "JBIG2".
Kernel.DTxt.PDF.BWMaxDPI | INT | DEFAULT | 0 | Maximum allowed DPI for B/W images, 0 means no restriction.
Kernel.DTxt.PDF.BWQuality | ENUM (IMF_IMAGEQUALITY) | DEFAULT | IMF_IMAGEQUALITY_MIN | Specifies the quality of JBIG2 compression used in PDF output. The value IMF_IMAGEQUALITY_GOOD is equivalent to IMF_IMAGEQUALITY_MIN.
Kernel.DTxt.PDF.ColorFormat | ENUM | DEFAULT | 1 (JPG2000) | Specifies the compression used in PDF output for 24-bit color images. 0 for "JPEG" or 1 for "JPG2000".
Kernel.DTxt.PDF.ColorMaxDPI | INT | DEFAULT | 0 | Maximum allowed DPI for color images, 0 means no restriction.
Kernel.DTxt.PDF.ColorQuality | ENUM (IMF_IMAGEQUALITY) | DEFAULT | IMF_IMAGEQUALITY_MIN | Specifies the quality of JPEG and JPEG2000 compression used in PDF output.
Kernel.DTxt.PDF.CompressContentStream | BOOL | DEFAULT | TRUE | the content streams in the output will be compressed.
Kernel.DTxt.PDF.Linearized | BOOL | DEFAULT | FALSE | the output will be also a linearized PDF.
Kernel.DTxt.PDF.PDFA | BOOL | DEFAULT | FALSE | Deprecated. Use Kernel.IMF.PDF.Compatibility instead.
Kernel.DTxt.PDF.SplitMaxPages | INT | DEFAULT | 0 | If this is not 0, DTXT tries to generate output files containing at most the specified number of pages instead of one file. The name of the output files are generated from the User-specified filename using ordinal numbers.
Kernel.DTxt.PDF.SplitMaxSize | INT | DEFAULT | 0 | If this is not 0, DTXT tries to generate output files having their size lower than the specified bytes instead of generating one file. The name of the output files are generated from the User-specified filename using ordinal numbers. In some cases the resulted sizes may be over the specified one depending on the content of the pages.
Kernel.IMF.PDF.Compatibility | ENUM (IMF_PDFCOMPATIBILITY) | DEFAULT | IMF_PDF16 | PDF compatibility.

Top of page.

Settings of the DTXT XML converter

This table contains the settings used only by DTXT XML converter (DTXT_XMLCOORD). There are some settings that are shared for more than one DTXT converter. They are documented in a common table above. See also the complete list of settings used by DTXT XML converter.

Name | Type | Flags | Default value | Description
Kernel.DTxt.txt.Author | USTRING | DEFAULT | (empty string) | Use this setting to specify Author. Available in XSD XML output only.
Kernel.DTxt.txt.Comment | USTRING | DEFAULT | (empty string) | Use this setting to specify Comment. Available in XSD XML output only.
Kernel.DTxt.txt.Company | USTRING | DEFAULT | (empty string) | Use this setting to specify Company. Available in XSD XML output only.
Kernel.DTxt.txt.SchemaLocation | USTRING | DEFAULT | (empty string) | Use this setting to insert a schema location into the XML file. Available in XSD XML output only.
Kernel.DTxt.txt.Subject | USTRING | DEFAULT | (empty string) | Use this setting to specify Subject. Available in XSD XML output only.
Kernel.DTxt.txt.Title | USTRING | DEFAULT | (empty string) | Use this setting to specify Title. Available in XSD XML output only.
Kernel.DTxt.xml.InsertCharacters INT BITFIELD 0 The meaning of bits:
  • 0x00000001: the XML converter writes nodes for each letter.
  • 0x00000002: it writes LETTER::makeup, 'mu' nodes.
  • 0x00000004: it writes LETTER::info, 'li' nodes.
These bits can be combined.
Kernel.DTxt.xml.XSD | BOOL | DEFAULT | TRUE | This is a boolean setting used to switch between the old (XDR) and new (XSD) schema.

Top of page.

Settings of the DTXT Binary converter

There are some settings that are shared for more than one DTXT converter. They are documented in a common table above. DTXT Binary converter (DTXT_BINARY) uses only such settings. See also the complete list of settings used by DTXT Binary converter.

Top of page.

Settings of the DTXT ALTO converter

This table contains the settings used only by the DTXT ALTO converter (DTXT_ALTO). See also the complete list of settings used by the DTXT XML converter.

Name | Type | Flags | Default value | Description
Kernel.DTxt.ALTO.IgnoreSpaceAtEOL | BOOL | DEFAULT | FALSE | Tells whether write any ALTO SP element at the end of lines.
Kernel.DTxt.ALTO.Version | INT | DEFAULT | 40 | Must be either 40 (ALTO version 4.0) or 20 (ALTO version 2.0). Providing any other values results in an API_STS_ERR error at calling the converter.
Kernel.DTxt.ALTO.InsertCharacters | BOOL | DEFAULT | TRUE | Tells whether to write letters as ALTO Glyph elements. The Kernel value has to be 40, or calling the converter results in an API_STS_ERR error.

Top of page.

Settings of the RecAPIPlus

This API level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.

Settings of Simple Multipage Document Handling

These settings are used by the Simple Multipage Document Handling module during its operations.

This module is supported on: Windows, Linux, Embedded Linux, MacOS.

Name | Type | Flags | Default value | Description
APIPlus.ConvertTimeout | INT | DEFAULT | INFINITE | This is the timeout setting of the output conversion step both in simple workflows and in one step functions. It is useful when a longer conversion time is predictable (e.g. higher number of pages, etc.).
APIPlus.FreehPageAfterInsert | BOOL | DEFAULT | TRUE | If this setting is FALSE, the HPAGE is not deleted during RecInsertPage and RecUpdatePage. In this case there is no connection between the HPAGE and the HDOC after the functions return, i.e. modifications on either do not affect on the other. In addition the HPAGE should be freed manually.

Top of page.

Settings of the One Step Functions

These settings are used by the One Step Functions module during its operations.

This module is supported on: Windows, Linux, Embedded Linux, MacOS.

Name | Type | Flags | Default value | Description
APIPlus.ConvertTimeout | INT | DEFAULT | INFINITE | This is the timeout setting of the output conversion step both in simple workflows and in one step functions. It is useful when a longer conversion time is predictable (e.g. higher number of pages, etc.).
APIPlus.ProcessPagesEx.DetectOpenBook | BOOL | DEFAULT | FALSE | This sets whether RecProcessPagesEx should detect book pages during image loading or not.
APIPlus.ProcessPagesEx.NewDocAtBlankPage | BOOL | DEFAULT | FALSE | This sets whether RecProcessPagesEx should create a new document at processing a blank page or not.
APIPlus.ProcessPagesEx.NewDocForEachImg | BOOL | DEFAULT | FALSE | This sets whether RecProcessPagesEx should create a new document for each input image or not.
Kernel.RPP.RecThreadCount (supported on: Windows, Linux) | INT | DEFAULT | -1 | This determines the maximum number of recognition threads started by kRecProcessPagesEx and RecProcessPagesEx. In case of -1 (also 0) the maximum number of threads is equal to the number of virtual CPU's (including hyper threads). 8 is a current maximum number of OCR engine instances that can run parallel. It could be less depending on the actual distributed runtime file set. Check the number of xocr*, mor*, FireWrx*, etc. files. This setting is useful if the application wants to limit the cpu load. See RecSetOCRThreadCount.

Top of page.

Settings of the Layout Retention Output

These settings are used by the Layout Retention Output module during its operations.

This module is supported on: Windows, Linux, Embedded Linux, MacOS.

Name | Type | Flags | Default value | Description
APIPlus.Output.Append | BOOL | DEFAULT | TRUE | This determines whether RecConvert2Doc appends or overwrites the output file if that has already exists.
APIPlus.Output.OutputLevel | ENUM (OUTPUTLEVEL) | DEFAULT | OL_AUTO | Level of the Layout Retention. See also RecSetOutputLevel.
APIPlus.Output.TextFormat | USTRING | DEFAULT | Converters.Text.RTF2000 | Name of the output text format (name of the converter, see converter settings). See RecSetOutputFormat.

Top of page.

Settings of the Formatter

This module is supported on: Windows, Linux, Embedded Linux, MacOS.

Name | Type | Flags | Default value | Description
Formatter.df.mode | INT | DEFAULT | DFM_Lite | Document formatter mode. See DocFormatter_Mode.
Formatter.df.headerFooter.filter | USTRING | DEFAULT | ^Appendix | Exclude headers and footers matching this regular expression (regex), preserving them as normal text. This regex conforms to Perl 4.
Formatter.df.headerFooter.filterCaseSensitive | BOOL | DEFAULT | FALSE | Specifies whether the regex filter is case sensitive. False means it is case insensitive (default).
Formatter.df.headerFooter.lineNumbers | BOOL | DEFAULT | FALSE | Specifies whether the legal pleading numbers (recognized via Kernel.LegalPleading = true) should appear in the header section of the output. When it is true, also apply the following settings: DFM_HeaderFooter flag in Formatter.df.mode, Converters.Text.*.RetainLineNumberingZones = true, Converters.Text.*.ConsolidatePages = true, Converters.Text.*.HeadersFooters = R2_HR_BOXES. Supported: DOCX and RTF2000 output.
Formatter.pf.characterStyle | BOOL | DEFAULT | TRUE | Deprecated.
Formatter.pf.crossrefFind | BOOL | DEFAULT | TRUE | When it is FALSE page formatter does not search for hyperlinks or footnotes.
Formatter.pf.findBullets | BOOL | DEFAULT | TRUE | When it is FALSE page formatter does not search for bulleted paragraphs.
Formatter.pf.paragraphStyle | BOOL | DEFAULT | TRUE | Deprecated.
Formatter.pf.rod.keepZoneOrder | BOOL | DEFAULT | FALSE | When it is set, the page formatting process of the output conversion does not modify the original order of the zones.

Top of page.

Settings of the converters

The converter settings of the RecAPI.


RecAPI: List of all the Converter settings of RecAPI

  • List of all the RecAPI settings
List of all the Converter settings of RecAPI

The output converters are parts of RecAPIPlus and not supported on all platforms. See the below list about platform information. On not supported platforms or when using only the KernelAPI level, please use Direct TXT Output Converter Module instead of these converters.

The other settings of RecAPI.

The converters have many different settings. In the previous version of CSDK, you were able to use structures to set them. The current method is to modify these settings through Settings Manager Module. The name of the converter settings consists of four pieces: Converters.Text. CONVERTERNAME . SHORT_SETTINGNAME, where CONVERTERNAME is a dotless identifier, but the SHORT_SETTINGNAME can contain dots indicating additional layers of the setting tree (see Settings Manager Module).

IMPORTANT! The settings of a given converter are created when that converter is selected for the first time (RecSetOutputFormat). Thus before this these settings cannot be accessed.

In this page you can see the settings from two points of view.

First, you can see all the converters. From these links, you can navigate to detailed tables about which settings belong to the given converter. In the detailed tables you can see the full name, the type and the default value of the settings.

Preceding the detailed tables there is a summary of all the settings for every converter, in alphabetical order. The columns are: SHORT_SETTINGNAME, TYPE and DESCRIPTION. In this summary, the enum type settings are described in a distinct way: the row of each setting contains (in column order) the SHORT_SETTINGNAME, the word 'ENUM' and the name of the enum type. In addition, some rows below the setting contain all the possible values for this enum type with a brief description.

For example, let's see the 'Pictures' setting, which can be seen in the summary as follows:

Pictures | ENUM | R2_PICTURES_DPI
 | R2_DPI_NONE | None
 | R2_DPI_ORIGINAL | Original
 | R2_DPI_72 | DPI72
 | R2_DPI_100 | DPI100
 | R2_DPI_150 | DPI150
 | R2_DPI_200 | DPI200
 | R2_DPI_300 | DPI300

The name of the enum type is R2_PICTURES_DPI. You can see the possible values. You can find this setting in several converters: eBook, RTF and Doc converters, WordPad, WordPerfect converters, PDF converters, Microsoft Reader, PowerPoint97, Publisher98. Similarly to Pictures, a lot of settings can be found in more than one converter. In such a case, the same setting may have different default values in different converters, thus the same setting may appear in more that one of the detailed tables.

Settings of the converters

Depending on the output level (Formatted text, TruePage, FlowingPage, ...) some of these settings are disabled and become automatically true or false forcibly. For the details of possible combinations in the given output level please open the Convert / Save As / Advanced dialog box in the ITest application and browse all the options whilst changing the output level.

  • MP3 Audio converter supported on: Windows 32-bit
  • ePub converters supported on: Windows, Linux, MacOS
  • Kindle Document converter supported on: Windows
  • Excel 2000 and XLSX converters supported on: Windows, Linux, Embedded Linux, MacOS
  • HTML3.2 converter supported on: Windows, Linux, Embedded Linux, MacOS
  • HTML 4.0 and 5.0 converters supported on: Windows, Linux, Embedded Linux, MacOS
  • HTML 5.0 Essay converter supported on: Windows, Linux, Embedded Linux, MacOS
  • PDF converters supported on: Windows, Linux, MacOS
    • PDF converter
    • PDF Edited converter
    • PDF Image On Text converter
    • PDF ImageSubst converter
  • RTF and DOC converters supported on: Windows, Linux, Embedded Linux, MacOS
  • RTF and DOCX Essay converters supported on: Windows, Linux, Embedded Linux, MacOS
  • "Pages converter" supported on: Windows, Linux, Embedded Linux, MacOS
  • Text converters supported on: Windows, Linux, Embedded Linux, MacOS
    • CSV Comma Delimited converter
    • Unicode CSV Text converter
    • Formatted Text converter
    • Unicode Formatted Text converter
    • Simple Text converter
    • Text With Linebreaks converter
    • Unicode Text converter
    • Unicode Text With Linebreaks converter
  • PowerPoint converters supported on: Windows
  • Publisher98 converter supported on: Windows
  • WordPad converter supported on: Windows
  • WordPerfect10 converter supported on: Windows
  • XML converter supported on: Windows, Linux, MacOS
  • XPS and Searchable XPS converters supported on: Windows
    • XPS converter
    • Searchable XPS converter

Summary of converter settings

The table below lists all the converter settings in alphabetical order of their short name.

SHORT_SETTINGNAME | TYPE | DESCRIPTION
AdditionalFonts | BOOL | Enable external fonts
Append | BOOL | In case of existing output file, it determines if the output should be appended or not.
AppendFrom | USTRING | Append the output to this file
AppendFromPassword | USTRING | Password for the original file
BeginCell | USTRING | String to be inserted into the output text signing the begin of a cell.
BeginParagraph | USTRING | String to be inserted into the output text signing the begin of a paragraph.
BeginTable | USTRING | String to be inserted into the output text signing the begin of a table.
BeginTableLine | USTRING | String to be inserted into the output text signing the begin of a table line.
Bullets | BOOL | Keep the bullets of the document or not.
CharColors | BOOL | Keep the colors of the characters or not.
CharScaling | BOOL | Keep character scaling or not.
CharSpacing | BOOL | Keep the character spacing or not.
CodePage | ENUM | This is not a real enum type, thus the below ID's can appear only in the setting files (see Setting Module) and in the result of kRecSettingGetSymbolic. With the function kRecSettingSetInt only the parenthesized numbers can be used.
CP_NO (0)
CP_UNICODE (1) | 16 bit Multilingual
CP_WORDPERFECT (2) | 16 bit Multilingual
CP_UTF8 (3) | 16 bit Multilingual
CP_437 (437) | United States IBM
CP_708 (708) | Arabic (ASMO 708)
CP_709 (709) | Arabic (ASMO 449+, BCON V4)
CP_710 (710) | Arabic (transparent Arabic)
CP_711 (711) | Arabic (Nafitha Enhanced)
CP_720 (720) | Arabic (transparent ASMO)
CP_819 (819) | Windows 3.1 (United States and Western Europe)
CP_850 (850) | IBM multilingual
CP_852 (852) | Eastern European
CP_860 (860) | Portuguese
CP_862 (862) | Hebrew
CP_863 (863) | French Canadian
CP_864 (864) | Arabic
CP_865 (865) | Norwegian
CP_866 (866) | Russian
CP_932 (932) | Japanese
CP_1250 (1250) | Windows 3.1 (Eastern European)
CP_1251 (1251) | Windows 3.1 (Cyrillic)
CP_1252 (1252) | Windows ANSI 1252
CP_1253 (1253) | 1253 Code Page
CP_1254 (1254) | 1254 Code Page
CP_1257 (1257) | 1257 Code Page
CP_DEFAULT (5000) | means the code page set by kRecSetCodePage
CP_ROMAN_8 (5001) | Roman 8, For HP printers
CP_GREEK_ELOT (5002) | DOS Greek
CP_GREEK_MEMOTEK (5003) | DOS Greek
CP_MAC (5004) | MAC Western
CP_MAC_INSO_LATIN_2 (5005) | Mac INSO Latin 2, MAC CE
CP_MAC_CENTRAL_EU (5006) | Mac Central EU, PT 202
CP_MAC_PRIMUS_CE (5007) | Mac Primus CEu, MAC CE
CP_WIN_ESPERANT (5008) | Windows Esperant
CP_HUN_CWI (5009) | CWI Magyar, DOS Hungarian
CP_HUN_VENTURA (5010) | Magyar Ventura, DOS Hungarian
CP_IVKAM_C_S (5011) | IVKAM C-S, Czech & Slovakian
CP_MAZOWIA_POLISH (5012) | Mazowia Polish, DOS Polish
CP_SLOVEN_CROAT (5013) | Sloven & Croat
CP_TURKISH (5014) | Turkish
CP_ICELANDIC (5015) | DOS Icelandic
CP_MALTESE (5016) | DOS Maltese
CP_WINDOWS_OCR_MICR (5017) | Windows OCR/MICR, Non Standard Windows 3.1
CP_BIG5 (5018) | Traditional Chinese (supports ETen extension and HKscs non-standard mode)
CP_EUC_CN (5019) | Simplified Chinese
CP_EUC_JP (5020) | Japanese
CP_TW (5021) | Traditional Chinese
CP_GB18030 (5022) | Simplified Chinese
CP_GBK (5023) | Simplified Chinese
CP_HKSCS_2004 (5024) | Traditional Chinese (HKscs standard mode, supports ETen extension
CP_SHIFT_JIS (5025) | Japanese
CP_UHC (5026) | Korean (extended EUC-KR)
CP_AUTO (5999)

Automatic Codepage by the LogDoc

ColorQuality | ENUM | TColorQValues
R2ID_PDFCOLORQUALITY_MIN | min
R2ID_PDFCOLORQUALITY_GOOD | good
R2ID_PDFCOLORQUALITY_LOSLESS | lossless
ColumnBreaks | BOOL | Insert column breaks or not.
Compatibility | ENUM | This setting uses the value of the enum type TPDFCompatibTypeValues (the parenthesized values below), which can be used with kRecSettingSetInt. The symbolic values coming from kRecSettingGetSymbolic or residing in setting files are the strings preceding parentheses.
Optimize for Size (R2ID_FORCESIZE) | Optimize for Size
Optimize for Quality (R2ID_FORCEQUALITY) | Optimize for Quality
PDF 2.0 (R2ID_PDF20) | PDF 2.0
PDF 1.7 (R2ID_PDF17) | PDF 1.7
PDF 1.6 (R2ID_PDF16) | PDF 1.6
PDF 1.5 (R2ID_PDF15) | PDF 1.5
PDF 1.4 (R2ID_PDF14) | PDF 1.4
PDF 1.3 (R2ID_PDF13) | PDF 1.3
PDF 1.2 (R2ID_PDF12) | PDF 1.2
PDF 1.1 (R2ID_PDF11) | PDF 1.1
PDF 1.0 (R2ID_PDF10) | PDF 1.0
PDF-A (R2ID_PDFA or R2ID_PDFA1B) | PDF/A-1b compliant output (deprecated version of PDF/A-1b string-name is used because of backward compatibility!)
PDF/A-2b (R2ID_PDFA2B) | PDF/A-2b compliant output
PDF/A-3b (R2ID_PDFA3B) | PDF/A-3b compliant output
PDF/A-2u (R2ID_PDFA2U) | PDF/A-2u compliant output
PDF/A-3u (R2ID_PDFA3U) | PDF/A-3u compliant output
PDF/A-1a (R2ID_PDFA1A) | PDF/A-1a compliant output
PDF/A-2a (R2ID_PDFA2A) | PDF/A-2a compliant output
PDF/A-3a (R2ID_PDFA3A) | PDF/A-3a compliant output
PDF/A-4 (R2ID_PDFA4) | PDF/A-4 compliant output
PDF/A-4e (R2ID_PDFA4E) | PDF/A-4e compliant output
PDF/A-4f (R2ID_PDFA4F) | PDF/A-4f compliant output
PDF/UA-1 (R2ID_PDFUA1) | PDF/UA-1 compliant output
PDF/UA-2 (R2ID_PDFUA2)

PDF/UA-2 compliant output

Compression.CompForContents | BOOL | Use compression for Text and Line Art
Compression.CompForTTF | BOOL | Use compression for Embedded Files
Compression.UseFlate | BOOL | If this is TRUE, CSDK uses Flate compression for content stream, otherwise it creates uncompressed stream.
Compression.UseJBIG2 | BOOL | If this is TRUE, CSDK uses JBIG2 compression for B/W images, otherwise it uses TIFF G4. JBIG2 can be used in PDF v1.5 and higher.
Compression.UseJPEG2000 | BOOL | If this is TRUE, CSDK uses JPEG2000 compression for color and grayscale images, otherwise it uses JPEG. JPEG2000 can be used in PDF v1.5 and higher.
Compression.UseLZWInsteadOfFlate | BOOL | If this is TRUE and UseFlate is FALSE, CSDK uses LZW compression for content stream. If UseFlate is TRUE, this setting has no effect.
ConsolidatePages | BOOL | Consolidate pages or not.
ConvertTabs | BOOL | Convert tabulators into spaces or not.
Crossrefs | BOOL | Retain crossreferences or not.
DocAuthor | USTRING | Author of the document.
DocCategory | USTRING | Category of the document.
DocComments | USTRING | Comments of the document.
DocCompany | USTRING | Company name of the document.
DocCreator | USTRING | Creator of the PDF document. If it's empty, Kernel.Imf.PDF.Creator is used.
DocKeywords | USTRING | Keywords of the document.
DocManager | USTRING | Manager name of the document.
DocProducer | USTRING | Producer of the PDF document. If it's empty, Kernel.Imf.PDF.Producer is used.
DocSubject | USTRING | Subject of the document.
DocTitle | USTRING | Title of the document.
DropCaps | BOOL | Retain dropcaps or not.
EnableMetaData | BOOL | Enable use/generation of XMP-metadata or not.
CustomMetaData | USTRING | String to be used as custom XMP-metadata - should be a self-contained XMP-subtree.
EnableBWImageAsMask | BOOL | Enable black-mask-only display-mode for BW-images (instead of displaying all pixels of the BW-image).
EndCell | USTRING | String to be inserted into the output text signing the end of a cell.
EndParagraph | USTRING | String to be inserted into the output text signing the end of a paragraph.
EndTable | USTRING | String to be inserted into the output text signing the end of a table.
EndTableLine | USTRING | String to be inserted into the output text signing the end of a table line.
FieldCodes | BOOL | Retain fieldcodes or not.
HeadersFooters | ENUM | R2_HEADERS_RETENTION
R2_HR_NONE | Do not export headers and footers at all.
R2_HR_AUTO | Automatically select the most suitable headers-footers format from the options below, based on the output format and formatting level.
R2_HR_BOXES | Export the text of headers and footers into multiple boxes into the headers-footers area for precise positioning.
R2_HR_TABBEDBOX | Export each header and footer into one box in the headers-footers area, aligning their parts with tabulators.
R2_HR_TABBED | Export headers and footers as tabulator aligned text into the headers-footers area of the document.
R2_HR_CONVERT

Convert headers and footers into normal (non-header) text. This can also result textboxes in some cases.

HRBetweenSections | BOOL | Put Horizontal Ruleline between Sections
IndexPage | ENUM | TWriteIndex
HWI_NO | No index page is created.
HWI_SMPLE | A simple HTML page is created with links to the pages.
HWI_FRAME

A two-frame HTML page is created. The links of the one frame open each page in the other frame.

InsertCharacterCoordinates | BOOL | Insert Character coordinates or not.
IntelUnicodeByteOrder | BOOL | This switches between big-endian and little-endian.
Linearized | BOOL | If this setting is true, the generated PDF will be a linearized PDF.
LineBreak | USTRING | This unicode string setting is the end of line mark (Default Value: "\r\n")
LineBreaks | BOOL | Insert Linebreaks or not.
ListSeparator | USTRING | This separates the cells in the case of CSV.
NavNextText | STRING | If you switched on the Indexpage generating setting by Simple or InFrame, you can change the text of the Next navigation text.
NavPrevText | STRING | If you switched on the Indexpage generating setting by Simple or InFrame, you can change the text of the Prev navigation text.
NavTOCText | STRING | If you switched on the Indexpage generating setting by Simple or InFrame, you can change the text of the Index navigation text.
NeedTaggedInfo | BOOL | Create tagged PDF
OutlineProps.Outline | BOOL | Bookmarks for pages
OutlineProps.OutlineNumbering | BOOL | Add page numbers to the page name
OutlineProps.OutlinePageName | USTRING | Page name in bookmark
OutputMode ENUM

This setting specifies the output level to be used by the given converter when the value of the setting APIPlus.Output.OutputLevel is OL_AUTO. The symbolic values (kRecSettingGetSymbolic) of this setting can be the followings:

  • IgnoreAll for OL_NOFORMAT
  • RFP for OL_RFP
  • TruePage for OL_TRUEPAGE
  • FlowingPage for OL_FLOWINGPAGE
  • Spreadsheet for OL_SPREADSHEET

See OUTPUTLEVEL
See also RecSetOutputLevel function

OverviewSheetName | STRING | The name of the last sheet. In RFP mode every table will be in a separate sheet, and every other text and image will be on the last Overview Sheet.
PageBreak | USTRING | The string that separates the pages (Default Value: "\f")
PageBreaks BOOL or ENUM

This specifies whether the converter inserts page breaks or not at the positions where the original document has. In fact, our RTF and DOC converters generally insert "Section Break (Next Page)" instead of page break.

There are some converters, in which the type of this setting is BOOL, in other ones this is R2_PAGEBREAKS. See the detailed table of each converter below.

Different output levels do not support all the possible values.

  • OL_RFP: R2_PB_NEVER, R2_PB_ALWAYS
  • OL_FLOWINGPAGE: R2_PB_ALWAYS, R2_PB_AUTO
  • OL_TRUEPAGE: R2_PB_ALWAYS
  • OL_NOFORMAT: R2_PB_NEVER
R2_PB_NEVER | Never inserts page break.
R2_PB_ALWAYS | Always inserts page break at the position where the original document has.
R2_PB_AUTO

Decides according to the output format.

PageColor | BOOL | Retain page BACKGROUND color or use default.
PageMargins | BOOL | Retain page margins or use default.
PaperSize | BOOL | Enforces a given paper size: see Width and Height below. Supported only in OL_RFP, OL_FLOWINGPAGE, and OL_TRUEPAGE output modes.
PaperSize.Width | INT | The enforced paper width in twips. Effective only when PaperSize is set to true.
PaperSize.Height | INT | The enforced paper height in twips. Effective only when PaperSize is set to true.
PaperSize.FitToContent | BOOL | It reverts the paper size to the original input size when the content cannot fit the forced paper size. Effective only when PaperSize is set to true.
LimitPaperSize | BOOL | Introduced in CSDK 22.3. Limits the paper size width and height to 22 inches in case of docx / rtf, and 56 inches in case of pptx format. User might set it to false in case wants the ability to open with other software not having Microsoft Word's and PowerPoint's self introcued software limitations, e.g. LibreOffice. Until CSDK 22.2, IMAGE_SIZE_ERR has been returned automatically, refusing to write such an output document that exceeds 22 inches width or height in OL_FLOWINGPAGE or OL_TRUEPAGE, regardless of the output format.
ParAlignment | BOOL | Retain paragraph's alignment or not
ParFirstLIndent | BOOL | Retain paragraph's firstline indent or not
ParIndent | BOOL | Retain paragraph's left/right indent or not
ParLinespacing | BOOL | Retain paragraph's linespacing or not
ParAlignment | BOOL | Retain paragraph's before/after spacing or not
PDFForms | BOOL | Show form layer
PDFFormVisuality | BOOL | Show form visual components
PDFSecurity.EnableAdd | BOOL | Enable change or edit comments and form fields
PDFSecurity.EnableAssemble | BOOL | Enable doc assemble
PDFSecurity.EnableCopy | BOOL | Enable copy & extract
PDFSecurity.EnableExtract | BOOL | Enable extract text and graphic
PDFSecurity.EnableForms | BOOL | Enable fill forms
PDFSecurity.EnableModify | BOOL | Enable changing the document
PDFSecurity.EnablePrint | BOOL | Enable printing
PDFSecurity.EnablePrintQ | BOOL | Enable high print quality
PDFSecurity.EncryptMetaData | BOOL | Encrypt meta-data
PDFSecurity.OwnerPassword | USTRING | Owner Password
PDFSecurity.Type | ENUM | TPDFSecurityValues
R2ID_PDFSECURITYNONE | None
R2ID_PDFSECURITY40BITS | 40 bit RC4
R2ID_PDFSECURITY128BITS | 128 bit RC4
R2ID_PDFSECURITYAES | 128 bit AES
R2ID_PDFSECURITYAES256

256 bit AES

PDFSecurity.UserPassword | USTRING | User Password
PDFThumbnail | BOOL | Create Thumbnail images
PictureColor | ENUM | R2_PICTURES_BPP
R2_BPP_ORIGINAL | Original
R2_BPP_BLACKANDWHITE | BlackAndWhite
R2_BPP_GRAYSCALE | Grayscale
R2_BPP_24BPP

BPP24

Pictures | ENUM | R2_PICTURES_DPI
R2_DPI_NONE | None
R2_DPI_ORIGINAL | Original
R2_DPI_72 | DPI72
R2_DPI_100 | DPI100
R2_DPI_150 | DPI150
R2_DPI_200 | DPI200
R2_DPI_300

DPI300

ProcessingMode.PDFForms | BOOL | Show form layer
ProcessingMode.ShowBackgroundImage | BOOL | Show background image layer
ProcessingMode.ShowText | BOOL | Show text layer
PutItSubdirectory | BOOL | If it is true, put every file ( e.g. pages, pictures, css files) into a subdirectory
RetainLineNumberingZones | BOOL | In the case of legal document recognition, it specifies whether the line numbering zones are to be saved into the output document or not.
RuleLines | BOOL | Retain RuleLines or not.
SchemaLocation | USTRING | The URL of the schema that was written into the xml.
SheetNamePrefix | STRING | The sheet names are generated. SheetNamePrefix + 1,2,3,... E.g. SheetNamePrefix = 'page' Sheet names: Page1, Page2, ...
ShowSubstitutes | BOOL | Cover suspect words with small images
Signature.CertificateDescription | USTRING | Certificate Description
Signature.CertificateSHA1 | STRING | Certificate SHA1 thumbprint
Signature.SignatureType | ENUM | TSignatureTypevalues
R2ID_SIGTYPENONE | None
R2ID_SIGTYPEPPKLITE | PPKLite
R2ID_SIGTYPEVERISIGN

VeriSign

SplitMaxPages | INT | If this is not 0, the converter tries to generate output files containing at most the specified number of pages instead of one file. The name of the output files are generated from the User-specified filename using ordinal numbers. For some output types the real number of pages may be greater by 1 depending on the content of the file.
SplitMaxSize | INT | If this is not 0, the converter tries to generate output files having their size lower than the specified bytes instead of generating one file. The name of the output files are generated from the User-specified filename using ordinal numbers. In some cases the resulted sizes may be over the specified one depending on the content of the pages.
Styles | BOOL | Retain styles or not.
Tables | ENUM | R2_TABLES_RETENTION
R2_TR_NONE | No Tables
R2_TR_RETAIN | RetainTables
R2_TR_TO_TABBED | ConvertToSeparatedByTabs
R2_TR_TO_SPACES

ConvertToSeparatedBySpaces

Tabs | BOOL | Retain original tab positions or use defaults.
Title | USTRING | This is an arbitrary unicode string that can be used freely by Users. All the converters have such a setting. This setting is accessible without calling RecSetOutputFormat (see the note IMPORTANT! at the top of this topic).
URLProps.URLBackground INT You can set the Background color of the URL.
See REC_COLOR
URLProps.URLBackgroundDef | BOOL | Use default background color for the URLs.
URLProps.URLForeground INT You can set the Foreground color of the URL.
See REC_COLOR
URLProps.URLForegroundDef | BOOL | Use default foreground color for the URLs.
URLProps.URLHighlight | BOOL | Highlight URLs
URLProps.URLUnderline | BOOL | Underline URLs
UseMRC | ENUM | TMRCTypeValues
R2ID_PDFMRC_NO | Do not use MRC
R2ID_PDFMRC_MIN | Deprecated. MRC with minimal size and lowest quality
R2ID_PDFMRC_GOOD | Deprecated. MRC with medium size and good quality
R2ID_PDFMRC_LOSLESS | Deprecated. MRC with large size and best quality
R2ID_PDFMRC

Can be used with 5 different predefined levels (1-5) by calling kRecSetCompressionLevel. See Saving MRC PDF files in KernelAPI about the new MRC compression for more details. The level settings are the same for Converters.

UseOSListSeparator | BOOL | Use List Separator or not.
UseXsdSchema | BOOL | Use Xsd schema or not.
Voice name | STRING | The name of the selected voice.

Top of page.

MP3 Audio converter

This converter is supported on: Windows 32-bit.

NAME | TYPE | DEFAULT VALUE
Converters.Text.Audio.BeginCell | USTRING |
Converters.Text.Audio.BeginParagraph | USTRING |
Converters.Text.Audio.BeginTable | USTRING |
Converters.Text.Audio.BeginTableLine | USTRING |
Converters.Text.Audio.Bullets | BOOL | TRUE
Converters.Text.Audio.DocAuthor | USTRING |
Converters.Text.Audio.DocCategory | USTRING |
Converters.Text.Audio.DocComments | USTRING |
Converters.Text.Audio.DocCompany | USTRING |
Converters.Text.Audio.DocKeywords | USTRING |
Converters.Text.Audio.DocManager | USTRING |
Converters.Text.Audio.DocSubject | USTRING |
Converters.Text.Audio.DocTitle | USTRING |
Converters.Text.Audio.EndCell | USTRING |
Converters.Text.Audio.EndParagraph | USTRING |
Converters.Text.Audio.EndTable | USTRING |
Converters.Text.Audio.EndTableLine | USTRING |
Converters.Text.Audio.HeadersFooters | ENUM | IgnoreHeadersFooters
Converters.Text.Audio.LineBreak | USTRING |
Converters.Text.Audio.LineBreaks | BOOL | FALSE
Converters.Text.Audio.OutputMode | ENUM | IgnoreAll
Converters.Text.Audio.PageBreak | USTRING |
Converters.Text.Audio.PageBreaks | BOOL | FALSE
Converters.Text.Audio.PictureColor | ENUM | Original
Converters.Text.Audio.Pictures | ENUM | None
Converters.Text.Audio.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.Audio.Styles | BOOL | FALSE
Converters.Text.Audio.Tables | ENUM | ConvertToSeparatedByTabs
Converters.Text.Audio.Title | USTRING | Wav Audio
Converters.Text.Audio.Voice name | ENUM |

Top of page.

ePub converters

These converters are supported on: Windows, Linux, MacOS.

The following table contains the settings of ePub, ePub Simple and ePub Poem converters. For getting the exact name of each converter replace '*' to one of the following strings: ePub, ePubSimple, ePubPoem.

NAME | TYPE | DEFAULT VALUE
Converters.Text.*.Bullets | BOOL | TRUE
Converters.Text.*.CodePage | ENUM | Retained only for compatibility. Not used.
Converters.Text.*.Crossrefs | BOOL | TRUE
Converters.Text.*.HeadersFooters | ENUM | R2_HR_CONVERT
Converters.Text.*.Pictures | ENUM | R2_DPI_ORIGINAL
Converters.Text.*.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.*.Tables | ENUM | R2_TR_RETAIN

Top of page.

Kindle Document converter

This converter is supported on: Windows.

NAME | TYPE | DEFAULT VALUE
Converters.Text.Kindle.Bullets | BOOL | TRUE
Converters.Text.Kindle.CharColors | BOOL | TRUE
Converters.Text.Kindle.CharScaling | BOOL | FALSE
Converters.Text.Kindle.CharSpacing | BOOL | FALSE
Converters.Text.Kindle.ColumnBreaks | BOOL | FALSE
Converters.Text.Kindle.Crossrefs | BOOL | TRUE (except for RTF6)
Converters.Text.Kindle.ConsolidatePages | BOOL | FALSE
Converters.Text.Kindle.DocAuthor | USTRING |
Converters.Text.Kindle.DocCategory | USTRING |
Converters.Text.Kindle.DocComments | USTRING |
Converters.Text.Kindle.DocCompany | USTRING |
Converters.Text.Kindle.DocKeywords | USTRING |
Converters.Text.Kindle.DocManager | USTRING |
Converters.Text.Kindle.DocSubject | USTRING |
Converters.Text.Kindle.DocTitle | USTRING |
Converters.Text.Kindle.DropCaps | BOOL | TRUE
Converters.Text.Kindle.FieldCodes | BOOL | FALSE
Converters.Text.Kindle.HeadersFooters | ENUM | IgnoreHeadersFooters
Converters.Text.Kindle.LineBreaks | BOOL | FALSE
Converters.Text.Kindle.OutputMode | ENUM | OL_RFP See OUTPUTLEVEL See also RecSetOutputLevel function
Converters.Text.Kindle.PageBreaks | ENUM | Never
Converters.Text.Kindle.PageColor | BOOL | FALSE
Converters.Text.Kindle.Pictures | ENUM | R2_DPI_72
Converters.Text.Kindle.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.Kindle.RuleLines | BOOL | FALSE
Converters.Text.Kindle.SplitMaxPages | INT | 0
Converters.Text.Kindle.SplitMaxSize | INT | 0
Converters.Text.Kindle.Styles | BOOL | FALSE
Converters.Text.Kindle.Tables | ENUM | R2_TR_RETAIN
Converters.Text.Kindle.Tabs | BOOL | TRUE

Top of page.

Excel 2000 and XLSX converters

The following table contains the settings of the Excel 2000 (supported on: Windows) and XLSX converters (supported on: Windows, Linux, Embedded Linux, MacOS). For getting the exact name of each converter replace '*' to one of the following strings: Excel2000, XLSX.

NAME | TYPE | DEFAULT VALUE
Converters.Text.*.Bullets | BOOL | TRUE
Converters.Text.*.DocAuthor | USTRING |
Converters.Text.*.DocCategory | USTRING |
Converters.Text.*.DocComments | USTRING |
Converters.Text.*.DocCompany | USTRING |
Converters.Text.*.DocKeywords | USTRING |
Converters.Text.*.DocManager | USTRING |
Converters.Text.*.DocSubject | USTRING |
Converters.Text.*.DocTitle | USTRING |
Converters.Text.*.HeadersFooters | ENUM | R2_HR_CONVERT
Converters.Text.*.OverviewSheetName | STRING | Overview
Converters.Text.*.PageBreaks | BOOL | FALSE
Converters.Text.*.PageColor | BOOL | FALSE
Converters.Text.*.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.*.SheetNamePrefix | STRING | Sheet
Converters.Text.*.SplitMaxPages | INT | 0
Converters.Text.*.SplitMaxSize | INT | 0

Top of page.

HTML3.2 converter

This converter is supported on: Windows, Linux, Embedded Linux, MacOS.

NAME | TYPE | DEFAULT VALUE
Converters.Text.Html32.Bullets | BOOL | FALSE
Converters.Text.Html32.Crossrefs | BOOL | TRUE
Converters.Text.Html32.HeadersFooters | ENUM | R2_HR_CONVERT
Converters.Text.Html32.HRBetweenSections | BOOL | TRUE
Converters.Text.Html32.IndexPage | ENUM | HWI_SIMPLE
Converters.Text.Html32.LineBreaks | BOOL | FALSE
Converters.Text.Html32.NavNextText | STRING | Next
Converters.Text.Html32.NavPrevText | STRING | Previous
Converters.Text.Html32.NavTOCText | STRING | Index
Converters.Text.Html32.PageBreaks | BOOL | TRUE
Converters.Text.Html32.PutItSubdirectory | BOOL | TRUE
Converters.Text.Html32.RetainLineNumberingZones | BOOL | FALSE

Top of page.

HTML 4.0 and 5.0 converters

The following table describes the settings of the converters

  • HTML 4.0 (supported on: Windows, Linux, Embedded Linux, MacOS),
  • HTML 5.0 (supported on: Windows, Linux, Embedded Linux, MacOS).

For getting the exact setting names of each converter, replace '*' to one of the following strings in the name of the table below:

  • Html40,
  • Html50.
NAME | TYPE | DEFAULT VALUE
Converters.Text.*.Bullets | BOOL | TRUE
Converters.Text.*.CharColors | BOOL | TRUE
Converters.Text.*.CharSpacing | BOOL | TRUE
Converters.Text.*.Crossrefs | BOOL | TRUE
Converters.Text.*.HeadersFooters | ENUM | R2_HR_CONVERT
Converters.Text.*.HRBetweenSections | BOOL | TRUE
Converters.Text.*.IndexPage | ENUM | HWI_SIMPLE
Converters.Text.*.LineBreaks | BOOL | FALSE
Converters.Text.*.NavNextText | STRING | Next
Converters.Text.*.NavPrevText | STRING | Previous
Converters.Text.*.NavTOCText | STRING | Index
Converters.Text.*.PageBreaks | BOOL | TRUE
Converters.Text.*.PutItSubdirectory | BOOL | TRUE
Converters.Text.*.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.*.Styles | BOOL | TRUE

Top of page.

HTML 5.0 Essay converter

For the Essay mode converters, there are several options to tune, depending on the User's need or the actual document. Please find the settings in the table below that are recommended to consider for using in Essay mode.

This converter is supported on: Windows, Linux, Embedded Linux, MacOS).

NAME | TYPE | DEFAULT VALUE
Converters.Text.HTML50Essay.Bullets | BOOL | TRUE
Converters.Text.HTML50Essay.CharColors | BOOL | TRUE
Converters.Text.HTML50Essay.CharScaling | BOOL | TRUE
Converters.Text.HTML50Essay.CharSpacing | BOOL | FALSE
Converters.Text.HTML50Essay.Crossrefs | BOOL | TRUE (except for RTF6)
Converters.Text.HTML50Essay.DropCaps | BOOL | FALSE
Converters.Text.HTML50Essay.HeadersFooters | ENUM | R2_HR_NONE
Converters.Text.HTML50Essay.LineBreaks | BOOL | FALSE
Converters.Text.HTML50Essay.OutputMode | ENUM | OL_RFP See OUTPUTLEVEL See also RecSetOutputLevel function
Converters.Text.HTML50Essay.ParAlignment | BOOL | TRUE
Converters.Text.HTML50Essay.ParFirstLIndent | BOOL | TRUE
Converters.Text.HTML50Essay.ParIndent | BOOL | TRUE
Converters.Text.HTML50Essay.ParLinespacing | BOOL | TRUE
Converters.Text.HTML50Essay.ParAlignment | BOOL | TRUE
Converters.Text.HTML50Essay.Pictures | ENUM | R2_DPI_ORIGINAL
Converters.Text.HTML50Essay.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.HTML50Essay.Styles | BOOL | TRUE
Converters.Text.HTML50Essay.Tables | ENUM | R2_TR_RETAIN
Converters.Text.HTML50Essay.Tabs | BOOL | TRUE

Top of page.

PDF converters

These converters are supported on: Windows, Linux, MacOS.

Common PDF settings. In the following setting names PDF* should be replaced with the name of the actual PDF converter (PDF, PDFEdited, PDFImageOnText or PDFImageSubst).

NAME | TYPE | DEFAULT VALUE
Converters.Text.PDF*.AdditionalFonts | BOOL | TRUE
Converters.Text.PDF*.AppendFrom | USTRING |
Converters.Text.PDF*.AppendFromPassword | USTRING |
Converters.Text.PDF*.ColorQuality | ENUM | R2ID_PDFCOLORQUALITY_MIN
Converters.Text.PDF*.Compatibility | ENUM | R2ID_FORCESIZE
Converters.Text.PDF*.Compression.CompForContents | BOOL | TRUE
Converters.Text.PDF*.Compression.CompForTTF | BOOL | TRUE
Converters.Text.PDF*.Compression.UseFlate | BOOL | TRUE
Converters.Text.PDF*.Compression.UseJBIG2 | BOOL | TRUE
Converters.Text.PDF*.Compression.UseJPEG2000 | BOOL | TRUE
Converters.Text.PDF*.Compression.UseLZWInsteadOfFlate | BOOL | FALSE
Converters.Text.PDF*.DocAuthor | USTRING |
Converters.Text.PDF*.DocCreator | USTRING |
Converters.Text.PDF*.DocKeywords | USTRING |
Converters.Text.PDF*.DocProducer | USTRING |
Converters.Text.PDF*.DocSubject | USTRING |
Converters.Text.PDF*.DocTitle | USTRING |
Converters.Text.PDF*.DropCaps | BOOL | TRUE
Converters.Text.PDF*.EnableMetaData | BOOL | FALSE
Converters.Text.PDF*.CustomMetaData | USTRING |
Converters.Text.PDF*.EnableBWImageAsMask | BOOL | FALSE
Converters.Text.PDF*.Linearized | BOOL | FALSE
Converters.Text.PDF*.SplitMaxPages | INT | 0
Converters.Text.PDF*.SplitMaxSize | INT | 0
Converters.Text.PDF*.OutlineProps.Outline | BOOL | TRUE
Converters.Text.PDF*.OutlineProps.OutlineNumbering | BOOL | TRUE
Converters.Text.PDF*.OutlineProps.OutlinePageName | USTRING | Page
Converters.Text.PDF*.PDFFormVisuality | BOOL | TRUE
Converters.Text.PDF*.PDFSecurity.EnableAdd | BOOL | TRUE
Converters.Text.PDF*.PDFSecurity.EnableAssemble | BOOL | TRUE
Converters.Text.PDF*.PDFSecurity.EnableCopy | BOOL | TRUE
Converters.Text.PDF*.PDFSecurity.EnableExtract | BOOL | TRUE
Converters.Text.PDF*.PDFSecurity.EnableForms | BOOL | TRUE
Converters.Text.PDF*.PDFSecurity.EnableModify | BOOL | TRUE
Converters.Text.PDF*.PDFSecurity.EnablePrint | BOOL | TRUE
Converters.Text.PDF*.PDFSecurity.EnablePrintQ | BOOL | TRUE
Converters.Text.PDF*.PDFSecurity.EncryptMetaData | BOOL | TRUE
Converters.Text.PDF*.PDFSecurity.OwnerPassword | USTRING |
Converters.Text.PDF*.PDFSecurity.Type | ENUM | R2ID_PDFSECURITYNONE
Converters.Text.PDF*.PDFSecurity.UserPassword | USTRING |
Converters.Text.PDF*.PictureColor | ENUM | R2_BPP_ORIGINAL
Converters.Text.PDF*.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.PDF*.Signature.CertificateDescription | USTRING |
Converters.Text.PDF*.Signature.CertificateSHA1 | STRING |
Converters.Text.PDF*.Signature.SignatureType | ENUM | R2ID_SIGTYPENONE
Converters.Text.PDF*.URLProps.URLBackground | INT | REC_WHITE See REC_COLOR
Converters.Text.PDF*.URLProps.URLForeground | INT | 0xFF0000 (Blue) See REC_COLOR
Converters.Text.PDF*.URLProps.URLForegroundDef | BOOL | FALSE
Converters.Text.PDF*.URLProps.URLUnderline | BOOL | TRUE
Converters.Text.PDF*.UseMRC | ENUM | R2ID_PDFMRC_NO

Top of page.

PDF converter

This converter is supported on: Windows, Linux, MacOS.

See also the settings existing in all PDF converters.

NAME | TYPE | DEFAULT VALUE
Converters.Text.PDF.Crossrefs | BOOL | TRUE
Converters.Text.PDF.HeadersFooters | ENUM | R2_HR_AUTO
Converters.Text.PDF.NeedTaggedInfo | BOOL | TRUE
Converters.Text.PDF.PDFThumbnail | BOOL | FALSE
Converters.Text.PDF.Pictures | ENUM | R2_DPI_150
Converters.Text.PDF.ProcessingMode.PDFForms | BOOL | TRUE
Converters.Text.PDF.ProcessingMode.ShowBackgroundImage | BOOL | FALSE
Converters.Text.PDF.ProcessingMode.ShowText | BOOL | TRUE
Converters.Text.PDF.RuleLines | BOOL | TRUE
Converters.Text.PDF.ShowSubstitutes | BOOL | FALSE
Converters.Text.PDF.URLProps.URLBackgroundDef | BOOL | TRUE
Converters.Text.PDF.URLProps.URLHighlight | BOOL | TRUE

Top of page.

PDF Edited converter

This converter is supported on: Windows, Linux, MacOS.

See also the settings existing in all PDF converters.

NAME | TYPE | DEFAULT VALUE
Converters.Text.PDFEdited.Bullets | BOOL | TRUE
Converters.Text.PDFEdited.Crossrefs | BOOL | TRUE
Converters.Text.PDFEdited.FieldCodes | BOOL | TRUE
Converters.Text.PDFEdited.HeadersFooters | ENUM | R2_HR_AUTO
Converters.Text.PDFEdited.NeedTaggedInfo | BOOL | TRUE
Converters.Text.PDFEdited.PDFForms | BOOL | TRUE
Converters.Text.PDFEdited.Pictures | ENUM | R2_DPI_150
Converters.Text.PDFEdited.RuleLines | BOOL | TRUE
Converters.Text.PDFEdited.URLProps.URLBackgroundDef | BOOL | TRUE
Converters.Text.PDFEdited.URLProps.URLHighlight | BOOL | TRUE
Converters.Text.*.PaperSize | BOOL | FALSE
Converters.Text.*.PaperSize.* |  |

Top of page.

PDF Image On Text converter

This converter is supported on: Windows, Linux, MacOS.

See also the settings existing in all PDF converters.

NAME | TYPE | DEFAULT VALUE
Converters.Text.PDFImageOnText.Bullets | BOOL | TRUE
Converters.Text.PDFImageOnText.Crossrefs | BOOL | FALSE
Converters.Text.PDFImageOnText.HeadersFooters | ENUM | R2_HR_NONE
Converters.Text.PDFImageOnText.NeedTaggedInfo | BOOL | FALSE
Converters.Text.PDFImageOnText.PDFThumbnail | BOOL | FALSE
Converters.Text.PDFImageOnText.Pictures | ENUM | R2_DPI_ORIGINAL
Converters.Text.PDFImageOnText.ProcessingMode.PDFForms | BOOL | FALSE
Converters.Text.PDFImageOnText.ProcessingMode.ShowBackgroundImage | BOOL | TRUE
Converters.Text.PDFImageOnText.ProcessingMode.ShowText | BOOL | TRUE
Converters.Text.PDFImageOnText.RuleLines | BOOL | FALSE

Top of page.

PDF ImageSubst converter

This converter is supported on: Windows, Linux, MacOS.

See also the settings existing in all PDF converters.

NAME | TYPE | DEFAULT VALUE
Converters.Text.PDFImageSubst.Bullets | BOOL | TRUE
Converters.Text.PDFImageSubst.Crossrefs | BOOL | TRUE
Converters.Text.PDFImageSubst.HeadersFooters | ENUM | R2_HR_AUTO
Converters.Text.PDFImageSubst.NeedTaggedInfo | BOOL | TRUE
Converters.Text.PDFImageSubst.PDFThumbnail | BOOL | FALSE
Converters.Text.PDFImageSubst.Pictures | ENUM | R2_DPI_150
Converters.Text.PDFImageSubst.ProcessingMode.PDFForms | BOOL | TRUE
Converters.Text.PDFImageSubst.ProcessingMode.ShowBackgroundImage | BOOL | FALSE
Converters.Text.PDFImageSubst.ProcessingMode.ShowText | BOOL | TRUE
Converters.Text.PDFImageSubst.RuleLines | BOOL | TRUE
Converters.Text.PDFImageSubst.URLProps.URLBackgroundDef | BOOL | TRUE
Converters.Text.PDFImageSubst.URLProps.URLHighlight | BOOL | TRUE

Top of page.

PowerPoint converters

CSDK offers the following PowerPoint converters:

  • PPTX (supported on: Windows, Linux, MacOS): PowerPoint 2007 converter
  • PowerPoint97 (supported on: Windows): PowerPoint 97 converter

Both converters work with separate settings, but uses the same attribute names for the settings. The following table lists the attribute names for the PPTX settings. To address the PowerPoint97 converter settings, replace the substring "PPTX" with "PowerPoint97" in the names.

NAME | TYPE | DEFAULT VALUE
Converters.Text.PPTX.Bullets | BOOL | TRUE
Converters.Text.PPTX.CharColors | BOOL | TRUE
Converters.Text.PPTX.DocAuthor | USTRING |
Converters.Text.PPTX.DocCategory | USTRING |
Converters.Text.PPTX.DocComments | USTRING |
Converters.Text.PPTX.DocCompany | USTRING |
Converters.Text.PPTX.DocKeywords | USTRING |
Converters.Text.PPTX.DocManager | USTRING |
Converters.Text.PPTX.DocSubject | USTRING |
Converters.Text.PPTX.DocTitle | USTRING |
Converters.Text.PPTX.HeadersFooters | ENUM | R2_HR_CONVERT
Converters.Text.PPTX.LineBreaks | BOOL | FALSE
Converters.Text.PPTX.OutputMode | ENUM | OL_RFP See OUTPUTLEVEL See also RecSetOutputLevel function
Converters.Text.PPTX.PageBreaks | BOOL | FALSE
Converters.Text.PPTX.Pictures | ENUM | R2_DPI_NONE
Converters.Text.PPTX.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.PPTX.SplitMaxPages | INT | 0
Converters.Text.PPTX.SplitMaxSize | INT | 0
Converters.Text.PPTX.Styles | BOOL | FALSE
Converters.Text.PPTX.Tables | ENUM | R2_TR_RETAIN
Converters.Text.PPTX.Tabs | BOOL | TRUE
Converters.Text.PPTX.LimitPaperSize | BOOL | TRUE

Top of page.

Publisher98 converter

This converter is supported on: Windows.

NAME | TYPE | DEFAULT VALUE
Converters.Text.Publisher98.Bullets | BOOL | TRUE
Converters.Text.Publisher98.CharColors | BOOL | TRUE
Converters.Text.Publisher98.CharScaling | BOOL | FALSE
Converters.Text.Publisher98.CharSpacing | BOOL | FALSE
Converters.Text.Publisher98.DocAuthor | USTRING |
Converters.Text.Publisher98.DocCategory | USTRING |
Converters.Text.Publisher98.DocComments | USTRING |
Converters.Text.Publisher98.DocCompany | USTRING |
Converters.Text.Publisher98.DocKeywords | USTRING |
Converters.Text.Publisher98.DocManager | USTRING |
Converters.Text.Publisher98.DocSubject | USTRING |
Converters.Text.Publisher98.DocTitle | USTRING |
Converters.Text.Publisher98.HeadersFooters | ENUM | R2_HR_CONVERT
Converters.Text.Publisher98.LineBreaks | BOOL | FALSE
Converters.Text.Publisher98.OutputMode | ENUM | OL_RFP See OUTPUTLEVEL See also RecSetOutputLevel function
Converters.Text.Publisher98.PageBreaks | BOOL | FALSE
Converters.Text.Publisher98.Pictures | ENUM | R2_DPI_NONE
Converters.Text.Publisher98.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.Publisher98.SplitMaxPages | INT | 0
Converters.Text.Publisher98.SplitMaxSize | INT | 0
Converters.Text.Publisher98.Styles | BOOL | FALSE
Converters.Text.Publisher98.Tables | ENUM | R2_TR_RETAIN
Converters.Text.Publisher98.Tabs | BOOL | TRUE

Top of page.

RTF and DOC converters

The following table describes the settings of the converters

  • RTF Word2000 (supported on: Windows, Linux, Embedded Linux, MacOS),
  • WordML (supported on: Windows),
  • DOCX (supported on: Windows, Linux, Embedded Linux, MacOS).

For getting the exact setting names of each converter, replace '*' to one of the following strings in the name of the table below:

  • RTF2000,
  • WordML,
  • DOCX.
NAME | TYPE | DEFAULT VALUE
Converters.Text.*.Bullets | BOOL | TRUE
Converters.Text.*.CharColors | BOOL | TRUE
Converters.Text.*.CharScaling | BOOL | TRUE
Converters.Text.*.CharSpacing | BOOL | TRUE
Converters.Text.*.ColumnBreaks | BOOL | FALSE
Converters.Text.*.Crossrefs | BOOL | TRUE (except for RTF6)
Converters.Text.*.ConsolidatePages | BOOL | FALSE
Converters.Text.*.DocAuthor | USTRING |
Converters.Text.*.DocCategory | USTRING |
Converters.Text.*.DocComments | USTRING |
Converters.Text.*.DocCompany | USTRING |
Converters.Text.*.DocKeywords | USTRING |
Converters.Text.*.DocManager | USTRING |
Converters.Text.*.DocSubject | USTRING |
Converters.Text.*.DocTitle | USTRING |
Converters.Text.*.DropCaps | BOOL | TRUE
Converters.Text.*.FieldCodes | BOOL | TRUE
Converters.Text.*.HeadersFooters | ENUM | R2_HR_AUTO
Converters.Text.*.LineBreaks | BOOL | FALSE
Converters.Text.*.OutputMode | ENUM | OL_FLOWINGPAGE See OUTPUTLEVEL See also RecSetOutputLevel function
Converters.Text.*.PageBreaks | ENUM | R2_PB_ALWAYS
Converters.Text.*.PageColor | BOOL | TRUE
Converters.Text.*.Pictures | ENUM | R2_DPI_ORIGINAL
Converters.Text.*.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.*.RuleLines | BOOL | TRUE
Converters.Text.*.SplitMaxPages | INT | 0
Converters.Text.*.SplitMaxSize | INT | 0
Converters.Text.*.Styles | BOOL | TRUE
Converters.Text.*.Tables | ENUM | R2_TR_RETAIN
Converters.Text.*.Tabs | BOOL | TRUE
Converters.Text.*.PaperSize | BOOL | FALSE (for WordML it is not supported)
Converters.Text.*.PaperSize.* |  |
Converters.Text.*.LimitPaperSize | BOOL | TRUE

Top of page.

RTF and DOCX Essay converters

For the Essay mode converters, there are several options to tune, depending on the User's need or the actual document. Please find the settings in the table below that are recommended to consider for using in Essay mode.

The following table describes the settings of the converters

  • RTF Word2000 Essay (supported on: Windows, Linux, Embedded Linux, MacOS),
  • DOCX Essay (supported on: Windows, Linux, Embedded Linux, MacOS).

For getting the exact setting names of each converter, replace '*' to one of the following strings in the name of the table below:

  • RTF2000Essay,
  • DOCXEssay.
NAME | TYPE | DEFAULT VALUE
Converters.Text.*.Bullets | BOOL | TRUE
Converters.Text.*.CharColors | BOOL | TRUE
Converters.Text.*.CharScaling | BOOL | FALSE
Converters.Text.*.CharSpacing | BOOL | FALSE
Converters.Text.*.Crossrefs | BOOL | TRUE (except for RTF6)
Converters.Text.*.DropCaps | BOOL | TRUE
Converters.Text.*.HeadersFooters | ENUM | R2_HR_NONE
Converters.Text.*.LineBreaks | BOOL | FALSE
Converters.Text.*.OutputMode | ENUM | OL_RFP See OUTPUTLEVEL See also RecSetOutputLevel function
Converters.Text.*.ParAlignment | BOOL | TRUE
Converters.Text.*.ParFirstLIndent | BOOL | TRUE
Converters.Text.*.ParIndent | BOOL | TRUE
Converters.Text.*.ParLinespacing | BOOL | TRUE
Converters.Text.*.ParAlignment | BOOL | TRUE
Converters.Text.*.Pictures | ENUM | R2_DPI_ORIGINAL
Converters.Text.*.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.*.Styles | BOOL | TRUE
Converters.Text.*.Tables | ENUM | R2_TR_RETAIN
Converters.Text.*.Tabs | BOOL | TRUE
Converters.Text.*.PaperSize | BOOL | FALSE
Converters.Text.*.PaperSize.* |  |
Converters.Text.*.LimitPaperSize | BOOL | TRUE

Top of page.

"Pages converter"

The following table describes the settings of the Pages converter (supported on: Windows, Linux, Embedded Linux, MacOS).

NAME | TYPE | DEFAULT VALUE
Converters.Text.Pages.Bullets | BOOL | TRUE
Converters.Text.Pages.CharColors | BOOL | TRUE
Converters.Text.Pages.CharScaling | BOOL | TRUE
Converters.Text.Pages.CharSpacing | BOOL | TRUE
Converters.Text.Pages.ColumnBreaks | BOOL | FALSE
Converters.Text.Pages.Crossrefs | BOOL | TRUE (except for RTF6)
Converters.Text.Pages.ConsolidatePages | BOOL | FALSE
Converters.Text.Pages.DocAuthor | USTRING |
Converters.Text.Pages.DocCategory | USTRING |
Converters.Text.Pages.DocComments | USTRING |
Converters.Text.Pages.DocCompany | USTRING |
Converters.Text.Pages.DocKeywords | USTRING |
Converters.Text.Pages.DocManager | USTRING |
Converters.Text.Pages.DocSubject | USTRING |
Converters.Text.Pages.DocTitle | USTRING |
Converters.Text.Pages.DropCaps | BOOL | TRUE
Converters.Text.Pages.FieldCodes | BOOL | TRUE
Converters.Text.Pages.HeadersFooters | ENUM | R2_HR_AUTO
Converters.Text.Pages.LineBreaks | BOOL | FALSE
Converters.Text.Pages.OutputMode | ENUM | OL_RFP See OUTPUTLEVEL See also RecSetOutputLevel function
Converters.Text.Pages.PageBreaks | ENUM | R2_PB_ALWAYS
Converters.Text.Pages.PageColor | BOOL | TRUE
Converters.Text.Pages.Pictures | ENUM | R2_DPI_ORIGINAL
Converters.Text.Pages.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.Pages.RuleLines | BOOL | TRUE
Converters.Text.Pages.SplitMaxPages | INT | 0
Converters.Text.Pages.SplitMaxSize | INT | 0
Converters.Text.Pages.Styles | BOOL | TRUE
Converters.Text.Pages.Tables | ENUM | R2_TR_RETAIN
Converters.Text.Pages.Tabs | BOOL | TRUE

Top of page.

Text converters

These converters are supported on: Windows, Linux, Embedded Linux, MacOS.

Common settings for TEXT converters. Settings varying in different text converters can be found separated tables below.

'*' should be replaced to one of the following strings: Csv, UCsv, FormattedTxt, UFormattedTxt, Text, TextWithLinebreaks, UText, UTextWithLinebreaks

NAME | TYPE | DEFAULT VALUE
Converters.Text.*.Append | BOOL | TRUE
Converters.Text.*.AppendFrom | USTRING |
Converters.Text.*.BeginCell | USTRING |
Converters.Text.*.BeginParagraph | USTRING |
Converters.Text.*.BeginTable | USTRING |
Converters.Text.*.BeginTableLine | USTRING |
Converters.Text.*.EndCell | USTRING |
Converters.Text.*.EndParagraph | USTRING |
Converters.Text.*.EndTable | USTRING |
Converters.Text.*.EndTableLine | USTRING |
Converters.Text.*.HeadersFooters | ENUM | R2_HR_CONVERT
Converters.Text.*.RetainLineNumberingZones | BOOL | FALSE

Top of page.

CSV Comma Delimited converter

These converters are supported on: Windows, Linux, Embedded Linux, MacOS.

NAME | TYPE | DEFAULT VALUE
Converters.Text.Csv.Bullets | BOOL | TRUE
Converters.Text.Csv.CodePage | ENUM | CP_AUTO (5999)
Converters.Text.Csv.ListSeparator | USTRING | \t
Converters.Text.Csv.UseOSListSeparator | BOOL | TRUE

Top of page.

Unicode CSV Text converter

These converters are supported on: Windows, Linux, Embedded Linux, MacOS.

NAME | TYPE | DEFAULT VALUE
Converters.Text.UCsv.Bullets | BOOL | TRUE
Converters.Text.UCsv.IntelUnicodeByteOrder | BOOL | TRUE
Converters.Text.UCsv.ListSeparator | USTRING | \t
Converters.Text.UCsv.UseOSListSeparator | BOOL | TRUE

Top of page.

Formatted Text converter

These converters are supported on: Windows, Linux, Embedded Linux, MacOS.

NAME | TYPE | DEFAULT VALUE
Converters.Text.FormattedTxt.CodePage | ENUM | CP_AUTO (5999)
Converters.Text.FormattedTxt.LineBreak | USTRING | \r\n
Converters.Text.FormattedTxt.LineBreaks | BOOL | FALSE
Converters.Text.FormattedTxt.PageBreaks | BOOL | TRUE
Converters.Text.FormattedTxt.PageMargins | BOOL | TRUE

Top of page.

Unicode Formatted Text converter

These converters are supported on: Windows, Linux, Embedded Linux, MacOS.

NAME | TYPE | DEFAULT VALUE
Converters.Text.UFormattedTxt.IntelUnicodeByteOrder | BOOL | TRUE
Converters.Text.UFormattedTxt.LineBreak | USTRING | \r\n
Converters.Text.UFormattedTxt.LineBreaks | BOOL | FALSE
Converters.Text.UFormattedTxt.PageBreaks | BOOL | TRUE
Converters.Text.UFormattedTxt.PageMargins | BOOL | TRUE

Top of page.

Simple Text converter

These converters are supported on: Windows, Linux, Embedded Linux, MacOS.

NAME | TYPE | DEFAULT VALUE
Converters.Text.Text.Bullets | BOOL | TRUE
Converters.Text.Text.CodePage | ENUMT | CP_AUTO (5999)
Converters.Text.Text.ConvertTabs | BOOL | FALSE
Converters.Text.Text.LineBreak | USTRING | \r\n
Converters.Text.Text.LineBreaks | BOOL | FALSE
Converters.Text.Text.PageBreak | USTRING | \f\r\n
Converters.Text.Text.PageBreaks | BOOL | FALSE

Top of page.

Text With Linebreaks converter

These converters are supported on: Windows, Linux, Embedded Linux, MacOS.

NAME | TYPE | DEFAULT VALUE
Converters.Text.TextWithLineBreaks.Bullets | BOOL | TRUE
Converters.Text.TextWithLineBreaks.CodePage | ENUM | CP_AUTO (5999)
Converters.Text.TextWithLineBreaks.ConvertTabs | BOOL | FALSE
Converters.Text.TextWithLineBreaks.LineBreak | USTRING | \r\n
Converters.Text.TextWithLineBreaks.LineBreaks | BOOL | TRUE
Converters.Text.TextWithLineBreaks.PageBreak | USTRING | \f\r\n
Converters.Text.TextWithLineBreaks.PageBreaks | BOOL | FALSE

Top of page.

Unicode Text converter

These converters are supported on: Windows, Linux, Embedded Linux, MacOS.

NAME | TYPE | DEFAULT VALUE
Converters.Text.UText.Bullets | BOOL | TRUE
Converters.Text.UText.ConvertTabs | BOOL | FALSE
Converters.Text.UText.IntelUnicodeByteOrder | BOOL | TRUE
Converters.Text.UText.LineBreak | USTRING | \r\n
Converters.Text.UText.LineBreaks | BOOL | FALSE
Converters.Text.UText.PageBreak | USTRING | \f\r\n
Converters.Text.UText.PageBreaks | BOOL | FALSE

Top of page.

Unicode Text With Linebreaks converter

These converters are supported on: Windows, Linux, Embedded Linux, MacOS.

NAME | TYPE | DEFAULT VALUE
Converters.Text.UTextWithLinebreaks.Bullets | BOOL | TRUE
Converters.Text.UTextWithLinebreaks.ConvertTabs | BOOL | FALSE
Converters.Text.UTextWithLinebreaks.IntelUnicodeByteOrder | BOOL | TRUE
Converters.Text.UTextWithLinebreaks.LineBreak | USTRING | \r\n
Converters.Text.UTextWithLinebreaks.LineBreaks | BOOL | TRUE
Converters.Text.UTextWithLinebreaks.PageBreak | USTRING | \f\r\n
Converters.Text.UTextWithLinebreaks.PageBreaks | BOOL | FALSE

Top of page.

WordPad converter

This converter is supported on: Windows.

NAME | TYPE | DEFAULT VALUE
Converters.Text.WordPad.Bullets | BOOL | TRUE
Converters.Text.WordPad.CharColors | BOOL | TRUE
Converters.Text.WordPad.HeadersFooters | ENUM | R2_HR_CONVERT
Converters.Text.WordPad.LineBreaks | BOOL | FALSE
Converters.Text.WordPad.OutputMode | ENUM | OL_RFP See OUTPUTLEVEL See also RecSetOutputLevel function
Converters.Text.WordPad.PageBreaks | BOOL | FALSE
Converters.Text.WordPad.Pictures | ENUM | R2_DPI_ORIGINAL
Converters.Text.WordPad.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.WordPad.SplitMaxPages | INT | 0
Converters.Text.WordPad.SplitMaxSize | INT | 0
Converters.Text.WordPad.Tables | ENUM | R2_TR_RETAIN
Converters.Text.WordPad.Tabs | BOOL | TRUE

Top of page.

WordPerfect10 converter

This converter is supported on: Windows.

NAME | TYPE | DEFAULT VALUE
Converters.Text.WordPerfect10.Bullets | BOOL | TRUE
Converters.Text.WordPerfect10.ColumnBreaks | BOOL | FALSE
Converters.Text.WordPerfect10.ConsolidatePages | BOOL | FALSE
Converters.Text.WordPerfect10.Crossrefs | BOOL | TRUE
Converters.Text.WordPerfect10.DocAuthor | USTRING |
Converters.Text.WordPerfect10.DocCategory | USTRING |
Converters.Text.WordPerfect10.DocComments | USTRING |
Converters.Text.WordPerfect10.DocCompany | USTRING |
Converters.Text.WordPerfect10.DocKeywords | USTRING |
Converters.Text.WordPerfect10.DocManager | USTRING |
Converters.Text.WordPerfect10.DocSubject | USTRING |
Converters.Text.WordPerfect10.DocTitle | USTRING |
Converters.Text.WordPerfect10.DropCaps | BOOL | TRUE
Converters.Text.WordPerfect10.FieldCodes | BOOL | TRUE
Converters.Text.WordPerfect10.HeadersFooters | ENUM | R2_HR_AUTO
Converters.Text.WordPerfect10.LineBreaks | BOOL | FALSE
Converters.Text.WordPerfect10.OutputMode | ENUM | OL_TRUEPAGE See OUTPUTLEVEL See also RecSetOutputLevel function
Converters.Text.WordPerfect10.PageBreaks | ENUM | R2_PB_ALWAYS
Converters.Text.WordPerfect10.PageColor | BOOL | TRUE
Converters.Text.WordPerfect10.Pictures | ENUM | R2_DPI_ORIGINAL
Converters.Text.WordPerfect10.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.WordPerfect10.RuleLines | BOOL | TRUE
Converters.Text.WordPerfect10.SplitMaxPages | INT | 0
Converters.Text.WordPerfect10.SplitMaxSize | INT | 0
Converters.Text.WordPerfect10.Styles | BOOL | TRUE
Converters.Text.WordPerfect10.Tables | ENUM | R2_TR_RETAIN
Converters.Text.WordPerfect10.Tabs | BOOL | TRUE

Top of page.

XML converter

This converter is supported on: Windows, Linux, MacOS.

NAME | TYPE | DEFAULT VALUE
Converters.Text.XML.CodePage | ENUM | CP_DEFAULT (5000)
Converters.Text.XML.DocAuthor | USTRING |
Converters.Text.XML.DocCategory | USTRING |
Converters.Text.XML.DocComments | USTRING |
Converters.Text.XML.DocCompany | USTRING |
Converters.Text.XML.DocKeywords | USTRING |
Converters.Text.XML.DocManager | USTRING |
Converters.Text.XML.DocSubject | USTRING |
Converters.Text.XML.DocTitle | USTRING |
Converters.Text.XML.HeadersFooters | ENUM | R2_HR_AUTO
Converters.Text.XML.InsertCharacterCoordinates | BOOL | FALSE
Converters.Text.XML.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.XML.SchemaLocation | USTRING |
Converters.Text.XML.UseXsdSchema | BOOL | TRUE

Top of page.

XPS and Searchable XPS converters

These converters are supported on: Windows.

The following table shows the common settings of XPS and Searchable XPS converters. '*' should be replaced to XPS or XPSsearchable. The settings varying in these converters are listed in separated tables below.

NAME | TYPE | DEFAULT VALUE
Converters.Text.*.Append | BOOL | FALSE
Converters.Text.*.Bullets | BOOL | TRUE
Converters.Text.*.DocAuthor | USTRING |
Converters.Text.*.DocCategory | USTRING |
Converters.Text.*.DocComments | USTRING |
Converters.Text.*.DocCompany | USTRING |
Converters.Text.*.DocKeywords | USTRING |
Converters.Text.*.DocManager | USTRING |
Converters.Text.*.DocSubject | USTRING |
Converters.Text.*.DocTitle | USTRING |
Converters.Text.*.HeadersFooters | ENUM | AutoFormat
Converters.Text.*.LineBreaks | BOOL | FALSE
Converters.Text.*.OutputMode | ENUM | TruePage
Converters.Text.*.PageBreaks | BOOL | TRUE
Converters.Text.*.PictureColor | ENUM | Original
Converters.Text.*.Pictures | ENUM | None
Converters.Text.*.RetainLineNumberingZones | BOOL | FALSE
Converters.Text.*.SplitMaxPages | INT | 0
Converters.Text.*.SplitMaxSize | INT | 0
Converters.Text.*.Styles | BOOL | FALSE
Converters.Text.*.Tables | ENUM | ConvertToSeparatedByTabs

Top of page.

XPS converter

This converter is supported on: Windows.

NAME | TYPE | DEFAULT VALUE
Converters.Text.XPS.RuleLines | BOOL | TRUE
Converters.Text.XPS.Title | USTRING | XML Paper Specification

Top of page.

Searchable XPS converter

This converter is supported on: Windows.

NAME | TYPE | DEFAULT VALUE
Converters.Text.XPSsearchable.Title | USTRING | XPSsearchable

Top of page.


RecAPI: Topics

Topics
Here is a list of all topics with brief descriptions:
[detail level 1234]
▼ KernelAPI | "C" Level Page Oriented API of the OmniPage Capture SDK v2025.1
▼ General Operations Module | General operations and data
Error Handling Module | Error information
Settings Manager Module | This is the manager of settings at the KernelAPI level
Profile Module | Profile handling for setting the environment according to each workflow
Image File Handling Module | Supporting different image file formats
Input/output Stream Handling Module | API for handling input and output files through memory or other non-standard I/O devices. Supported on: Windows, Linux, MacOS
Scanning Module | This is the Scanner API of the KernelAPI. The Scanning Module is supported on: Windows
Image Handling Module | Image handling tools
▼ Zone Handling Module | Zone handling tools
Table Recognition Module | Table detection and working with tables
Form Recognition Module | Form recognition module. Supported on: Windows, Linux, Embedded Linux, MacOS
▼ Recognition Module | Performing Optical Character Recognition
▼ Recognition Engines having own functions | There are some recognition engines having one or more own functions or types
BAR Recognition Engine Module | Barcode recognition module
HNR Recognition Engine Module | Handprinted numeral recognition module. This module is supported on: Windows
MOR Recognition Engine Module | MOR multi-lingual omnifont recognition module
OMR Recognition Engine Module | OMR optical mark recognition module
Recognition Data Handling Module | Letter handling tools
Language, Character Set and Code Page Handling Module | Language, Character Set and Code Page Handling Module
Spell Checking Module | Spell checking for accuracy improvement
Direct TXT Output Converter Module | Simple output converters
Document Classifier Module | Document Classifier API
KernelAPIS | Dynamic linking of KernelAPI. This module is supported on: Windows
▼ RecAPIPlus | This is the "C" level Document Oriented API of the OmniPage CSDK. This API level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS
General Service Functions Module | General Service Functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS
Simple Multipage Document Handling Module | Simple document handling functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS
One Step Functions Module | One step functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS
Layout Retention Output Module | Layout Retention Output. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS
Text Marking and Redaction Module | Text Marking and Redaction. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS
Form Data Extraction Module | Data collection from filled forms with CSV output. Form processing is supported on: Windows, Linux, MacOS
Scanner Enhancement Technology Tools (SET Tools) | Scanner Enhancement Technology Tools (SET Tools). This module is supported on: Windows
RecAPIPlusS | Dynamic linking of RecAPIPlus. This module is supported on: Windows
▼ RecPDFAPI | This is the API extension for managing page-level manipulations of PDF files. RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS
RecPDF Module | This is the "C" level API of RecPDFAPI. RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS
RecPDFS | Dynamic linking of RecPDF. This module is supported on: Windows
RecPDF.Net | RecPDF.NET is the object oriented .NET API of RecPDFAPI. Supported on: Windows


RecAPI: KernelAPI

Topics
KernelAPI

"C" Level Page Oriented API of the OmniPage Capture SDK v2025.1. More...

Topics

General Operations Module
General operations and data.
Image File Handling Module
Supporting different image file formats.
Input/output Stream Handling Module
API for handling input and output files through memory or other non-standard I/O devices. Supported on: Windows, Linux, MacOS.
Scanning Module
This is the Scanner API of the KernelAPI. The Scanning Module is supported on: Windows.
Image Handling Module
Image handling tools.
Zone Handling Module
Zone handling tools.
Form Recognition Module
Form recognition module. Supported on: Windows, Linux, Embedded Linux, MacOS.
Recognition Module
Performing Optical Character Recognition.
Recognition Data Handling Module
Letter handling tools.
Language, Character Set and Code Page Handling Module
Language, Character Set and Code Page Handling Module.
Spell Checking Module
Spell checking for accuracy improvement.
Direct TXT Output Converter Module
Simple output converters.
Document Classifier Module
Document Classifier API.
KernelAPIS
Dynamic linking of KernelAPI. This module is supported on: Windows.

Detailed Description

"C" Level Page Oriented API of the OmniPage Capture SDK v2025.1.

List of header files of this module:

  • RECERR.h - Error Handling Module (see in General Operations Module)
  • RecErrEnums.h - Error Handling Module (see in General Operations Module)
  • KrnStsApi.h - Settings Manager Module (see in General Operations Module)
  • KrnScanAPI.h - Scanning Module
  • KrnScanTypes.h - Scanning Module
  • KernelApi.h - The main header including all the above files and containing all the other modules.

The library file that should be linked is KernelAPI.lib, but there is an alternative solution: the dynamic linking using KernelAPIS (supported on: Windows). On Linux, Embedded Linux and Android the parallel file is libkernelapi.so. On MacOS, the parallel file is libkernelapi.dylib.


RecAPI: General Operations Module

Topics | Classes | Typedefs | Enumerations | Functions
General Operations Module
KernelAPI

General operations and data. More...

Topics

Error Handling Module
Error information.
Settings Manager Module
This is the manager of settings at the KernelAPI level.
Profile Module
Profile handling for setting the environment according to each workflow.

Classes

struct | KRECMODULEINFO
Module info. More...
struct | PROGRESSMONITOR
Progress information. More...

Typedefs

typedef KRECMODULEINFO * | LPKRECMODULEINFO
Pointer to a structure KRECMODULEINFO.
typedef PROGRESSMONITOR * | LPPROGRESSMONITOR
Pointer to a PROGRESSMONITOR.
typedef RECERR RECKRNCALL | PROGMON_CB(LPPROGRESSMONITOR mod, void *pContext)
The user-written progress monitoring callback function.
typedef PROGMON_CB * | LPPROGMON_CB
Pointer to a callback PROGMON_CB.

Enumerations

enum KRECMODULES {
INFO_API = 0 ,
INFO_MOR ,
INFO_DOT ,
INFO_BAR ,
INFO_OMR ,
INFO_HNR ,
INFO_DCM ,
INFO_IMG ,
INFO_IMF ,
INFO_CHR ,
INFO_DTXT ,
INFO_SPL ,
INFO_RSD ,
INFO_RER ,
INFO_MGR ,
INFO_MTX ,
INFO_MAT ,
INFO_RESERVED_P ,
INFO_PLUS2W ,
INFO_FRX ,
INFO_PLUS3W ,
INFO_ASN ,
INFO_XOCR ,
INFO_LFR ,
INFO_ASP ,
INFO_ARA ,
INFO_SIZE
}
Module identifiers. More...
enum PROCESSID {
PID_IMGINPUT = 0 ,
PID_IMGSAVE ,
PID_IMGPREPROCESS ,
PID_DECOMPOSITION ,
PID_RECOGNITION1 ,
PID_RECOGNITION2 ,
PID_RECOGNITION3 ,
PID_SPELLING ,
PID_FORMATTING ,
PID_WRITEFOUTDOC ,
PID_CONVERTIMG ,
PID_SCANNER_WARMUP
}
Progress identifiers. More...

Functions

RECERR RECAPIKRN | kRecSetLibraryPath (LPCTSTR libpath)
Setting the path of the library files.
RECERR RECAPIKRN | kRecSetDataPath (LPCTSTR datapath)
Setting the path of the data files.
RECERR RECAPIKRN | kRecSetSandboxHomePath (const char *homepath)
Setting the Sandbox path on MacOS.
RECERR RECAPIKRN | kRecSetSandboxTempPath (const char *temppath)
Setting the Sandbox temporary path on MacOS.
RECERR RECAPIKRN | kRecSetLicense (LPCTSTR pLicenseFile, LPCTSTR pCode)
Setting the OEM license information.
RECERR RECAPIKRN | kRecInit (LPCTSTR pCompanyName, LPCTSTR pProductName)
Initializing KernelAPI.
RECERR RECAPIKRN | kRecQuit (void)
Closing KernelAPI.
RECERR RECAPIKRN | kRecSetUILang (const char *lang)
Setting the language of displayed information.
RECERR RECAPIKRN | kRecGetUILang (char *langbuff, size_t buffersize)
int RECAPIKRN | kRecCreateSettingsCollection (int sid)
Creating a new Settings Collection.
RECERR RECAPIKRN | kRecDeleteSettingsCollection (int sid)
Deleting a Settings Collection.
RECERR RECAPIKRN | kRecGetSerialNumber (LPTSTR pSn, size_t buflen)
int RECAPIKRN | kRecGetVersion (void)
Getting version.
RECERR RECAPIKRN | kRecSetCBProgMon (int sid, LPPROGMON_CB pCallBack, void *pContext)
Setting progress monitor.
RECERR RECAPIKRN | kRecSetTimeOut (int sid, DWORD TimeOut)
Setting timeout period.
RECERR RECAPIKRN | kRecGetTimeOut (int sid, LPDWORD pTimeOut)
Getting timeout period.
RECERR RECAPIKRN | kRecFree (void *pArray)
Freeing memory objects.
RECERR RECAPIKRN | kRecGetModulesInfo (LPKRECMODULEINFO *ppModules, size_t *pSize)
Getting module information.
RECERR RECAPIKRN | kRecLoadSettings (int sid, LPCTSTR pFileName)
Loading settings.
RECERR RECAPIKRN | kRecSaveSettings (int sid, LPCTSTR pFileName)
Saving settings of KernelAPI.
RECERR RECAPIKRN | kRecSetDefaults (int sid)
Changing settings of KernelAPI to default.
RECERR RECAPIKRN | kRecSetIntSetting (int sid, LPCTSTR setting, int new_value)
Setting the value of an STS_INT or STS_ENUM or STS_BOOL setting.
RECERR RECAPIKRN | kRecGetIntSetting (int sid, LPCTSTR setting, int *the_value)
Accessing the current value of an STS_INT or STS_ENUM or STS_BOOL setting.
RECERR RECAPIKRN | kRecSetDoubleSetting (int sid, LPCTSTR setting, double new_value)
Setting the value of an STS_DOUBLE setting.
RECERR RECAPIKRN | kRecGetDoubleSetting (int sid, LPCTSTR setting, double *the_value)
Accessing the current value of an STS_DOUBLE setting.
RECERR RECAPIKRN | kRecSetStringSetting (int sid, LPCTSTR setting, LPCTSTR new_value)
Setting the value of an STS_STRING or STS_USTRING setting.
RECERR RECAPIKRN | kRecGetStringSetting (int sid, LPCTSTR setting, LPTSTR *the_value)
Accessing the current value of an STS_STRING or STS_USTRING setting.

Detailed Description

General operations and data.

This module contains the basic types and functions necessary to use the general services of the KernelAPI. Initialization (kRecInit, kRecQuit) is an essential prerequisite for utilizing KernelAPI functionality. User authorization can also be performed in this module.

Useful information can be got about itself the Engine (e.g. accessible modules by kRecGetModulesInfo).

Most RecAPI operations work through Settings Collections. A Settings Collection acts as a kind of profile. It is a separate storage for operation settings (handled by Settings Manager Module). Distinct Settings Collections can store different values for given settings. A Settings Collection is authorized by an identifier. This identifier must be passed to all operations using that Settings Collection. The Collection with the ID 0 is cretaed automatically during the initialization of the Capture SDK. Settings Collections can be user-created or deleted, using the functions kRecCreateSettingsCollection, kRecDeleteSettingsCollection, respectively. You can also save or load settings here.

The same Settings Collections can be used from different threads. (Multi-threading is supported on: Windows, Linux.) Furthermore, one thread can use more than one Settings Collection. For more information, see the topic Multi-threading in RecAPI.

Timeout handling

Kernel.Timeout.Hard is an additional amount of time over the normal Kernel.Timeout time. The addition of the two values provides a hard timeout limit. This is designed this way in order to have a single kRecSetTimeOut call effectively change both the normal and hard timeout values. By default the hard timeout setting adds 10 seconds to the normal one.

Normally the timeout is checked at clean processing places inside recognition. If the engine detects that the normal timeout limit has been passed, it returns API_TIMEOUT_ERR if it can safely and cleanly return from the middle of a long recognition before the hard timeout is reached. If it cannot then a separate thread terminates the possible infinite loop when the additional hard timeout period is over and the engine returns API_HARDTIMEOUT_ERR. In this case the engine might be in an unstable state so further normal functioning is not guaranteed. We suggest that the user terminates and restarts the process to be in a clean state again.

See also timeout handling in the tutorial.

Typedef Documentation

◆ PROGMON_CB

typedef RECERR RECKRNCALL PROGMON_CB(LPPROGRESSMONITOR mod, void *pContext)

The user-written progress monitoring callback function.

This user-written callback procedure for progress monitoring must be registered by the kRecSetCBProgMon function. The Engine will continually invoke this registered callback procedure during different workflow processes (PROCESSID), providing a pointer to a PROGRESSMONITOR structure that contains the current processing stage and a percentage indicator value. The application can provide progress indication for this procedure.

Parameters
[in] | mod | This variable holds the current state of the activated action (ProcessID, progress information etc).
[in] | pContext | User data passed to the callback function by the Engine. The data to be passed can be set with kRecSetCBProgMon.
Return values
API_PROCESS_ABORTED_ERR | The user has requested the current processing to be aborted: processing will stop at the first suitable moment.
REC_OK | Process can be continued normally.
Note
Enabling progress monitoring in the integrating application during the recognition process might cause significant speed decrease especially for zones on small images when they are recognized with the recognition module RM_OMNIFONT_MTX.
The callback function must not contain calls to any KernelAPI functions.

Enumeration Type Documentation

◆ KRECMODULES

enum KRECMODULES

Module identifiers.

Use the kRecGetModulesInfo function to get information on the current Engine configuration.

Enumerator
INFO_API | Main KernelAPI API module.
INFO_MOR | The multi-lingual MOR omnifont recognition module. See RECOGNITIONMODULE.RM_OMNIFONT_MOR. Supported on: Windows, Linux. and MacOS x64
INFO_DOT | 9-pin draft dot-matrix recognition module. See RECOGNITIONMODULE.RM_DOT. Supported on: Windows.
INFO_BAR | Barcode recognition module. See RECOGNITIONMODULE.RM_BAR.
INFO_OMR | Optical mark recognition module. See RECOGNITIONMODULE.RM_OMR.
INFO_HNR | Handprinted numeral recognition module. See RECOGNITIONMODULE.RM_HNR. Supported on: Windows.
INFO_DCM | Legacy Automatic page-layout decomposition module. All platforms.
INFO_IMG | Image handling module. All platforms.
INFO_IMF | Image file I/O module. All platforms.
INFO_CHR | Character Set and Code Page handling module. All platforms.
INFO_DTXT | Direct Text output module. All platforms.
INFO_SPL | Spell Checking module. All platforms.
INFO_RSD | Scanning module. Supported on: Windows.
INFO_RER | Handprinted character recognition module. See RECOGNITIONMODULE.RM_RER. Supported on: Windows, Linux. and MacOS x64
INFO_MGR | Engine manager module. All platforms.
INFO_MTX | M/TEXT omnifont recognition module. See RECOGNITIONMODULE.RM_OMNIFONT_MTX. Supported on: Windows.
INFO_MAT | Matrix matching recognition module. See RECOGNITIONMODULE.RM_MAT. Supported on: Windows.
INFO_RESERVED_P | Internal use only. Must NOT be selected.
INFO_PLUS2W | 2-way voting recognition module. See RECOGNITIONMODULE.RM_OMNIFONT_PLUS2W. All platforms.
INFO_FRX | FRX recognition module. See RECOGNITIONMODULE.RM_OMNIFONT_FRX. All platforms.
INFO_PLUS3W | 3-way voting recognition module. See RECOGNITIONMODULE.RM_OMNIFONT_PLUS3W. Supported on: Windows, Linux, MacOS.
INFO_ASN | Asian recognition module. See RECOGNITIONMODULE.RM_ASIAN.
INFO_XOCR | XOCR module. The standard page parse module. All platforms.
INFO_LFR | The logical form recognition module. Supported on: Windows, Linux, Embedded Linux, MacOS.
INFO_ASP | Reserved.
INFO_ARA | Arabic recognition module. See RECOGNITIONMODULE.RM_ARABIC. All platforms.
INFO_SIZE | Number of modules.

◆ PROCESSID

enum PROCESSID

Progress identifiers.

Identifiers of the most important internal processes of the Engine, such as image loading, image saving, recognizing, etc. Each process listed below represents one of the fundamental services provided by the Engine. Applications will use one or more of these processes. Each process can be initiated by the relevant function (see below). The PROGMON_CB callback function can be used to generate progress monitoring for any of these processes.

Note
While all the processes above offer progress monitoring, many other API functions do not, since they are not primary processes. The functions without progress monitoring are typically used to:
  • inquire or make settings (kRecSetXX and kRecGetXX),
  • perform a separate image pre-processing step on the Engine's hPage page, such as kRecDeskewImg, kRecRotateImg, kRecInvertImgArea. (Use kRecPreprocessImg instead if you need progress monitoring),
  • transform the hPage to a new one, such as kRecConvertImg2BW or kRecTransformImg,
  • transfer an image line-by-line between the image management module of the Engine and the application, such as kRecWriteImg, kRecReadImg, etc.
A timeout mechanism has been implemented for some processes. For more information see the kRecSetTimeOut function.
Recognition modules typically activate the PID_RECOGNITION2 process. The PID_RECOGNITION1 process is activated by the RM_OMNIFONT_MOR recognition module; PID_RECOGNITION3 process is activated by the RM_OMNIFONT_PLUS3W recognition module.
Enumerator
PID_IMGINPUT | Identifies the Image loading process. The source can be the scanner, image file or image stored in the application buffer (application memory); kRecLoadImg, kRecLoadImgF.
PID_IMGSAVE | Identifies the image saving process. During this process the image or a part of it is saved to an image file; kRecSaveImg.
PID_IMGPREPROCESS | Identifies the Image preprocessing process; kRecPreprocessImg.
PID_DECOMPOSITION | Identifies the page-layout decomposition process; kRecLocateZones.
PID_RECOGNITION1 | Identifies the 1st pass of the Recognition process; kRecRecognize.
PID_RECOGNITION2 | Identifies the 2nd pass of the Recognition process; kRecRecognize using recognition engine PLUS2W or PLUS3W.
PID_RECOGNITION3 | 3rd pass of the Recognition process using recognition engine PLUS3W.
PID_SPELLING | Identifies the Checking process.
PID_FORMATTING | Page and Document formatting.
PID_WRITEFOUTDOC | Identifies the process for writing the recognized text to the final output document (to file or to memory); RecConvert2Doc.
PID_CONVERTIMG | Identifies the image conversion process activated by the PID_WRITEFOUTDOC process for saving the image of a graphical image zone to the word processor output document; RecConvert2Doc.
PID_SCANNER_WARMUP | scanner is warming up.

Function Documentation

◆ kRecCreateSettingsCollection()

int RECAPIKRN kRecCreateSettingsCollection ( int sid )

Creating a new Settings Collection.

A Settings Collection is a container of the values of all settings of all modules of KernelAPI/APIPlus. See the settings API in KrnStsApi.h. All functions that have an effect on settings or are affected by settings receive a Settings Collection ID in the parameter list.

Parameters
[in] sid The parent collection. If it is -1, the new collection will contain the settings with their default values. If it is the ID of an already existing collection, the values will be copied from it.
Return values
int ID of the created Settings Collection. -1 means CSDK cannot create new Settings Collection. The upper limit of the number of Settings Collections is 1000, however CSDK cannot create a new one also after kRecQuit (or before kRecInit).
Note
The specification of this function in C# is:
int kRecCreateSettingsCollection(int sid);
kRecCreateSettingsCollection
int RECAPIKRN kRecCreateSettingsCollection(int sid)
Creating a new Settings Collection.
The specification of this function in Java is:
int kRecCreateSettingsCollection(int sid)
The specification of this function in Python is:
def kRecCreateSettingsCollection(sid: int) -> int

◆ kRecDeleteSettingsCollection()

RECERR RECAPIKRN kRecDeleteSettingsCollection ( int sid )

Deleting a Settings Collection.

The kRecDeleteSettingsCollection function deletes the specified collection.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
See the description of Settings Collections.
The specification of this function in C# is:
RECERR kRecDeleteSettingsCollection(int sid);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecDeleteSettingsCollection
RECERR RECAPIKRN kRecDeleteSettingsCollection(int sid)
Deleting a Settings Collection.
The specification of this function in Java is:
int kRecDeleteSettingsCollection(int sid)
The specification of this function in Python is:
def kRecDeleteSettingsCollection(sid: int) -> int

◆ kRecFree()

RECERR RECAPIKRN kRecFree ( void * pArray )

Freeing memory objects.

The kRecFree function frees the memory object previously made available to the application with the assistance of a KernelAPI function.

Parameters
[in] pArray Pointer to the data to be released.
Return values
RECERR
Note
pArray could be a pointer retrieved by any of the following functions: kRecGetLetters, kRecGetChoiceStr, kRecGetSuggestionStr, kRecGetFontFaceStr, kRecGetLetterPalette, kRecGetOCRZoneText, kRecGetOCRTableCellText, kRecGetImgArea, kRecGetImgAreaEx, kRecRotateImgArea, kRecRemovePunchHoles, kRecGetZoneLayout, kRecGetOCRZoneLayout, kRecGetZoneNodeArray, kRecGetOCRZoneNodeArray, kRecGetHSplitters, kRecGetVSplitters, kRecGetCombCells, kRecGetZoneName, kRecGetOCRZoneName, kRecGetCellName, kRecGetOCRCellName, kRecGetZoneAttribute, kRecGetOCRZoneAttribute, kRecGetNextZoneAttribute, kRecGetNextOCRZoneAttribute, kRecGetZoneFormFieldName, kRecGetOCRZoneFormFieldName, kRecGetFormTemplateName, kRecGetTemplateAttribute, kRecGetNextTemplateAttribute, kRecGetAnchorText, kRecGetAnchorRegExp, kRecGetFindFormTemplateInfo, kRecGetMatchingInfo, kRecGetOCRZoneFormRecognitionState, kRecClassifyPage, kRecClassifyText, kRecClassifyDocument, kRecConvertUnicode2CodePageEx, kRecConvertCodePage2UnicodeEx, kRecGetStringSetting, kRecGetLastErrorEx.
There is no such function in C#

◆ kRecGetDoubleSetting()

RECERR RECAPIKRN kRecGetDoubleSetting | ( | int | sid,
 |  | LPCTSTR | setting,
 |  | double * | the_value )

Accessing the current value of an STS_DOUBLE setting.

This function gets the value of the named double setting in the given Settings Collection.

Parameters
[in] | sid | Settings Collection ID.
[in] | setting | Name of the setting.
[out] | the_value | Address of a variable to get the value of the setting.
Return values
RECERR
Note
This function does the same as kRecSettingGetHandle followed by kRecSettingGetDouble.
The specification of this function in C# is:
RECERR kRecGetDoubleSetting(int sid, string setting, out double the_value);
kRecGetDoubleSetting
RECERR RECAPIKRN kRecGetDoubleSetting(int sid, LPCTSTR setting, double *the_value)
Accessing the current value of an STS_DOUBLE setting.
The specification of this function in Java is:
int kRecGetDoubleSetting(int sid, String setting, double[] the_value)
The specification of this function in Python is:
def kRecGetDoubleSetting(sid: int, setting: str) -> Tuple[int, "float"]

◆ kRecGetIntSetting()

RECERR RECAPIKRN kRecGetIntSetting | ( | int | sid,
 |  | LPCTSTR | setting,
 |  | int * | the_value )

Accessing the current value of an STS_INT or STS_ENUM or STS_BOOL setting.

This function gets the value of the named integer, enum or boolean setting in the given Settings Collection.

Parameters
[in] | sid | Settings Collection ID.
[in] | setting | Name of the setting.
[out] | the_value | Address of a variable to get the value of the setting.
Return values
RECERR
Note
This function does the same as kRecSettingGetHandle followed by kRecSettingGetInt.
The specification of this function in C# is:
RECERR kRecGetIntSetting(int sid, string setting, out int the_value);
kRecGetIntSetting
RECERR RECAPIKRN kRecGetIntSetting(int sid, LPCTSTR setting, int *the_value)
Accessing the current value of an STS_INT or STS_ENUM or STS_BOOL setting.
The specification of this function in Java is:
int kRecGetIntSetting(int sid, String setting, int[] the_value)
The specification of this function in Python is:
def kRecGetIntSetting(sid: int, setting: str) -> Tuple[int, int]

◆ kRecGetModulesInfo()

RECERR RECAPIKRN kRecGetModulesInfo | ( | LPKRECMODULEINFO * | ppModules,
 |  | size_t * | pSize )

Getting module information.

The kRecGetModulesInfo function obtains information about the available modules of Engine.

Parameters
[in] | ppModules | Address of a pointer to the module information array.
[in] | pSize | Address of a variable holding the number of module information structures.
Return values
RECERR
Note
You may want to invoke this function just after calling the kRecInit function to see if any module initialization failed AND/OR to get the module version numbers. When the application uses the Engine's scanning services, call this function after calling the kRecScanInit function in order to get correct module information for the RSD scanning module. (See also scanner usage.)
During the initialization call, the engine tries to initialize all the modules. There can be two reasons why a module is not reported as available: when the module is missing or not licensed on that particular computer. When a module or one of its important files is missing, the initialization of that module fails. When there is no license for a module, even if all its files are present in the Engine binary directory, the initialization of that module fails.
If there is a zone whose associated recognition module has not been initialized/loaded properly, the kRecRecognize function returns with NO_TXT_WARN, signaling that there is at least one zone on the image whose content could not be recognized due to a non-functioning recognition module.
Example for checking the availability of OMR and PLUS3W modules:
LPKRECMODULEINFO pModules;
size_t size;
INTBOOL bOMR_available = FALSE;
INTBOOL bPLUS_available = FALSE;
RECERR rc;
rc = kRecSetLicense(YOUR_LICENSE_FILE, YOUR_OEM_CODE);
if (REC_OK)
rc = kRecInit(YOUR_COMPANY, YOUR_PRODUCT);
if ((rc != REC_OK) && (rc != API_INIT_WARN) && (rc != API_LICENSEVALIDATION_WARN)) {
printf("Engine initialization failed: %d.\n", rc);
return;
} else if (rc == API_INIT_WARN) {
printf("Warning. Module initialization problem.\n");
} else if (rc == API_LICENSEVALIDATION_WARN) {
printf("End of grace period is coming...\n");
}
rc = kRecGetModulesInfo(&pModules, &size);
if (pModules[INFO_OMR].Version > 0) {
bOMR_available = TRUE;
}
if (pModules[INFO_PLUS3W].Version > 0) {
bPLUS_available = TRUE;
}
API_INIT_WARN
@ API_INIT_WARN
Module initialization warning.
Definition RECERR_doc.h:67
REC_OK
@ REC_OK
Successful operation, no error.
Definition RECERR_doc.h:20
API_LICENSEVALIDATION_WARN
@ API_LICENSEVALIDATION_WARN
License cannot be validated.
Definition RECERR_doc.h:95
kRecSetLicense
RECERR RECAPIKRN kRecSetLicense(LPCTSTR pLicenseFile, LPCTSTR pCode)
Setting the OEM license information.
kRecInit
RECERR RECAPIKRN kRecInit(LPCTSTR pCompanyName, LPCTSTR pProductName)
Initializing KernelAPI.
kRecGetModulesInfo
RECERR RECAPIKRN kRecGetModulesInfo(LPKRECMODULEINFO *ppModules, size_t *pSize)
Getting module information.
INFO_OMR
@ INFO_OMR
Definition KernelApi.h:155
INFO_PLUS3W
@ INFO_PLUS3W
Definition KernelApi.h:182
KRECMODULEINFO
Module info.
Definition KernelApi.h:194
The specification of this function in C# is:
RECERR kRecGetModulesInfo(out KRECMODULEINFO[] ppModules);
The specification of this function in Java is:
int kRecGetModulesInfo(ModuleInfoArray ppModules)
The specification of this function in Python is:
def kRecGetModulesInfo() -> Tuple[int, "ModuleInfoArray"]

◆ kRecGetSerialNumber()

RECERR RECAPIKRN kRecGetSerialNumber | ( | LPTSTR | pSn,
 |  | size_t | buflen )

The kRecGetSerialNumber function is used to learn the serial number string of the OmniPage CSDK v2025.1. The Serial number is unique for each OmniPage CSDK v2025.1 package.

Parameters
[out] | pSn | Pointer to a buffer containing the serial number string.
[in] | buflen | Size of the buffer.
Return values
RECERR
Note
The Serial number is a 23-character long string including the terminating zero.
This function can only be used to learn the Serial number of the base toolkit - but not those of add-ons.
The specification of this function in C# is:
RECERR kRecGetSerialNumber(out string sn);
kRecGetSerialNumber
RECERR RECAPIKRN kRecGetSerialNumber(LPTSTR pSn, size_t buflen)
The specification of this function in Java is:
int kRecGetSerialNumber(String[] pSn)
The specification of this function in Python is:
def kRecGetSerialNumber() -> Tuple[int, str]

◆ kRecGetStringSetting()

RECERR RECAPIKRN kRecGetStringSetting | ( | int | sid,
 |  | LPCTSTR | setting,
 |  | LPTSTR * | the_value )

Accessing the current value of an STS_STRING or STS_USTRING setting.

This function gets the value of the named string setting in the given Settings Collection.

Parameters
[in] | sid | Settings Collection ID.
[in] | setting | Name of the setting.
[out] | the_value | Address of a pointer to a string which is allocated and filled by this function. The allocated memory must be released with kRecFree.
Return values
RECERR
Note
This function is similar to kRecSettingGetHandle followed by kRecSettingGetString or kRecSettingGetUString. The main difference is that this function allocates memory for the returned string. This memory must be released with kRecFree when it is no longer needed.
This function can accept both STS_STRING (UTF-8) and STS_USTRING (UTF-16) settings. The returned string is automatically converted to ANSI or Unicode, if needed.
The specification of this function in C# is:
RECERR kRecGetStringSetting(int sid, string setting, out string the_value);
kRecGetStringSetting
RECERR RECAPIKRN kRecGetStringSetting(int sid, LPCTSTR setting, LPTSTR *the_value)
Accessing the current value of an STS_STRING or STS_USTRING setting.
The specification of this function in Java is:
int kRecGetStringSetting(int sid, String setting, String[] the_value)
The specification of this function in Python is:
def kRecGetStringSetting(sid: int, setting: str) -> Tuple[int, str]

◆ kRecGetTimeOut()

RECERR RECAPIKRN kRecGetTimeOut | ( | int | sid,
 |  | LPDWORD | pTimeOut )

Getting timeout period.

The kRecGetTimeOut function gets the timeout period.

Parameters
[in] | sid | Settings Collection ID.
[out] | pTimeOut | Time out period in milliseconds.
Return values
RECERR
Note
This function gets the value of the setting Kernel.Timeout. This setting can be changed by kRecSetTimeOut.
The specification of this function in C# is:
RECERR kRecGetTimeOut(int sid, out uint TimeOut);
kRecGetTimeOut
RECERR RECAPIKRN kRecGetTimeOut(int sid, LPDWORD pTimeOut)
Getting timeout period.
The specification of this function in Java is:
int kRecGetTimeOut(int sid, long[] pTimeOut)
The specification of this function in Python is:
def kRecGetTimeOut(sid: int) -> Tuple[int, int]

◆ kRecGetUILang()

RECERR RECAPIKRN kRecGetUILang | ( | char * | langbuff,
 |  | size_t | buffersize )

The kRecGetUILang function gets the language of message strings.

Parameters
[out] | langbuff | Contains the ISO/DIS 639-3 3-letter language ID of the UI language with a terminating zero. The default value is the machine's UI language.
[in] | buffersize | Size of the langbuff buffer. Should be 4 or more.
Return values
RECERR
Note
This function gets the value of the setting Global.UILanguage. This setting can be changed by kRecSetUILang.
The specification of this function in C# is:
RECERR kRecGetUILang(out string lang);
kRecGetUILang
RECERR RECAPIKRN kRecGetUILang(char *langbuff, size_t buffersize)
The specification of this function in Java is:
int kRecGetUILang(String[] langbuff)
The specification of this function in Python is:
def kRecGetUILang() -> Tuple[int, str]

◆ kRecGetVersion()

int RECAPIKRN kRecGetVersion ( void )

Getting version.

The kRecGetVersion function gets the version of RecAPI.

Return values
int The version number.
Note
The specification of this function in C# is:
int kRecGetVersion();
kRecGetVersion
int RECAPIKRN kRecGetVersion(void)
Getting version.
The specification of this function in Java is:
int kRecGetVersion()
The specification of this function in Python is:
def kRecGetVersion() -> int

◆ kRecInit()

RECERR RECAPIKRN kRecInit | ( | LPCTSTR | pCompanyName,
 |  | LPCTSTR | pProductName )

Initializing KernelAPI.

The kRecInit function initializes the OmniPage CSDK. Except for (kRecSetLicense, kRecGetVersion) the functions of KernelAPI should not be called before initialization. This function enumerates the modules installed in the Engine Binary directory, determines the configuration of the Engine and initializes its modules. Use this function to implicitly bind the Engine to the application. When this function is used for the Engine initialization, the KernelAPI.lib (on Windows), libkernelapi.so (on Linux), or libkernelapi.dylib (on MacOS) import library must be linked to the application.

Parameters
[in] | pCompanyName | Name of the User's Company. It can be NULL. Default value on Windows systems: OmniPage, on Linux systems: omnipage, on MacOS: OmniPage. It is used for creating a company-specific working folder for temporary and other files generated by KernelAPI.
[in] | pProductName | Name of the Product or Application. It can be NULL. Default value on Windows systems: CSDK22, on Linux systems: csdk-2025.1, on MacOS: CSDK-2025.1. It is used for creating an application-specific working folder for temporary and other files generated by KernelAPI.
Return values
RECERR
Note
Calling the kRecInit from a DllMain function of a DLL is prohibited.
The return value may be API_INIT_WARN, which means an error in initialization of one of the modules. The kRecGetModulesInfo can give information about the initialization of each module. This is not an error, because the User's application may not require the module in question.
The return value may be API_LICENSEVALIDATION_WARN, which means the license validation cannot be checked and grace period will be expired in less than 30 days.
This function DOES NOT initialize the scanning module, its initialization requires a separate kRecScanInit function call.
You can speed up Engine initialization by removing superfluous modules from the Engine Binary directory. Supported on: Windows.
An alternative way for binding and initializing the Engine can be the module KernelAPIS. Supported on: Windows.
The specification of this function in C# is:
RECERR kRecInit(string companyName, string productName);
The specification of this function in Java is:
int kRecInit(String pCompanyName, String pProductName)
The specification of this function in Python is:
def kRecInit(pCompanyName: Optional[str], pProductName: Optional[str], csdkPath: Optional[str] = None) -> int

◆ kRecLoadSettings()

RECERR RECAPIKRN kRecLoadSettings | ( | int | sid,
 |  | LPCTSTR | pFileName )

Loading settings.

This function loads settings from a settings file into StsMan.

Parameters
[in] | sid | Settings Collection ID.
[in] | pFileName | Filename of the setting file to be loaded.
Return values
RECERR
Note
This function sets all the settings to default and after this, it does the same as kRecSettingLoad.
The specification of this function in C# is:
RECERR kRecLoadSettings(int sid, string pFileName);
kRecLoadSettings
RECERR RECAPIKRN kRecLoadSettings(int sid, LPCTSTR pFileName)
Loading settings.
The specification of this function in Java is:
int kRecLoadSettings(int sid, String pFileName)
The specification of this function in Python is:
def kRecLoadSettings(sid: int, pFileName: str) -> int

◆ kRecQuit()

RECERR RECAPIKRN kRecQuit ( void )

Closing KernelAPI.

The kRecQuit function stops the OmniPage CSDK. It frees all the resources allocated by the Engine.

Return values
RECERR
Note
If the scanning module was also initialized, it requires a separate kRecScanQuit call.
The return value may be API_INIT_WARN, which means the OmniPage CSDK is not initialized.
The function kRecQuit removes all the Settings Collections, pending and user settings, and sets the remaining settings to default, so the setting states are the same after every subsequent kRecQuit - kRecInit pair. In previous versions of CSDK the kRecQuit did not perform these steps, thus after a subsequent kRecInit all the settings existed and had the same value as before the previous kRecQuit. This behaviour can be simulated in CSDK v16 or later doing a workaround: Before kRecQuit:
  1. save the required setting values from the required Settings Collections,
After kRecInit:
  1. create all the required user settings,
  2. create the required Settings Collections,
  3. load the proper setting files into the proper Settings Collections.
The specification of this function in C# is:
RECERR kRecQuit();
kRecQuit
RECERR RECAPIKRN kRecQuit(void)
Closing KernelAPI.
The specification of this function in Java is:
int kRecQuit()
The specification of this function in Python is:
def kRecQuit() -> int

◆ kRecSaveSettings()

RECERR RECAPIKRN kRecSaveSettings | ( | int | sid,
 |  | LPCTSTR | pFileName )

Saving settings of KernelAPI.

This function saves the settings.

Parameters
[in] | sid | Settings Collection ID.
[in] | pFileName | File name of the setting file to be saved.
Return values
RECERR
Note
This function does the same as kRecSettingSave, when latter gets NULL for root HSETTING with a FALSE save-all and a FALSE append parameter. kRecSaveSettings is only for compatibility.
The specification of this function in C# is:
RECERR kRecSaveSettings(int sid, string pFileName);
kRecSaveSettings
RECERR RECAPIKRN kRecSaveSettings(int sid, LPCTSTR pFileName)
Saving settings of KernelAPI.
The specification of this function in Java is:
int kRecSaveSettings(int sid, String pFileName)
The specification of this function in Python is:
def kRecSaveSettings(sid: int, pFileName: str) -> int

◆ kRecSetCBProgMon()

RECERR RECAPIKRN kRecSetCBProgMon | ( | int | sid,
 |  | LPPROGMON_CB | pCallBack,
 |  | void * | pContext )

Setting progress monitor.

The kRecSetCBProgMon functions sets the progress monitor callback function. The callback function is implemented by the application.

Parameters
[in] | sid | Settings Collection ID.
[in] | pCallBack | Pointer to a function. This function will be called for every progress indication.
[in] | pContext | This pointer value will be passed to the callback function as the 2nd parameter.
Return values
RECERR
Note
If the application is sensitive to processing time it may be more useful to avoid the usage of progress callback.
// A callback function for progress monitoring
RECERR RECKRNCALL ProgressIndi(LPPROGRESSMONITOR mon, void *pContext)
{
int id = (int)mon->ProcessId;
wsprintf(buff, "PROCESSID: %d %d%%",id, mon->Percent);
// Update progress monitoring status on the screen here!
if (USER_ABORT) {
return API_PROCESS_ABORTED_ERR;
}
...
return REC_OK;
}
API_PROCESS_ABORTED_ERR
@ API_PROCESS_ABORTED_ERR
Application has aborted the current process.
Definition RECERR_doc.h:68
PROGRESSMONITOR
Progress information.
Definition KernelApi.h:858
PROGRESSMONITOR::ProcessId
PROCESSID ProcessId
Definition KernelApi.h:859
Note
The specification of this function in C# is:
RECERR kRecSetCBProgMon(int sid, PROGMON_CB callback);
PROGMON_CB
RECERR RECKRNCALL PROGMON_CB(LPPROGRESSMONITOR mod, void *pContext)
The user-written progress monitoring callback function.
Definition KernelApi.h:891
kRecSetCBProgMon
RECERR RECAPIKRN kRecSetCBProgMon(int sid, LPPROGMON_CB pCallBack, void *pContext)
Setting progress monitor.
The specification of this function in Java is:
int kRecSetCBProgMon(int sid, ProgressMonitorCallback pCallback)
The specification of this function in Python is:
def kRecSetCBProgMon(sid: int, pCallback: "ProgressMonitorCallback") -> int

◆ kRecSetDataPath()

RECERR RECAPIKRN kRecSetDataPath ( LPCTSTR datapath )

Setting the path of the data files.

There may be some cases, when the library files and the data files cannot be in the same folder (e.g. on Android platform). In such a case this function can be used for specifying the path of the data files.

  • On Android platform this has to be set by the User.
  • On MacOS platform this is automatically found inside the framework by the OP CSDK. So this function is typically not necessary to be called.
  • On Windows, Linux, and Embedded Linux platforms, the data files are automatically found either in the library path, or in the library folder's child or sibling folder named Data. Use this function only when the data files are in a different folder.
    Parameters
    [in] datapath absolute path name of the data path.
    Return values
    RECERR
    Note
    See also kRecSetLibraryPath.
    The specification of this function in C# is:
    RECERR kRecSetDataPath(string dataPath);
    kRecSetDataPath
    RECERR RECAPIKRN kRecSetDataPath(LPCTSTR datapath)
    Setting the path of the data files.
    The specification of this function in Java is:
    int kRecSetDataPath(String datapath)
    The specification of this function in Python is:
    def kRecSetDataPath(datapath: str) -> int

◆ kRecSetDefaults()

RECERR RECAPIKRN kRecSetDefaults ( int sid )

Changing settings of KernelAPI to default.

This function changes the settings of the KernelAPI (i.e. the subtree under the node "Kernel" of the setting tree) to their default values.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
This function does the same as kRecSettingSetToDefault, when latter gets the HSETTING of node "Kernel" with a TRUE whole-subtree parameter. It is only for compatibility.
The specification of this function in C# is:
RECERR kRecSetDefaults(int sid);
kRecSetDefaults
RECERR RECAPIKRN kRecSetDefaults(int sid)
Changing settings of KernelAPI to default.
The specification of this function in Java is:
int kRecSetDefaults(int sid)
The specification of this function in Python is:
def kRecSetDefaults(sid: int) -> int

◆ kRecSetDoubleSetting()

RECERR RECAPIKRN kRecSetDoubleSetting | ( | int | sid,
 |  | LPCTSTR | setting,
 |  | double | new_value )

Setting the value of an STS_DOUBLE setting.

This function sets the value of the named double setting in the given Settings Collection.

Parameters
[in] | sid | Settings Collection ID.
[in] | setting | Name of the setting.
[in] | new_value | The new value to be set.
Return values
RECERR
Note
This function does the same as kRecSettingGetHandle followed by kRecSettingSetDouble.
The specification of this function in C# is:
RECERR kRecSetDoubleSetting(int sid, string setting, double new_value);
kRecSetDoubleSetting
RECERR RECAPIKRN kRecSetDoubleSetting(int sid, LPCTSTR setting, double new_value)
Setting the value of an STS_DOUBLE setting.
The specification of this function in Java is:
int kRecSetDoubleSetting(int sid, String setting, double new_value)
The specification of this function in Python is:
def kRecSetDoubleSetting(sid: int, setting: str, new_value: "float") -> int

◆ kRecSetIntSetting()

RECERR RECAPIKRN kRecSetIntSetting | ( | int | sid,
 |  | LPCTSTR | setting,
 |  | int | new_value )

Setting the value of an STS_INT or STS_ENUM or STS_BOOL setting.

This function sets the value of the named integer, enum or boolean setting in the given Settings Collection.

Parameters
[in] | sid | Settings Collection ID.
[in] | setting | Name of the setting.
[in] | new_value | The new value to be set.
Return values
RECERR
Note
This function does the same as kRecSettingGetHandle followed by kRecSettingSetInt.
The specification of this function in C# is:
RECERR kRecSetIntSetting(int sid, string setting, int new_value);
kRecSetIntSetting
RECERR RECAPIKRN kRecSetIntSetting(int sid, LPCTSTR setting, int new_value)
Setting the value of an STS_INT or STS_ENUM or STS_BOOL setting.
The specification of this function in Java is:
int kRecSetIntSetting(int sid, String setting, int new_value)
The specification of this function in Python is:
def kRecSetIntSetting(sid: int, setting: str, new_value: int) -> int

◆ kRecSetLibraryPath()

RECERR RECAPIKRN kRecSetLibraryPath ( LPCTSTR libpath )

Setting the path of the library files.

There may be some cases, when the library files and the data files cannot be in the same folder (e.g. on Android platform). In such a case this function may be used for specifying the path of the library files.

  • On Android platform this has to be set by the User.
  • On Linux, Embedded Linux and MacOS platforms this is automatically found by the OP CSDK, so this function is not suggested to be called.
  • On Windows this function is not supported.
    Parameters
    [in] libpath absolute path name of the library path.
    Return values
    RECERR
    Note
    This function is available only on Linux, Embedded Linux, MacOS and Android.
    See also kRecSetDataPath.
    The specification of this function in C# is:
    RECERR kRecSetLibraryPath(string libPath);
    kRecSetLibraryPath
    RECERR RECAPIKRN kRecSetLibraryPath(LPCTSTR libpath)
    Setting the path of the library files.
    The specification of this function in Java is:
    int kRecSetLibraryPath(String libpath)
    The specification of this function in Python is:
    def kRecSetLibraryPath(libpath: str) -> int

◆ kRecSetLicense()

RECERR RECAPIKRN kRecSetLicense | ( | LPCTSTR | pLicenseFile,
 |  | LPCTSTR | pCode )

Setting the OEM license information.

The kRecSetLicense function sets the OEM license information. In the case of an OEM distribution this function must be called before kRecInit.

Parameters
[in] | pLicenseFile | Name of the license file or the fully qualified path to the license file (an LCX or LCXZ file). This parameter can be NULL if the OEM license file is loaded by OPLicMgr or OmniPage License Agent used, but this functioning is not suggested.
[in] | pCode | OEM Code string. (It is a pointer to the string itself, not to the file name containing the OEM Code!)
Return values
RECERR
Note
If the integrating application calls more than one kRecInit kRecQuit pair subsequently, this function is required to be called only before the first kRecInit.
The return value may be API_INIT_WARN, which means that OmniPage CSDK has been already initialized.
Licensing is fully described in the General Information help system.
  1. Development Licensing on Windows: this function must not be called.
    (Note that in case of other operating systems development licenses are OEM-type ones that are processed by this function. See Platforms.)
  2. Seat Licensing: this function must not be called.
  3. OEM Licensing: The license file itself and a C header file containing the OEM Code string are generated by the OPLicMgr. This type of licensing enables pre-activated licensing. It eliminates the need for on-site license activation that is necessary with Seat Licensing.
If pLicenseFile is neither NULL nor a full path file name but a relative path or simply a file name without any path components then the Engine searches for the license file in different directories in the following order:
  1. Next to the application itself (exe file in Windows).
  2. Next to the Engine libraries (dll files in Windows). In several cases this is the same as the previous path.
  3. In a common OmniPage CSDK directory inside the COMMON_APPDATA folder. This folder depends on the OS:
    • Windows: the "OmniPage\\\productname\\" subdirectory under the path returned by SHGetFolderPath(NULL, CSIDL_COMMON_APPDATA, NULL, 0, folderBuffer);
    • Linux: $HOME/.omnipage-csdk-2025.1
    • MacOS: $HOME/.OmniPage-CSDK-2025.1
    (The current working directory is not searched as that is likely to be unsuitable!) (In later versions of the Engine the numeric value in the above paths will change to reflect the actual version.)
The specification of this function in C# is:
RECERR kRecSetLicense(string pLicenseFile, string pCode);
The specification of this function in Java is:
int kRecSetLicense(String pLicenseFile, String pCode)
The specification of this function in Python is:
def kRecSetLicense(pLicenseFile: str, pCode: str) -> int

◆ kRecSetSandboxHomePath()

RECERR RECAPIKRN kRecSetSandboxHomePath ( const char * homepath )

Setting the Sandbox path on MacOS.

The kRecSetSandboxHomePath function sets the Sandbox Home path. This function must be called before any other functions.

Parameters
[in] homepath The application's Home path as returned by the NSHomeDirectory function. The string must be converted to UTF-8 by the UTF8String message.
Return values
RECERR
Note
In most cases the OmniPage CSDK finds the Sandbox home path correctly by reading the HOME environment variable, but sometimes this variable is missing. For correct operations you have to use this function for example this way in Objective-C:
kRecSetSandboxHomePath([NSHomeDirectory() UTF8String]);
kRecSetSandboxHomePath
RECERR RECAPIKRN kRecSetSandboxHomePath(const char *homepath)
Setting the Sandbox path on MacOS.
This function is available on MacOS only

◆ kRecSetSandboxTempPath()

RECERR RECAPIKRN kRecSetSandboxTempPath ( const char * temppath )

Setting the Sandbox temporary path on MacOS.

The kRecSetSandboxTempPath function sets the Sandbox Temporary path. This function must be called after kRecSetSandboxHomePath and before any other functions.

Parameters
[in] temppath The application's Temporary path as returned by the NSTemporaryDirectory function. The string must be converted to UTF-8 by the UTF8String message.
Return values
RECERR
Note
In most cases the OmniPage CSDK finds the Sandbox temporary path correctly by reading the TMPDIR environment variable, but sometimes this variable is missing. For correct operations you have to use this function for example this way in Objective-C:
kRecSetSandboxTempPath([NSTemporaryDirectory() UTF8String]);
kRecSetSandboxTempPath
RECERR RECAPIKRN kRecSetSandboxTempPath(const char *temppath)
Setting the Sandbox temporary path on MacOS.
This function is available on MacOS only

◆ kRecSetStringSetting()

RECERR RECAPIKRN kRecSetStringSetting | ( | int | sid,
 |  | LPCTSTR | setting,
 |  | LPCTSTR | new_value )

Setting the value of an STS_STRING or STS_USTRING setting.

This function sets the value of the named string setting in the given Settings Collection.

Parameters
[in] | sid | Settings Collection ID.
[in] | setting | Name of the setting.
[in] | new_value | The new value to be set. It will be copied into an internal buffer in StsMan.
Return values
RECERR
Note
This function does the same as kRecSettingGetHandle followed by kRecSettingSetString.
This function can accept both STS_STRING and STS_USTRING settings. The given new_value is automatically converted to either UTF-8 or 16-bit Unicode, if needed.
The specification of this function in C# is:
RECERR kRecSetStringSetting(int sid, string setting, string new_value);
kRecSetStringSetting
RECERR RECAPIKRN kRecSetStringSetting(int sid, LPCTSTR setting, LPCTSTR new_value)
Setting the value of an STS_STRING or STS_USTRING setting.
The specification of this function in Java is:
int kRecSetStringSetting(int sid, String setting, String new_value)
The specification of this function in Python is:
def kRecSetStringSetting(sid: int, setting: str, new_value: str) -> int

◆ kRecSetTimeOut()

RECERR RECAPIKRN kRecSetTimeOut | ( | int | sid,
 |  | DWORD | TimeOut )

Setting timeout period.

The kRecSetTimeOut function sets the time out period for different tasks.

Parameters
[in] | sid | Settings Collection ID.
[in] | TimeOut | Timeout period in milliseconds. The suggested minimum limit of this setting is 50 milliseconds, but it may be useful to set the timeout higher on server operating systems.
Return values
RECERR
Note
The value specified here allows a module to process an image for no longer than the time specified. When the TimeOut value is reached, the Engine terminates the running of the appropriate module and resets it. The calling function returns with the API_TIMEOUT_ERR return code to the integrating application signaling that the processing of the image could not be successfully completed.
This feature is applied to the following processes:
  • image pre-processing (PID_IMGPREPROCESS process),
  • page-layout decomposition, also known as auto-zoning or page parsing (PID_DECOMPOSITION), and
  • recognition (PID_RECOGNITION1, PID_RECOGNITION2 and PID_RECOGNITION3 processes).
The description of timeout handling gives more information e.g. about hard timeout. See also the tutorial.
Though disabling the Engine timeout feature (by calling this function with the INFINITE parameter) may speed up the Engine's initialization, it is recommended to enable the watch-dog mechanism.
If this function is not called to specify the module timeout setting, the default value of this setting, 180000 milliseconds (3 minutes), is applied, i.e. no internal process will be allowed to continue for more than three minutes.
If the application is sensitive to processing time, set the time-out to -1 (INFINITE). In this case, no watch-dog thread will be started and there will not be thread context switches in progress callbacks.
This function sets the value of the setting Kernel.Timeout. This setting can be retrieved by kRecGetTimeOut.
The specification of this function in C# is:
RECERR kRecSetTimeOut(int sid, uint TimeOut);
kRecSetTimeOut
RECERR RECAPIKRN kRecSetTimeOut(int sid, DWORD TimeOut)
Setting timeout period.
The specification of this function in Java is:
int kRecSetTimeOut(int sid, long TimeOut)
The specification of this function in Python is:
def kRecSetTimeOut(sid: int, TimeOut: int) -> int

◆ kRecSetUILang()

RECERR RECAPIKRN kRecSetUILang ( const char * lang )

Setting the language of displayed information.

The kRecSetUILang function sets the language of message strings.

Parameters
[in] lang ID of the language. This is any language description string accepted by kRecFindLanguage or kRecFindLanguageEx. Use NULL to reset to the default UI language of the user's machine.
Return values
RECERR
Note
This function sets the value of the setting Global.UILanguage. This setting can be retrieved by kRecGetUILang.
If the specified language is illegal then the function returns an error and English is used. See also the kRecGetErrorUIText function.
The specification of this function in C# is:
RECERR kRecSetUILang(string lang);
kRecSetUILang
RECERR RECAPIKRN kRecSetUILang(const char *lang)
Setting the language of displayed information.
The specification of this function in Java is:
int kRecSetUILang(String lang)
The specification of this function in Python is:
def kRecSetUILang(lang: str) -> int


RecAPI: Error Handling Module

Enumerations | Functions
Error Handling Module
KernelAPI » General Operations Module

Error information. More...

Enumerations

enum RETCODEINFO {
RET_OK = 0 ,
RET_WARNING ,
RET_MEMORY_ERROR ,
RET_FILE_ERROR ,
RET_SCANNER_ERROR ,
RET_IMAGE_ERROR ,
RET_OCR_ERROR ,
RET_TEXT_ERROR ,
RET_OTHER_ERROR ,
RET_UNKNOWN = -1
}
Error code (return code) categories. More...
enum RECERR {
REC_OK = 0x00000000 ,
FILE_ERR = 0x8004C101 ,
FILE_SYNTAX_ERR = 0x8004C102 ,
FILE_OPEN_ERR = 0x8004C103 ,
FILE_NOTFOUND_ERR = 0x8004C104 ,
FILE_READ_ERR = 0x8004C105 ,
FILE_WRITE_ERR = 0x8004C106 ,
FILE_ACCESS_ERR = 0x8004C107 ,
FILE_REMOVE_ERR = 0x8004C108 ,
FILE_CREATE_ERR = 0x8004C109 ,
FILE_SEEK_ERR = 0x8004C10A ,
FILE_MEM_ERR = 0x8004C10B ,
FILE_DISKFULL_ERR = 0x8004C10C ,
FILE_IO_ERR = 0x8004C10D ,
FILE_SHARE_ERR = 0x8004C10E ,
FILE_ALREADYEXIST_ERR = 0x8004C10F ,
FILE_INVALIDFLAG_ERR = 0x8004C110 ,
FILE_INVALIDPARAMETER_ERR = 0x8004C111 ,
FILE_LOCKVIOLATION_ERR = 0x8004C112 ,
FILE_DIRNOTEMPTY_ERR = 0x8004C113 ,
FILE_INVALIDHANDLE_ERR = 0x8004C114 ,
FILE_TOOLARGE_ERR = 0x8004C115 ,
FILE_MUTEX_NOTAVAILABLE_ERR = 0x8004C116 ,
FILE_CANTCREATE_MUTEX_ERR = 0x8004C117 ,
FILE_CANTRELEASE_MUTEX_ERR = 0x8004C118 ,
FILE_INIT_ERR = 0x8004C119 ,
FILE_QUIT_ERR = 0x8004C11A ,
FILE_NOT_IMPLEMENTED_ERR = 0x8004C11B ,
FILE_INVALIDPOINTER_ERR = 0x8004C11C ,
FILE_INVALIDFUNCTION_ERR = 0x8004C11D ,
FILE_NOMORE_WARN = 0x0004C11E ,
MEM_NOTENOUGH_ERR = 0x8004C201 ,
MEM_INVALIDPOINTER_ERR = 0x8004C202 ,
CHR_ILLEGALCODE_ERR = 0x8004C301 ,
CHR_ILLEGALSETTING_ERR = 0x8004C302 ,
CHR_NOMORE_WARN = 0x0004C303 ,
CHR_SETFILE_ERR = 0x8004C304 ,
CHR_CODELENGTH_ERR = 0x8004C305 ,
CHR_MISSINGEXPORT_ERR = 0x8004C306 ,
CHR_LANGSET_CODEPAGE_ERR = 0x8004C307 ,
CHR_INIT_ERR = 0x8004C308 ,
CHR_MULTIPLELANG_FOUND_WARN = 0x0004C309 ,
CHR_LANG_NOTFOUND_ERR = 0x8004C30A ,
CHR_LANG_DISABLED_WARN = 0x0004C30B ,
API_INCORRECTMODULEVERSION_ERR = 0x8004C401 ,
API_INIT_ERR = 0x8004C402 ,
API_QUIT_ERR = 0x8004C403 ,
API_INIT_WARN = 0x0004C404 ,
API_PROCESS_ABORTED_ERR = 0x8004C405 ,
API_PROCESS_FINISH = 0x8004C406 ,
API_MODULEMISSING_ERR = 0x8004C407 ,
API_MODULELOAD_ERR = 0x8004C408 ,
API_MODULEENTRY_ERR = 0x8004C409 ,
API_MODULEINVALID_ERR = 0x8004C40A ,
API_MODULEINIT_ERR = 0x8004C40B ,
API_NOT_AVAILABLE_ERR = 0x8004C40C ,
API_ERROR_ERR = 0x8004C40D ,
API_GPFAULT_ERR = 0x8004C40E ,
API_PLATFORM_ERR = 0x8004C40F ,
API_STS_SYNTAX_ERR = 0x8004C410 ,
API_STS_ERR = 0x8004C411 ,
API_HARDLOCK_ERR = 0x8004C412 ,
API_LICENSE_ERR = 0x8004C413 ,
API_PARAMETER_ERR = 0x8004C414 ,
API_BUSY_ERR = 0x8004C415 ,
API_EVALDATE_EXPIRED_ERR = 0x8004C416 ,
API_TIMEOUT_ERR = 0x8004C417 ,
API_FILEFORMAT_ERR = 0x8004C418 ,
API_INVALIDSESSION_ERR = 0x8004C419 ,
NOT_IMPL_ERR = 0x8004C41A ,
API_DOTNET30_OR_LATER_MISSING_ERR = 0x8004C41B ,
API_CRYPT_MISS_WARN = 0x0004C41C ,
API_HARDTIMEOUT_ERR = 0x8004C41D ,
API_DOTNET40_OR_LATER_MISSING_ERR = 0x8004C41E ,
API_LICENSEMGR_ERR = 0x8004C41F ,
API_LICENSEVALIDATION_WARN = 0x0004C420 ,
API_LANGUAGE_SET_ERR = 0x8004C421 ,
API_ERRORS_HAPPENED_WARN = 0x0004C422 ,
API_WARNINGS_HAPPENED_WARN = 0x0004C423 ,
API_LICENSE_PAGECOUNT_ERR = 0x8004C424 ,
API_LICENSEMGR_PROTOCOL_ERR = 0x8004C425 ,
API_LICENSECONFIG_ERR = 0x8004C426 ,
API_NOTINITIALIZED_ERR = 0x8004C427 ,
API_LANG_REMOVED_WARN = 0x0004C428 ,
RSD_WARN = 0x0004C501 ,
RSD_INTERNAL = 0x8004C502 ,
RSD_FAIL = 0x8004C503 ,
RSD_NA = 0x8004C504 ,
RSD_ACCESS = 0x8004C505 ,
RSD_CORRUPTED = 0x8004C506 ,
RSD_NOMEMORY = 0x8004C507 ,
RSD_MEMORYFAIL = 0x8004C508 ,
RSD_NOFILE = 0x8004C509 ,
RSD_CREATEFAIL = 0x8004C50A ,
RSD_OPENFAIL = 0x8004C50B ,
RSD_READONLY = 0x8004C50C ,
RSD_READFAIL = 0x8004C50D ,
RSD_WRITEFAIL = 0x8004C50E ,
RSD_CLOSEFAIL = 0x8004C50F ,
RSD_FILECORRUPTED = 0x8004C510 ,
RSD_NOMSGFILE = 0x8004C511 ,
RSD_NOMESSAGE = 0x8004C512 ,
RSD_DLL_NOFILE = 0x8004C513 ,
RSD_DLL_FORMAT = 0x8004C514 ,
RSD_DLL_GETPROC = 0x8004C515 ,
RSD_NOTOPENED = 0x8004C516 ,
RSD_NOTLOADED = 0x8004C517 ,
RSD_NODRIVER = 0x8004C518 ,
RSD_BADVERSION = 0x8004C519 ,
RSD_DRIVERFAIL = 0x8004C51A ,
RSD_NOCARD = 0x8004C51B ,
RSD_BADHANDLE = 0x8004C51C ,
RSD_PARAMID = 0x8004C51D ,
RSD_PARAMVALUE = 0x8004C51E ,
RSD_BADADFCOMMAND = 0x8004C51F ,
RSD_WARNSTARTMODE = 0x0004C520 ,
RSD_BADSTARTMODE = 0x8004C521 ,
RSD_BADTRANSFER = 0x8004C522 ,
RSD_WARNPAPERSOURCE = 0x0004C523 ,
RSD_BADPAPERSOURCE = 0x8004C524 ,
RSD_WARNRESOLUTION = 0x0004C525 ,
RSD_BADRESOLUTION = 0x8004C526 ,
RSD_WARNMARGIN = 0x0004C527 ,
RSD_BADMARGIN = 0x8004C528 ,
RSD_WARNPAPERSIZE = 0x0004C529 ,
RSD_BADPAPERSIZE = 0x8004C52A ,
RSD_WARNORIENTATION = 0x0004C52B ,
RSD_BADORIENTATION = 0x8004C52C ,
RSD_WARNDUPLEX = 0x0004C52D ,
RSD_BADDUPLEX = 0x8004C52E ,
RSD_WARNIMAGEINTERP = 0x0004C52F ,
RSD_BADIMAGEINTERP = 0x8004C530 ,
RSD_BADCOLORINTERP = 0x8004C531 ,
RSD_BADHALFTONE = 0x8004C532 ,
RSD_WARNBRIGHTNESS = 0x0004C533 ,
RSD_BADBRIGHTNESS = 0x8004C534 ,
RSD_WARNCONTRAST = 0x0004C535 ,
RSD_BADCONTRAST = 0x8004C536 ,
RSD_BADMIDTONE = 0x8004C537 ,
RSD_WARNLAMPCOLOR = 0x0004C538 ,
RSD_BADLAMPCOLOR = 0x8004C539 ,
RSD_BADCOMPRESSION = 0x8004C53A ,
RSD_BADFILETYPE = 0x8004C53B ,
RSD_BADINDICATION = 0x8004C53C ,
RSD_CONFIGURATIONID = 0x8004C53D ,
RSD_HOSTID = 0x8004C53E ,
RSD_SCSIID = 0x8004C53F ,
RSD_BADPARAMCOMBO = 0x8004C540 ,
RSD_LINE_TOO_WIDE = 0x8004C541 ,
RSD_NOIMAGE = 0x8004C542 ,
RSD_BADIMAGEWIDTH = 0x8004C543 ,
RSD_BADIMAGELENGTH = 0x8004C544 ,
RSD_NOAUTOROTATE = 0x8004C545 ,
RSD_TRUNCATED = 0x8004C546 ,
RSD_NOTCAPABLE = 0x8004C547 ,
RSD_NOTCONNECTED = 0x8004C548 ,
RSD_NOTREADY = 0x8004C549 ,
RSD_NOPAPER = 0x8004C54A ,
RSD_PAPERJAM = 0x8004C54B ,
RSD_DOUBLEFEED = 0x8004C54C ,
RSD_COVEROPEN = 0x8004C54D ,
RSD_BOTHFEEDERSLOADED = 0x8004C54E ,
RSD_RESERVED = 0x8004C54F ,
RSD_NOTRESERVED = 0x8004C550 ,
RSD_SCANNERBUSY = 0x8004C551 ,
RSD_SCANNERSTOP = 0x8004C552 ,
RSD_SCANNERFAIL = 0x8004C553 ,
RSD_TIMEOUT = 0x8004C554 ,
RSD_USER_CANCELLED = 0x8004C555 ,
RSD_ABORTED = 0x8004C556 ,
RSD_NOTPOSSIBLE = 0x8004C557 ,
RSD_PAPERPICK = 0x8004C558 ,
IMF_READ_ERR = 0x8004C601 ,
IMF_WRITE_ERR = 0x8004C602 ,
IMF_INIT_ERR = 0x8004C603 ,
IMF_OPEN_ERR = 0x8004C604 ,
IMF_CLOSE_ERR = 0x8004C605 ,
IMF_CREATE_ERR = 0x8004C606 ,
IMF_MEMORY_ERR = 0x8004C607 ,
IMF_NOTSUP_ERR = 0x8004C608 ,
IMF_TAGMISSING_ERR = 0x8004C609 ,
IMF_COMP_ERR = 0x8004C60A ,
IMF_IMGFORM_ERR = 0x8004C60B ,
IMF_PAGENUM_ERR = 0x8004C60C ,
IMF_FILEFORMAT_ERR = 0x8004C60D ,
IMF_COLOR_ERR = 0x8004C60E ,
IMF_TMPFILE_ERR = 0x8004C60F ,
IMF_APPEND_ERR = 0x8004C610 ,
IMF_FILENOTEMPTY_ERR = 0x8004C611 ,
IMF_FAXVIEWMISS_ERR = 0x8004C612 ,
IMF_PASSWORD_WARN = 0x0004C613 ,
IMF_EMPTYHANDLE_WARN = 0x0004C614 ,
IMF_PDFAPPENDONLY_ERR = 0x8004C615 ,
IMF_READ_WARN = 0x0004C616 ,
IMF_COMP_WARN = 0x0004C617 ,
IMF_PASSWORD_SYNTAX_WARN = 0x0004C618 ,
IMF_PASSWORD_ERR = 0x8004C619 ,
IMF_CRYPT_NOTSUP_ERR = 0x8004C61A ,
IMF_FONT_MISSING_WARN = 0x0004C61B ,
IMF_PDFCHANGEDXREF_WARN = 0x0004C61C ,
IMF_FONT_MISSING_ERR = 0x8004C61D ,
IMG_SETTING_ERR = 0x8004C701 ,
IMG_NOTENOUGHMEMORY_ERR = 0x8004C702 ,
IMG_RECT_ERR = 0x8004C703 ,
IMG_DPI_ERR = 0x8004C704 ,
IMG_NOTFOUND_ERR = 0x8004C705 ,
IMG_COMPRESSED_ERR = 0x8004C706 ,
IMG_BITMAPADDRESS_ERR = 0x8004C707 ,
IMG_BITSPERPIXEL_ERR = 0x8004C708 ,
IMG_NOTATTACHED_ERR = 0x8004C709 ,
IMG_HANDLE_ERR = 0x8004C70A ,
IMG_BUFFEROVERFLOW_ERR = 0x8004C70B ,
IMG_ACCESS_ERR = 0x8004C70C ,
IMG_NOMORE_WARN = 0x0004C70D ,
IMG_SIZE_ERR = 0x8004C70E ,
IMG_INVALIDOP_ERR = 0x8004C70F ,
IMG_ZONE_ERR = 0x8004C710 ,
IMG_DPI_WARN = 0x0004C711 ,
IMG_ANCHOR_WARN = 0x0004C712 ,
IMG_ANCHORNOTFOUND_ERR = 0x8004C713 ,
IMG_NOTEXTZONE_WARN = 0x0004C714 ,
IMG_ANCHORNOTEXIST_ERR = 0x8004C715 ,
IMG_TEMPLATENOTMATCHED_ERR = 0x8004C716 ,
IMG_ANCHOR_CONTENT_ERR = 0x8004C717 ,
IMG_ANCHORMOREFOUND_WARN = 0x8004C718 ,
IMG_TRANSFORM_ERR = 0x8004C719 ,
IMG_MATCHING_LOW_CONFIDENCE = 0x8004C71A ,
IMG_ANCHOR_CHECKNOTFOUND_ERR = 0x8004C71B ,
IMG_ANCHOR_REFERENCENOTFOUND_ERR = 0x8004C71C ,
IMG_ANCHOR_MOREREFERENCE_ERR = 0x8004C71D ,
IMG_ANCHOR_SELECTORNOTFOUND_ERR = 0x8004C71E ,
IMG_ANCHOR_RECOGNITION_ERR = 0x8004C71F ,
IMG_ANCHOR_SKIP_WARN = 0x0004C720 ,
IMG_ANCHOR_VALUE_WARN = 0x0004C721 ,
IMG_ANCHOR_ZONEISNOTANCHORED_WARN = 0x0004C722 ,
IMG_ANCHOR_TOOFEWANCHORS_WARN = 0x0004C723 ,
IMG_ANCHOR_TOOMANYANCHORS_WARN = 0x0004C724 ,
IMG_ANCHOR_POSITION_WARN = 0x0004C725 ,
IMG_ANCHOR_SIMILARTEXT_WARN = 0x0004C726 ,
IMG_ANCHOR_NOTREFERENCED_WARN = 0x0004C727 ,
IMG_ANCHOR_CHECKDRIFTTOOLARGE_WARN = 0x0004C728 ,
IMG_ANCHOR_DRIFTNOTCONSISTENT_WARN = 0x0004C729 ,
IMG_ANCHOR_CHECKANCHORSKIPPED_WARN = 0x0004C72A ,
IMG_TEMPLATEFAILED_WARN = 0x0004C72B ,
DC_INVALIDNAME_ERR = 0x8004DF01 ,
DC_EXISTINGNAME_ERR = 0x8004DF02 ,
DC_EXISTINGFOLDER_ERR = 0x8004DF03 ,
DC_HANDLE_ERR = 0x8004DF04 ,
DC_EMPTYCLASS_ERR = 0x8004DF05 ,
DC_NOTSAVED_ERR = 0x8004DF06 ,
DC_NOTTRAINED_ERR = 0x8004DF07 ,
DC_NOSUCHATTRIBUTE_ERR = 0x8004DF08 ,
DC_UNKNOWNEXTENSION_ERR = 0x8004DF09 ,
DC_NOSUCHCLASS_ERR = 0x8004DF0A ,
DC_NOTEXT_ERR = 0x8004DF0B ,
DC_ONECLASS_ERR = 0x8004DF0C ,
DC_TOOFEWDOCUMENT_WARN = 0x0004DF0D ,
DC_NOTENOUGHINFO_WARN = 0x0004DF0E ,
DC_INCOMPATIBLEDOCTYPE_ERR = 0x8004DF0F ,
DC_SYNTAX_ERR = 0x8004DF10 ,
DC_NOCLASS_ERR = 0x8004DF11 ,
PAGE_NOTFOUND_ERR = 0x8004C801 ,
PAGE_HANDLE_ERR = 0x8004C802 ,
PAGE_NOT_IN_PAGESTORE_ERR = 0x8004C803 ,
MGR_ERR = 0x8004C901 ,
NO_TXT_WARN = 0x0004C902 ,
OCR_NO_MODULE_WARN = 0x0004C903 ,
ZONE_NOTFOUND_ERR = 0x8004C904 ,
ZONE_NOTFOUND_WARN = 0x0004C905 ,
ZONE_POSITION_ERR = 0x8004C906 ,
ZONE_EXISTING_SEQ_ERR = 0x8004C907 ,
ZONE_FILE_ERR = 0x8004C908 ,
ZONE_SIZE_ERR = 0x8004C909 ,
ZONE_SHAPE_ERR = 0x8004C90A ,
ZONE_IMAGE_DOWNSAMPLED_WARN = 0x0004C90B ,
ZONE_SIZE_WARN = 0x0004C90C ,
ZONE_NO_FIELDNAME_WARN = 0x0004C90D ,
EXTRACTED_TXT_WARN = 0x0004C90E ,
LANGDET_INHERITED_WARN = 0x0004C90F ,
ZONE_OUTOFTHEIMAGE_ERR = 0x8004C910 ,
API_MTX_INTERNAL_ERR = 0x8004C911 ,
ZONE_FTE_STATE_WARN = 0x0004C912 ,
MOR_INIT_ERR = 0x8004CA01 ,
MOR_DOS_ERR = 0x8004CA02 ,
MOR_BCTNOTFOUND_ERR = 0x8004CA03 ,
MOR_BCTCORRUPTED_ERR = 0x8004CA04 ,
MOR_BCTVERSION_ERR = 0x8004CA05 ,
MOR_TOOLARGE_ERR = 0x8004CA06 ,
MOR_FILECORRUPTED_ERR = 0x8004CA07 ,
MOR_INTERNAL_ERR = 0x8004CA08 ,
MOR_GPFAULT_ERR = 0x8004CA09 ,
BAR_ERR = 0x8004CB01 ,
BAR_NOT_ENOUGH_MEMORY_ERR = 0x8004CB02 ,
BAR_NO_CODE_ERR = 0x8004CB03 ,
BAR_INVALID_CODE_ERR = 0x8004CB04 ,
BAR_NOT_DEFINIT_ERR = 0x8004CB05 ,
BAR_INCOMPATIBLE_TYPE_ERR = 0x8004CB06 ,
BAR_DEPRECATED_TYPE_ERR = 0x8004CB07 ,
BAR_TYPE_WARN = 0x0004CB08 ,
BAR_UNCOMBINABLE_TYPE_ERR = 0x8004CB09 ,
BAR_NOTSUPPORTED_TYPE_ERR = 0x8004CB0A ,
BAR_FAMILY_FORCED_WARN = 0x0004CB0B ,
BAR_TOOLARGE_ERR = 0x8004CB0C ,
BAR_NOTSUPPORTED_CHAR_WARN = 0x0004CB0D ,
DOT_ERR = 0x8004CC01 ,
OMR_ERR = 0x8004CD01 ,
HNR_TBSCORRUPTED_ERR = 0x8004CE01 ,
HNR_SYNTAX_WARN = 0x0004CE02 ,
RER_INTERNAL_ERR = 0x8004CF01 ,
RER_NOKNOWLEDGEFILE_ERR = 0x8004CF02 ,
RER_NOCHARSET_SET_ERR = 0x8004CF03 ,
RER_NOTSUPPORTED_CHARSET_ERR = 0x8004CF04 ,
RER_SPECFILE_NOTFOUND_ERR = 0x8004CF05 ,
SPL_MEMORY_ERR = 0x8004D001 ,
SPL_NOINIT_ERR = 0x8004D002 ,
SPL_FOPEN_ERR = 0x8004D003 ,
SPL_FREAD_ERR = 0x8004D004 ,
SPL_FWRITE_ERR = 0x8004D005 ,
SPL_BADFILEFORMAT_ERR = 0x8004D006 ,
SPL_INIT_ERR = 0x8004D007 ,
SPL_CLOSE_ERR = 0x8004D008 ,
SPL_LANG_ERR = 0x8004D009 ,
SPL_HANDLE_ERR = 0x8004D00A ,
SPL_NOMORE_WARN = 0x0004D00B ,
SPL_INTERNAL_ERR = 0x8004D00C ,
SPL_DUPWORD_ERR = 0x8004D00D ,
SPL_NOTFOUND_ERR = 0x8004D00E ,
SPL_BADWORD_ERR = 0x8004D00F ,
SPL_UDSECT_ERR = 0x8004D010 ,
SPL_REGEXP_SYNTAX_ERR = 0x8004D011 ,
SPL_EXISTSECT_WARN = 0x0004D012 ,
SPL_REGEXP_NOMATCH_ERR = 0x8004D014 ,
SPL_REGEXP_NOMATCH_WARN = 0x0004D015 ,
SPL_REGEXP_EXCLUSIVE_ERR = 0x8004D016 ,
SPL_REGEXP_WRONGRANGE_ERR = 0x8004D017 ,
SPL_REGEXP_SETINRANGE_ERR = 0x8004D018 ,
SPL_REGEXP_INVALIDCHR_ERR = 0x8004D019 ,
SPL_REGEXP_UNBALANCED1_ERR = 0x8004D01A ,
SPL_REGEXP_UNBALANCED2_ERR = 0x8004D01B ,
SPL_REGEXP_UNBALANCED3_ERR = 0x8004D01C ,
SPL_REGEXP_WRONGNUMBER_ERR = 0x8004D01D ,
SPL_REGEXP_WRONGUPPER_ERR = 0x8004D01E ,
SPL_REGEXP_ESCAPE_ERR = 0x8004D01F ,
SPL_REGEXP_HEXA_ERR = 0x8004D020 ,
SPL_REGEXP_MULTIPLICATOR_ERR = 0x8004D021 ,
SPL_REGEXP_ZERO_WIDTH_ERR = 0x8004D022 ,
SPL_REGEXP_UNEXPECTED_ERR = 0x8004D023 ,
SPL_NOTACCEPTED_WARN = 0x0004D024 ,
APIP_INIT_ERR = 0x8004D101 ,
APIP_PARAM_ERR = 0x8004D102 ,
APIP_NOMORE_WARN = 0x0004D103 ,
APIP_INTERNAL_ERR = 0x8004D104 ,
L_WARNINGS = 0x0004DA01 ,
L_WARNING_NOTFOUND = 0x0004DA02 ,
L_WARNING_NOTOPENED = 0x0004DA03 ,
L_WARNING_MISSING = 0x0004DA04 ,
L_WARNING_SUBSTITUTED = 0x0004DA05 ,
L_ERRORS = 0x8004DA06 ,
L_ERROR_NOID = 0x8004DA07 ,
L_ERROR_OBJID = 0x8004DA08 ,
L_ERROR_OBJTYPE = 0x8004DA09 ,
L_ERROR_FILE = 0x8004DA0A ,
L_ERROR_FILE_OPEN = 0x8004DA0B ,
L_ERROR_FILE_CLOSE = 0x8004DA0C ,
L_ERROR_FILE_SEEK = 0x8004DA0D ,
L_ERROR_FILE_READ = 0x8004DA0E ,
L_ERROR_FILE_WRITE = 0x8004DA0F ,
L_ERROR_FILE_FORMAT = 0x8004DA10 ,
L_ERROR_PARAMETER = 0x8004DA11 ,
L_ERROR_RANGE = 0x8004DA12 ,
L_ERROR_CALL = 0x8004DA13 ,
L_ERROR_CONVERTER = 0x8004DA14 ,
L_ERROR_BADVERSION = 0x8004DA15 ,
L_ERROR_IMAGE = 0x8004DA16 ,
L_ERROR_DTK = 0x8004DA17 ,
L_ERROR_READONLY = 0x8004DA18 ,
L_ERROR_OUTPUT_MODE = 0x8004DA19 ,
L_ERROR_APPSET = 0x8004DA1A ,
L_ERROR_PRERENDERING = 0x8004DA1B ,
L_ERROR_NOACCESS = 0x8004DA1C ,
L_ERROR_NOTIMPLEMENTED = 0x8004DA1D ,
L_ERROR_MASTERSOFT = 0x8004DA1E ,
L_ERROR_ABORTED = 0x8004DA1F ,
L_ERROR_CONV_NODOCUMENT = 0x8004DA20 ,
L_ERROR_CONV_LECSO = 0x8004DA21 ,
L_ERROR_TOO_MANY_SHEETS = 0x8004DA22 ,
L_ERROR_DOCFORMATTER = 0x8004DA23 ,
L_ERROR_STOP = 0x8004DA24 ,
L_ERROR_VOCALIZER = 0x8004DA25 ,
L_ERROR_NO_VOCALIZER_VOICE = 0x8004DA26 ,
L_ERROR_REALSPEAK = 0x8004DA27 ,
L_ERROR_NO_REALSPEAK_VOICE = 0x8004DA28 ,
L_ERROR_CODEC = 0x8004DA29 ,
L_ERROR_SAPI = 0x8004DA2A ,
L_ERROR_NO_SAPI_VOICE = 0x8004DA2B ,
L_FATALERRORS = 0x8004DB01 ,
L_FERROR_MEMORY = 0x8004DB02 ,
L_FERROR_INTERNAL = 0x8004DB03 ,
L_FERROR_FILEFORMAT = 0x8004DB04 ,
L_FERROR_INDEX = 0x8004DB05 ,
L_FERROR_RECAPI = 0x8004DB06 ,
L_FERROR_NOSET = 0x8004DB07 ,
L_FERROR_PERMISSION = 0x8004DB08 ,
L_FERROR_MISSING = 0x8004DB09 ,
BRA_INIT_ERR = 0x8004D201 ,
MAT_INIT_ERR = 0x8004D301 ,
RESERVED_P_INIT_ERR = 0x8004D401 ,
MTX_INIT_ERR = 0x8004D501 ,
FRX_INIT_ERR = 0x8004D601 ,
ASN_INIT_ERR = 0x8004D701 ,
MNG_INIT_ERR = 0x8004D801 ,
STSMN_HANDLE_ERR = 0x8004D901 ,
STSMN_NOSETTING_ERR = 0x8004D902 ,
STSMN_BADTYPE_ERR = 0x8004D903 ,
STSMN_OPNOTALLOWED_ERR = 0x8004D904 ,
STSMN_PARAMETER_ERR = 0x8004D905 ,
STSMN_INVALIDFILE_ERR = 0x8004D906 ,
STSMN_NOTFOUND_ERR = 0x8004D907 ,
STSMN_FULLSAVEDTREE_WARN = 0x0004D908 ,
STSMN_BADORMISSINGREF_ERR = 0x8004D909 ,
STSMN_EMPTYPENDVAL_WARN = 0x0004D90A ,
STSMN_NOSESSION_ERR = 0x8004D90B ,
STSMN_NOMORE_WARN = 0x0004D90C ,
IPRO_E_NOTALLOWED = 0x8004C001 ,
IPRO_E_TOOMANYENGINE = 0x8004C002 ,
IPRO_E_ENGINEINITFAILED = 0x8004C003 ,
IPRO_E_IMAGEFILESINITFAILED = 0x8004C004 ,
IPRO_E_MEMORYBITMAPSINITFAILED = 0x8004C005 ,
IPRO_E_UDMANAGERINITFAILED = 0x8004C006 ,
IPRO_E_BARCODETYPESINITFAILED = 0x8004C007 ,
IPRO_E_MODULEINFOSINITFAILED = 0x8004C008 ,
IPRO_E_UILANGUAGESINITFAILED = 0x8004C009 ,
IPRO_E_SPELLLANGUAGESINITFAILED = 0x8004C00A ,
IPRO_E_DOCUMENTSINITFAILED = 0x8004C00B ,
IPRO_E_SCANNERSINITFAILED = 0x8004C00C ,
IPRO_E_SCANNERINITFAILED = 0x8004C00D ,
IPRO_E_CONVERTERSINITFAILED = 0x8004C00E ,
IPRO_E_SETTINGMANAGERINITFAILED = 0x8004C00F ,
IPRO_E_OBJECTISINVALID = 0x8004C010 ,
IPRO_E_CONVERTERMANAGERUNKNOWN = 0x8004C011 ,
IPRO_E_CONVERTERNOTFOUND = 0x8004C012 ,
IPRO_W_ZONEINVALID = 0x0004C013 ,
DOCUMENT_INVALID_ERR = 0x8004DC01 ,
DOCUMENT_ACCESS_ERR = 0x8004DC02 ,
DOCUMENT_RDONLY_SAVE_ERR = 0x8004DC03 ,
DOCUMENT_CONVERT_ERR = 0x8004DC04 ,
DOCUMENT_SHAREVIOLATION_ERR = 0x8004DC05 ,
DOCUMENT_NOTEXIST_ERR = 0x8004DC06 ,
DOCUMENTMGR_NOTINIT_ERR = 0x8004DC07 ,
DOCUMENT_CANCEL = 0x8004DC08 ,
DOCUMENT_VERSION_ERR = 0x8004DC09 ,
DOCUMENT_ZOP_ERR = 0x8004DC0A ,
DOCUMENT_ZOP_NOTFOUND_ERR = 0x8004DC0B ,
DOCUMENT_ZOP_BADSHAPE_ERR = 0x8004DC0C ,
DOCUMENT_ZOP_NEEDOCR_ERR = 0x8004DC0D ,
WORKFLOW_START_ERR = 0x8004DD01 ,
WORKFLOW_PROCESSED_ERR = 0x8004DD02 ,
WORKFLOW_INTERACTIVE_ERR = 0x8004DD03 ,
WORKFLOW_INPUT_ERR = 0x8004DD04 ,
WORKFLOW_OUTPUT_ERR = 0x8004DD05 ,
WORKFLOW_CREATION_ERR = 0x8004DD06 ,
WORKFLOW_INACTIVE_ERR = 0x8004DD07 ,
WORKFLOW_ACTIVE_ERR = 0x8004DD08 ,
WORKFLOW_INVALID_ERR = 0x8004DD09 ,
WORKFLOW_DOCUMENT_ERR = 0x8004DD0A ,
WORKFLOW_ITEMNOTFOUND_ERR = 0x8004DD0B ,
WORKFLOW_PARAMNOTFOUND_ERR = 0x8004DD0C ,
WORKFLOW_PARAMEXISTS_ERR = 0x8004DD0D ,
WORKFLOW_RECCHARS_INF = 0x0004DD0E ,
WORKFLOW_RECWORDS_INF = 0x0004DD0F ,
WORKFLOW_RECREJCHARS_INF = 0x0004DD10 ,
WORKFLOW_LDFAXCORR_INF = 0x0004DD11 ,
WORKFLOW_LDROT_INF = 0x0004DD12 ,
WORKFLOW_LDSKEW_WARN = 0x0004DD13 ,
WORKFLOW_BARCODE_INF = 0x0004DD14 ,
WORKFLOW_BARCODE_ERR = 0x8004DD15 ,
WORKFLOW_LDPATTERN_WARN = 0x0004DD16 ,
WORKFLOW_HWND_ERR = 0x8004DD17 ,
WORKFLOW_HWNDCREATE_ERR = 0x8004DD18 ,
WORKFLOW_HWND_WARN = 0x0004DD19 ,
WORKFLOW_RECLANGCONF_WARN = 0x0004DD1A ,
WORKFLOW_ZNMANUAL_INF = 0x0004DD1B ,
WORKFLOW_ZNTEMPLATE_INF = 0x0004DD1C ,
WORKFLOW_IPNOTOOL_ERR = 0x8004DD1D ,
WORKFLOW_IPLOAD_ERR = 0x8004DD1E ,
WORKFLOW_IPTEMPLATE_INF = 0x0004DD1F ,
WORKFLOW_IPMANUAL_INF = 0x0004DD20 ,
WORKFLOW_IPMANUAL_WARN = 0x0004DD21 ,
WORKFLOW_EDBLANK_WARN = 0x0004DD22 ,
WORKFLOW_EDCONVERT_WARN = 0x0004DD23 ,
WORKFLOW_EDNOFILE_WARN = 0x0004DD24 ,
WORKFLOW_DEPAGERANGE_ERR = 0x8004DD25 ,
WORKFLOW_DETEMPLATE_ERR = 0x8004DD26 ,
WORKFLOW_LDPDFCREATE_ERR = 0x8004DD27 ,
WORKFLOW_GOOGLEDOCS_FILETYPE_ERR = 0x8004DD28 ,
WORKFLOW_EVERNOTE_FILETYPE_ERR = 0x8004DD29 ,
WORKFLOW_LDBLANKPAGE_WARN = 0x0004DD2A ,
WORKFLOW_INTERACTIONSUPRESSED_WARN = 0x0004DD2B ,
WORKFLOW_CANCEL_WARN = 0x0004DD2C ,
WORKFLOW_PAGECLASS_WARN = 0x0004DD2D ,
WORKFLOW_PAGECLASS_INF = 0x0004DD2E ,
LINK_MORESPACE_ERR = 0x8004DE01 ,
LINK_CANCEL_WARN = 0x0004DE02 ,
LINK_NOTAUTHORIZED_ERR = 0x8004DE03 ,
LINK_NOTFOUND_ERR = 0x8004DE04 ,
LINK_FILEEXISTS_ERR = 0x8004DE05 ,
LINK_EVERNOTE_BAD_DATA_FORMAT = 0x8004DE06 ,
LINK_EVERNOTE_PERMISSION_DENIED = 0x8004DE07 ,
LINK_EVERNOTE_DATA_REQUIRED = 0x8004DE08 ,
LINK_EVERNOTE_LIMIT_REACHED = 0x8004DE09 ,
LINK_EVERNOTE_QUOTA_REACHED = 0x8004DE0A ,
LINK_EVERNOTE_INVALID_AUTH = 0x8004DE0B ,
LINK_EVERNOTE_AUTH_EXPIRED = 0x8004DE0C ,
LINK_EVERNOTE_DATA_CONFLICT = 0x8004DE0D ,
LINK_EVERNOTE_ENML_VALIDATION = 0x8004DE0E ,
LINK_EVERNOTE_SHARD_UNAVAILABLE = 0x8004DE0F ,
LINK_EVERNOTE_TOO_WHATEVER = 0x8004DE10 ,
LINK_EVERNOTE_UNSUPPORTED_OPERATION = 0x8004DE11 ,
LINK_EVERNOTE_TAKEN_DOWN = 0x8004DE12 ,
LINK_EVERNOTE_RATE_LIMIT_REACHED = 0x8004DE13 ,
LINK_EVERNOTE_BUSINESS_SECURITY_LOGIN_REQUIRED = 0x8004DE14 ,
LINK_EVERNOTE_DEVICE_LIMIT_REACHED = 0x8004DE15
}
Error codes. More...

Functions

RECERR RECAPIKRN | kRecGetLastError (LONG *pErrExt, LPTSTR pErrStr, int buflen)
Getting last error.
RECERR RECAPIKRN | kRecGetLastErrorEx (LONG *pErrExt, LPTSTR *ppErrStr, LPTSTR *ppErrXml)
Getting last error.
RETCODEINFO RECAPIKRN | kRecGetErrorInfo (RECERR ErrCode, LPCSTR *lpErrSym)
Getting additional information about an error.
RECERR RECAPIKRN | kRecGetErrorUIText (RECERR ErrCode, LONG ErrExt, LPCTSTR lpErrStr, LPTSTR lpErrUIText, int *pBuffLen)
Getting the error text of an error.
RECKRNDLL LPCSTR RECKRNCALL | watch_recerr (RECERR ErrCode)
Debugging utility function: Getting a string with the symbolic error code.

Detailed Description

Error information.

The majority of RecAPI operations have the return value type RECERR. This is an enumeration type collecting all possible error codes in OmniPage CSDK v2025.1. The integrating application should always check the return value of RecAPI functions to make sure that the function has successfully completed (REC_OK) its operation. Use this module to obtain information about errors that occured in the last operation, and see their categories.

Enumeration Type Documentation

◆ RECERR

enum RECERR

Error codes.

This is the type of the return value of almost all the function of RecAPI. The error codes can be grouped into some classes according to the module they come from. Thus the name of the enum type element can give some information about not only the type of the error, but also the module, where it has occured.

The functions kRecGetErrorInfo and kRecGetErrorUIText can give information about the specified error codes at runtime. During debugging, a useful tool can be the function watch_recerr.

Note
Error messages with the prefix L_ relate to the Layout Analyser.
Enumerator
REC_OK | Successful operation, no error.
FILE_ERR | File operation internal error.
FILE_SYNTAX_ERR | File handling syntax error.
FILE_OPEN_ERR | File open error.
FILE_NOTFOUND_ERR | File not found.
FILE_READ_ERR | File read error.
FILE_WRITE_ERR | File write error.
FILE_ACCESS_ERR | File access denied.
FILE_REMOVE_ERR | File removal error.
FILE_CREATE_ERR | File creation error.
FILE_SEEK_ERR | File seek error.
FILE_MEM_ERR | Out of memory during file I/O.
FILE_DISKFULL_ERR | Disk full.
FILE_IO_ERR | File I/O error.
FILE_SHARE_ERR | Sharing violation.
FILE_ALREADYEXIST_ERR | File already exists.
FILE_INVALIDFLAG_ERR | Invalid flag specified in a function call.
FILE_INVALIDPARAMETER_ERR | Invalid parameter specified in a function call.
FILE_LOCKVIOLATION_ERR | File locking error.
FILE_DIRNOTEMPTY_ERR | Directory is not empty.
FILE_INVALIDHANDLE_ERR | Invalid handle specified in a function call.
FILE_TOOLARGE_ERR | File size limit error.
FILE_MUTEX_NOTAVAILABLE_ERR | Mutex is not available.
FILE_CANTCREATE_MUTEX_ERR | Mutex cannot be created.
FILE_CANTRELEASE_MUTEX_ERR | Mutex cannot be released.
FILE_INIT_ERR | File system initialization error.
FILE_QUIT_ERR | File Manager's module quit error.
FILE_NOT_IMPLEMENTED_ERR | Function call not implemented yet.
FILE_INVALIDPOINTER_ERR | Invalid pointer specified in a function call.
FILE_INVALIDFUNCTION_ERR | The specified flag combination is not supported.
FILE_NOMORE_WARN | Internal use only.
MEM_NOTENOUGH_ERR | Not enough memory for this memory operation.
MEM_INVALIDPOINTER_ERR | Invalid pointer to a memory object.
CHR_ILLEGALCODE_ERR | Illegal internal code as a parameter.
CHR_ILLEGALSETTING_ERR | Set parameter is not acceptable (e.g. size mismatch.)
CHR_NOMORE_WARN | End of list of available Code Pages.
CHR_SETFILE_ERR | Error while loading the Code Page Definition file (RECOGN.SET).
CHR_CODELENGTH_ERR | Length of exported code exceeds buffer size.
CHR_MISSINGEXPORT_ERR | Character conversion is not available for the given character.
CHR_LANGSET_CODEPAGE_ERR | Conflict: The selected Code Page does not support some characters in the selected languages: there is no exact code in the Code Page for them.
CHR_INIT_ERR | Character Set and Code Pages module initialization error.
CHR_MULTIPLELANG_FOUND_WARN | There are more than one matching languages.
CHR_LANG_NOTFOUND_ERR | There are no matching languages.
CHR_LANG_DISABLED_WARN | The specified language is not enabled.
API_INCORRECTMODULEVERSION_ERR | Inconsistent Engine configuration.
API_INIT_ERR | Engine initialization error, or no appropriate license.
API_QUIT_ERR | Engine termination error.
API_INIT_WARN | Module initialization warning.
API_PROCESS_ABORTED_ERR | Application has aborted the current process.
API_PROCESS_FINISH | Application has terminated the current recognition process. Recognized text is kept.
API_MODULEMISSING_ERR | Module not present or not licensed.
API_MODULELOAD_ERR | OS could not load a module.
API_MODULEENTRY_ERR | Missing entry in a module.
API_MODULEINVALID_ERR | Invalid module.
API_MODULEINIT_ERR | Module initialization error.
API_NOT_AVAILABLE_ERR | The requested function is unavailable, or there is no appropriate license.
API_ERROR_ERR | General error in the Engine.
API_GPFAULT_ERR | General Protection Fault in the Engine.
API_PLATFORM_ERR | Unsupported operating system.
API_STS_SYNTAX_ERR | Syntax error in the specified Engine Settings file.
API_STS_ERR | Invalid setting.
API_HARDLOCK_ERR | Hardlock not found or hardlock service has not been started.
API_LICENSE_ERR | Invalid license or Engine Licence file not found.
API_PARAMETER_ERR | Invalid parameters.
API_BUSY_ERR | Engine is busy.
API_EVALDATE_EXPIRED_ERR | Evaluation date of the Engine has expired.
API_TIMEOUT_ERR | Recognition process soft TimeOut.
API_FILEFORMAT_ERR | Format error in the actual file.
API_INVALIDSESSION_ERR | Current session is invalid.
NOT_IMPL_ERR | Non-implemented feature.
API_DOTNET30_OR_LATER_MISSING_ERR | Missing .NET 3.0 or later.
API_CRYPT_MISS_WARN | Crypt module missing.
API_HARDTIMEOUT_ERR | Recognition process hard TimeOut.
API_DOTNET40_OR_LATER_MISSING_ERR | Missing .NET 4.0 or later.
API_LICENSEMGR_ERR | License Manager error. check the host name, correct and open port, running OPLA.
API_LICENSEVALIDATION_WARN | License cannot be validated.
API_LANGUAGE_SET_ERR | Unlicensed language setting found or it is not supported by the current CSDK configuration.
API_ERRORS_HAPPENED_WARN | Non-fatal error happened during ProcessPages.
API_WARNINGS_HAPPENED_WARN | Warnings happened during ProcessPages.
API_LICENSE_PAGECOUNT_ERR | Page count limit reached or expired.
API_LICENSEMGR_PROTOCOL_ERR | Connection actively closed by License Manager Service.
API_LICENSECONFIG_ERR | License configuration error.
API_NOTINITIALIZED_ERR | Engine not initialized or already terminated.
API_LANG_REMOVED_WARN | Language is removed from unsupported language combination.
RSD_WARN | General RSD warning.
RSD_INTERNAL | Internal error.
RSD_FAIL | General RSD failure.
RSD_NA | Feature not available.
RSD_ACCESS | Access violation.
RSD_CORRUPTED | Internal data structures corrupted.
RSD_NOMEMORY | No memory available.
RSD_MEMORYFAIL | Failed to lock or free memory.
RSD_NOFILE | File not found.
RSD_CREATEFAIL | File creation error.
RSD_OPENFAIL | File open error.
RSD_READONLY | Read-only file attribute.
RSD_READFAIL | File read error.
RSD_WRITEFAIL | File write error.
RSD_CLOSEFAIL | File close error.
RSD_FILECORRUPTED | File structure corrupted.
RSD_NOMSGFILE | Message text file not found.
RSD_NOMESSAGE | Message not found.
RSD_DLL_NOFILE | DLL not found.
RSD_DLL_FORMAT | Invalid DLL format.
RSD_DLL_GETPROC | Cannot find function in DLL.
RSD_NOTOPENED | Scanner driver not opened.
RSD_NOTLOADED | Scanner driver not loaded.
RSD_NODRIVER | Scanner driver not found.
RSD_BADVERSION | Invalid scanner driver version.
RSD_DRIVERFAIL | Scanner driver error.
RSD_NOCARD | Scanner interface card not found.
RSD_BADHANDLE | Invalid spec ID.
RSD_PARAMID | Invalid parameter ID specified.
RSD_PARAMVALUE | Invalid parameter value specified.
RSD_BADADFCOMMAND | Invalid ADF command.
RSD_WARNSTARTMODE | Scan start mode setting not synchronized.
RSD_BADSTARTMODE | Invalid scan start mode setting.
RSD_BADTRANSFER | Invalid scan image transfer mode setting.
RSD_WARNPAPERSOURCE | Scan paper source setting not synchronized.
RSD_BADPAPERSOURCE | Invalid scan paper source setting.
RSD_WARNRESOLUTION | Scan resolution setting not synchronized.
RSD_BADRESOLUTION | Invalid scan resolution setting.
RSD_WARNMARGIN | Scan margin setting not synchronized.
RSD_BADMARGIN | Invalid scan margin setting.
RSD_WARNPAPERSIZE | Scan paper size setting not synchronized.
RSD_BADPAPERSIZE | Invalid scan paper size setting.
RSD_WARNORIENTATION | Scan orientation setting not synchronized.
RSD_BADORIENTATION | Invalid scan orientation setting.
RSD_WARNDUPLEX | Duplex scan setting not synchronized.
RSD_BADDUPLEX | Invalid duplex scan setting.
RSD_WARNIMAGEINTERP | Bits per sample setting not synchronized.
RSD_BADIMAGEINTERP | Invalid bits per sample setting.
RSD_BADCOLORINTERP | Invalid color interpretation setting.
RSD_BADHALFTONE | Invalid halftone setting.
RSD_WARNBRIGHTNESS | Scan brightness setting not synchronized.
RSD_BADBRIGHTNESS | Invalid scan brightness setting.
RSD_WARNCONTRAST | Scan contrast setting not synchronized.
RSD_BADCONTRAST | Invalid scan contrast setting.
RSD_BADMIDTONE | Invalid scan midtone setting.
RSD_WARNLAMPCOLOR | Scan dropout color setting not synchronized.
RSD_BADLAMPCOLOR | Invalid scan dropout color setting.
RSD_BADCOMPRESSION | Invalid compression setting.
RSD_BADFILETYPE | Invalid image file type setting.
RSD_BADINDICATION | Invalid scan indication setting.
RSD_CONFIGURATIONID | Invalid configuration ID setting.
RSD_HOSTID | Invalid host ID setting.
RSD_SCSIID | Invalid SCSI ID setting.
RSD_BADPARAMCOMBO | Invalid parameter combination.
RSD_LINE_TOO_WIDE | Line too wide to handle.
RSD_NOIMAGE | Image does not exist.
RSD_BADIMAGEWIDTH | Image width too small or too large.
RSD_BADIMAGELENGTH | Image length too small or too large.
RSD_NOAUTOROTATE | Image too large for autorotate.
RSD_TRUNCATED | User buffer too small.
RSD_NOTCAPABLE | Scanner does not support this feature.
RSD_NOTCONNECTED | Scanner not connected.
RSD_NOTREADY | Scanner not ready.
RSD_NOPAPER | Scanner ADF empty.
RSD_PAPERJAM | Scanner ADF paper jam.
RSD_DOUBLEFEED | Scanner ADF double feed.
RSD_COVEROPEN | Scanner ADF cover open.
RSD_BOTHFEEDERSLOADED | Both feeders are loaded.
RSD_RESERVED | Scanner already reserved.
RSD_NOTRESERVED | Scanner not reserved.
RSD_SCANNERBUSY | Scanner busy.
RSD_SCANNERSTOP | Stop button pushed on scanner.
RSD_SCANNERFAIL | Unspecified scanner error.
RSD_TIMEOUT | Timeout (RSD module or the scanner).
RSD_USER_CANCELLED | User cancelled operation.
RSD_ABORTED | Operation/action aborted.
RSD_NOTPOSSIBLE | Operation not possible.
RSD_PAPERPICK | The ADF cannot pick up the paper.
IMF_READ_ERR | Image file read error.
IMF_WRITE_ERR | Image file write error.
IMF_INIT_ERR | Image file I/O module initialization error.
IMF_OPEN_ERR | Image file open error.
IMF_CLOSE_ERR | Image file close error.
IMF_CREATE_ERR | Image file create error.
IMF_MEMORY_ERR | Out of memory during image file I/O.
IMF_NOTSUP_ERR | Not supported image file format or image file type.
IMF_TAGMISSING_ERR | Required TIFF basic tag is missing.
IMF_COMP_ERR | Error in image compression.
IMF_IMGFORM_ERR | Unknown image format.
IMF_PAGENUM_ERR | Non-existent page number.
IMF_FILEFORMAT_ERR | File format error.
IMF_COLOR_ERR | Color PCX file is not supported.
IMF_TMPFILE_ERR | Temporary file handling error.
IMF_APPEND_ERR | Appending not allowed.
IMF_FILENOTEMPTY_ERR | Writing into a non-empty file without IMF append mode specified.
IMF_FAXVIEWMISS_ERR | Microsoft Fax viewer missing or not installed.
IMF_PASSWORD_WARN | Password protected file.
IMF_EMPTYHANDLE_WARN | The file belonging to this handle does not exist any longer.
IMF_PDFAPPENDONLY_ERR | In case of PDF saving the append flag must be true.
IMF_READ_WARN | Image file read problem.
IMF_COMP_WARN | Problem in image compression.
IMF_PASSWORD_SYNTAX_WARN | Illegal password.
IMF_PASSWORD_ERR | Wrong password.
IMF_CRYPT_NOTSUP_ERR | Not supported encryption.
IMF_FONT_MISSING_WARN | No font for rendering a glyph.
IMF_PDFCHANGEDXREF_WARN | The pdf version is changed because the file size is over 10 GB.
IMF_FONT_MISSING_ERR | No font for rendering the image.
IMG_SETTING_ERR | Internal use only.
IMG_NOTENOUGHMEMORY_ERR | Not enough memory during image processing.
IMG_RECT_ERR | Invalid rectangle dimensions.
IMG_DPI_ERR | Non-supported resolution.
IMG_NOTFOUND_ERR | Image not found.
IMG_COMPRESSED_ERR | Cannot process compressed image.
IMG_BITMAPADDRESS_ERR | Invalid bitmap address.
IMG_BITSPERPIXEL_ERR | Unsupported BitsPerPixel value.
IMG_NOTATTACHED_ERR | Internal use only.
IMG_HANDLE_ERR | Invalid image handle.
IMG_BUFFEROVERFLOW_ERR | Buffer overflow during processing the image.
IMG_ACCESS_ERR | Image operation denied.
IMG_NOMORE_WARN | No more lines in defined image area.
IMG_SIZE_ERR | Non-supported image size.
IMG_INVALIDOP_ERR | Operation not supported on this image.
IMG_ZONE_ERR | Invalid zone operation (e.g. existing user zone at LZ_FORM).
IMG_DPI_WARN | Non-supported resolution.
IMG_ANCHOR_WARN | One or more anchor zones were not found.
IMG_ANCHORNOTFOUND_ERR | Too few anchors were found or none.
IMG_NOTEXTZONE_WARN | No text zone in the template.
IMG_ANCHORNOTEXIST_ERR | Neither positional nor reference anchor has been defined.
IMG_TEMPLATENOTMATCHED_ERR | None of the templates were matched.
IMG_ANCHOR_CONTENT_ERR | Not supported anchor content.
IMG_ANCHORMOREFOUND_WARN | More than one anchor were found in the drift area.
IMG_TRANSFORM_ERR | Zone transformation failed (zone is out of the image).
IMG_MATCHING_LOW_CONFIDENCE | The matched template has low confidence.
IMG_ANCHOR_CHECKNOTFOUND_ERR | The text in check anchor does not match.
IMG_ANCHOR_REFERENCENOTFOUND_ERR | Reference anchor was not found.
IMG_ANCHOR_MOREREFERENCE_ERR | The position of the reference anchor is ambiguous (there is similar text near the anchor).
IMG_ANCHOR_SELECTORNOTFOUND_ERR | Selector anchor not found.
IMG_ANCHOR_RECOGNITION_ERR | Could not recognize text or barcode in the given area.
IMG_ANCHOR_SKIP_WARN | The anchor is skipped because template does not match.
IMG_ANCHOR_VALUE_WARN | Anchor text is too short.
IMG_ANCHOR_ZONEISNOTANCHORED_WARN | Zone is not anchored to either reference anchor or to positional anchor.
IMG_ANCHOR_TOOFEWANCHORS_WARN | There are too few positional anchors (suggested: 4 - 6 anchors).
IMG_ANCHOR_TOOMANYANCHORS_WARN | There are too many positional anchors (suggested: 4 - 6 anchors).
IMG_ANCHOR_POSITION_WARN | The position of the anchors is suboptimal (define anchors near each corner of the page).
IMG_ANCHOR_SIMILARTEXT_WARN | The anchor is ambigous: there is similar text near the anchor.
IMG_ANCHOR_NOTREFERENCED_WARN | No zone is anchored to this reference anchor.
IMG_ANCHOR_CHECKDRIFTTOOLARGE_WARN | The drift of the check anchor is too large (suggested: approx. DPI/30 pixel).
IMG_ANCHOR_DRIFTNOTCONSISTENT_WARN | The drifts of some positional anchors are infinite, while those of others aren't. (Suggestion: either all of them or none of them should be infinite.
IMG_ANCHOR_CHECKANCHORSKIPPED_WARN | The checkanchor(s) is/are skipped because there is no positional anchor.
IMG_TEMPLATEFAILED_WARN | None of the templates were matched.
DC_INVALIDNAME_ERR | Cannot create class: invalid name.
DC_EXISTINGNAME_ERR | Cannot create class: existing name.
DC_EXISTINGFOLDER_ERR | Cannot create class: existing folder.
DC_HANDLE_ERR | Invalid handle.
DC_EMPTYCLASS_ERR | Class is empty.
DC_NOTSAVED_ERR | Project is not saved.
DC_NOTTRAINED_ERR | Project is not trained.
DC_NOSUCHATTRIBUTE_ERR | No such attribute.
DC_UNKNOWNEXTENSION_ERR | Can not open this file, unknown extension.
DC_NOSUCHCLASS_ERR | No such class.
DC_NOTEXT_ERR | Document does not contain enough words to distinguish classes.
DC_ONECLASS_ERR | There is only one class in the training set.
DC_TOOFEWDOCUMENT_WARN | There are not enough documents in the class.
DC_NOTENOUGHINFO_WARN | Document does not contain enough info to distinguish classes.
DC_INCOMPATIBLEDOCTYPE_ERR | Layout based classifiers can not process text documents.
DC_SYNTAX_ERR | Parameter syntax error.
DC_NOCLASS_ERR | There is no class in the training set.
PAGE_NOTFOUND_ERR | Invalid page handle (NULL).
PAGE_HANDLE_ERR | Invalid page handle.
PAGE_NOT_IN_PAGESTORE_ERR | Page is not in PageStore.
MGR_ERR | Engine manager module error.
NO_TXT_WARN | No recognized text available: either because the zone is empty or the required recognition module has not been initialized properly.
OCR_NO_MODULE_WARN | No selected recognition module.
ZONE_NOTFOUND_ERR | No zone in the zone list.
ZONE_NOTFOUND_WARN | No zones found.
ZONE_POSITION_ERR | Invalid zone index.
ZONE_EXISTING_SEQ_ERR | Internal use only.
ZONE_FILE_ERR | Internal use only.
ZONE_SIZE_ERR | Invalid zone coordinates.
ZONE_SHAPE_ERR | Invalid zone shape (not rectangular).
ZONE_IMAGE_DOWNSAMPLED_WARN | Color image was downsampled.
ZONE_SIZE_WARN | Invalid zone coordinates.
ZONE_NO_FIELDNAME_WARN | Zone can not have a field name defined.
EXTRACTED_TXT_WARN | Limited information extacted from input document.
LANGDET_INHERITED_WARN | The language was inherited from previous page.
ZONE_OUTOFTHEIMAGE_ERR | Zone is out of the image.
API_MTX_INTERNAL_ERR | MTX engine fatal internal error.
ZONE_FTE_STATE_WARN | Zone has problematic FTE-state.
MOR_INIT_ERR | MOR recognition module initialization error.
MOR_DOS_ERR | DOS error during recognition.
MOR_BCTNOTFOUND_ERR | Knowledge base file for MOR recognition module not found (RECOGN.BCT).
MOR_BCTCORRUPTED_ERR | Knowledge base file for MOR recognition module corrupted (RECOGN.BCT).
MOR_BCTVERSION_ERR | Incorrect knowledge base file version (RECOGN.BCT).
MOR_TOOLARGE_ERR | Image size too large.
MOR_FILECORRUPTED_ERR | File corrupted.
MOR_INTERNAL_ERR | Internal error in the MOR recognition module.
MOR_GPFAULT_ERR | General Protection Fault in the MOR recognition module.
BAR_ERR | Barcode module error.
BAR_NOT_ENOUGH_MEMORY_ERR | Not enough memory for barcode recognition.
BAR_NO_CODE_ERR | No barcode found in the zone.
BAR_INVALID_CODE_ERR | Non-supported barcode type found.
BAR_NOT_DEFINIT_ERR | Inconsistent type setting.
BAR_INCOMPATIBLE_TYPE_ERR | Mutually exclusive type setting.
BAR_DEPRECATED_TYPE_ERR | Deprecated type setting.
BAR_TYPE_WARN | Barcode type incompatibility detected at kRecRecognize().
BAR_UNCOMBINABLE_TYPE_ERR | Code cannot be selected in combination with other symbologies.
BAR_NOTSUPPORTED_TYPE_ERR | Not supported barcode type by actual bar recognition module.
BAR_FAMILY_FORCED_WARN | Force family barcode type if the recognized type is not fit to the enabled type.
BAR_TOOLARGE_ERR | Box is too small for the barcode.
BAR_NOTSUPPORTED_CHAR_WARN | Character code is not supported by the actual barcode type.
DOT_ERR | Dot-matrix recognition error.
OMR_ERR | Checkmark recognition error.
HNR_TBSCORRUPTED_ERR | Knowledge base file for HNR module corrupted.
HNR_SYNTAX_WARN | Parameter is out of valid range.
RER_INTERNAL_ERR | RER module internal error.
RER_NOKNOWLEDGEFILE_ERR | Knowledge base file for RER module not found (*.REC).
RER_NOCHARSET_SET_ERR | Character Set is empty for the RER module.
RER_NOTSUPPORTED_CHARSET_ERR | The specified Character Set not fully supported by the RER recognition module.
RER_SPECFILE_NOTFOUND_ERR | RER specfile not found.
SPL_MEMORY_ERR | Not enough memory for the SPL module.
SPL_NOINIT_ERR | Uninitialized spell object.
SPL_FOPEN_ERR | Spell file open error.
SPL_FREAD_ERR | Spell file read error.
SPL_FWRITE_ERR | User dictionary write error.
SPL_BADFILEFORMAT_ERR | Invalid file format (TEV.SZO).
SPL_INIT_ERR | Module initialization error.
SPL_CLOSE_ERR | User dictionary close error.
SPL_LANG_ERR | Illegal language setting.
SPL_HANDLE_ERR | Internal spell function call with a wrong handle.
SPL_NOMORE_WARN | No more suggestions/items available.
SPL_INTERNAL_ERR | Internal checking error.
SPL_DUPWORD_ERR | Item already exists in the User dictionary.
SPL_NOTFOUND_ERR | Item does not exist in the User dictionary.
SPL_BADWORD_ERR | Item is incorrect (NULL pointer, empty word).
SPL_UDSECT_ERR | Deprecated.
SPL_REGEXP_SYNTAX_ERR | Regexp: other syntax error.
SPL_EXISTSECT_WARN | Deprecated.
SPL_REGEXP_NOMATCH_ERR | Regexp: item does not match.
SPL_REGEXP_NOMATCH_WARN | Regexp: item does not match.
SPL_REGEXP_EXCLUSIVE_ERR | Regexp: exclusive predefined set within set definition.
SPL_REGEXP_WRONGRANGE_ERR | Regexp: a range in a set is not correct, e.g.: [z-a].
SPL_REGEXP_SETINRANGE_ERR | Regexp: a range with a predefined set, e.g.: [\w-z].
SPL_REGEXP_INVALIDCHR_ERR | Regexp: not handled Unicode character.
SPL_REGEXP_UNBALANCED1_ERR | Regexp: unbalanced '(' or ')'.
SPL_REGEXP_UNBALANCED2_ERR | Regexp: unbalanced '['.
SPL_REGEXP_UNBALANCED3_ERR | Regexp: unbalanced '{'.
SPL_REGEXP_WRONGNUMBER_ERR | Regexp: number(s) expected within {} pair.
SPL_REGEXP_WRONGUPPER_ERR | Regexp: invalid upper limit in {n,m} multiplicator.
SPL_REGEXP_ESCAPE_ERR | Regexp: illegal use of escape ('\') character.
SPL_REGEXP_HEXA_ERR | Regexp: illegal hexadecimal spec..
SPL_REGEXP_MULTIPLICATOR_ERR | Regexp: illegal use of *, +, ? or {}.
SPL_REGEXP_ZERO_WIDTH_ERR | Regexp: '?', '*', '+' or '{}' follows an empty atom.
SPL_REGEXP_UNEXPECTED_ERR | Regexp: unexpected character found (missing escape?).
SPL_NOTACCEPTED_WARN | UserDictionary: word not accepted by UD.
APIP_INIT_ERR | APIPlus initialization error.
APIP_PARAM_ERR | Parameter error.
APIP_NOMORE_WARN | No more items available.
APIP_INTERNAL_ERR | Internal error in RecAPIPlus.
L_WARNINGS | General OmniPage Document (OPD) Warning.
L_WARNING_NOTFOUND | Layout Analyser Object not found.
L_WARNING_NOTOPENED | Layout Analyser Object not opened.
L_WARNING_MISSING | Missing data.
L_WARNING_SUBSTITUTED | Data substitution.
L_ERRORS | General OmniPage Document (OPD) Error.
L_ERROR_NOID | No such Object ID.
L_ERROR_OBJID | Wrong Object ID.
L_ERROR_OBJTYPE | Wrong object type.
L_ERROR_FILE | General file operation error.
L_ERROR_FILE_OPEN | File cannot be opened.
L_ERROR_FILE_CLOSE | File cannot be closed.
L_ERROR_FILE_SEEK | File seeking error.
L_ERROR_FILE_READ | File reading error.
L_ERROR_FILE_WRITE | File writing error.
L_ERROR_FILE_FORMAT | Wrong file format.
L_ERROR_PARAMETER | Invalid internal parameter.
L_ERROR_RANGE | Invalid internal range.
L_ERROR_CALL | Invalid function call.
L_ERROR_CONVERTER | Conversion error.
L_ERROR_BADVERSION | Wrong Layout Analyser version.
L_ERROR_IMAGE | Image operation error.
L_ERROR_DTK | DTK function error.
L_ERROR_READONLY | Layout Analyser opened as read only.
L_ERROR_OUTPUT_MODE | Invalid output mode.
L_ERROR_APPSET | Invalid appset.
L_ERROR_PRERENDERING | Prerendering error.
L_ERROR_NOACCESS | Access error.
L_ERROR_NOTIMPLEMENTED | Feature not implemented.
L_ERROR_MASTERSOFT | Text converter filter error.
L_ERROR_ABORTED | The function was aborted.
L_ERROR_CONV_NODOCUMENT | No document in Layout Analyser Storage.
L_ERROR_CONV_LECSO | Layout Analyser command error.
L_ERROR_TOO_MANY_SHEETS | Too many Excel sheets.
L_ERROR_DOCFORMATTER | Internal use only.
L_ERROR_STOP | Internal use only.
L_ERROR_VOCALIZER | Error in Vocalizer Engine.
L_ERROR_NO_VOCALIZER_VOICE | No voice available in Vocalizer Engine.
L_ERROR_REALSPEAK | Error in RealSpeak Solo Engine.
L_ERROR_NO_REALSPEAK_VOICE | No voice available in RealSpeak Engine.
L_ERROR_CODEC | Error in using Codec.
L_ERROR_SAPI | Error in Microsoft Speech Platform.
L_ERROR_NO_SAPI_VOICE | No voice available in Microsoft Speech Platform.
L_FATALERRORS | General OmniPage Document (OPD) Fatal error.
L_FERROR_MEMORY | OmniPage Document (OPD) memory problem.
L_FERROR_INTERNAL | Internal OmniPage Document (OPD) error.
L_FERROR_FILEFORMAT | Wrong file format or wrong reading or writing methods.
L_FERROR_INDEX | Wrong index stream.
L_FERROR_RECAPI | Error in RecApi.
L_FERROR_NOSET | Some attribute was not set.
L_FERROR_PERMISSION | PDF modification restricted.
L_FERROR_MISSING | Missing file (usually a DLL).
BRA_INIT_ERR | Module is no longer supported.
MAT_INIT_ERR | Matrix matching recognition module initialization error.
RESERVED_P_INIT_ERR | Unused recognition module.
MTX_INIT_ERR | MTX recognition module initialization error.
FRX_INIT_ERR | FRX recognition module initialization error.
ASN_INIT_ERR | Asian recognition module initialization error.
MNG_INIT_ERR | MNG recognition module initialization error.
STSMN_HANDLE_ERR | StsMan invalid node handle error.
STSMN_NOSETTING_ERR | No settings in node.
STSMN_BADTYPE_ERR | Improper setting type.
STSMN_OPNOTALLOWED_ERR | Operation not allowed for setting or node.
STSMN_PARAMETER_ERR | Invalid parameter.
STSMN_INVALIDFILE_ERR | Settings file content invalid.
STSMN_NOTFOUND_ERR | Node not found.
STSMN_FULLSAVEDTREE_WARN | The loaded settings file may contain default values.
STSMN_BADORMISSINGREF_ERR | The reference of a symbolic link subtree is invalid or the referenced setting does not exist yet.
STSMN_EMPTYPENDVAL_WARN | Pending setting has no value in the current Settings Collection.
STSMN_NOSESSION_ERR | Storage of settings collections does not exist or too many settings collections are created.
STSMN_NOMORE_WARN | End of enumeration.
IPRO_E_NOTALLOWED | Operation not allowed.
IPRO_E_TOOMANYENGINE | Only one Engine object can be created.
IPRO_E_ENGINEINITFAILED | Engine not initialized.
IPRO_E_IMAGEFILESINITFAILED | ImageFiles collection cannot be created.
IPRO_E_MEMORYBITMAPSINITFAILED | MemoryBitmaps collection cannot be created.
IPRO_E_UDMANAGERINITFAILED | UDManager object cannot be created.
IPRO_E_BARCODETYPESINITFAILED | BarcodeTypes collection cannot be created.
IPRO_E_MODULEINFOSINITFAILED | ModuleInfos collection cannot be created.
IPRO_E_UILANGUAGESINITFAILED | UILanguages collection cannot be created.
IPRO_E_SPELLLANGUAGESINITFAILED | SpellLanguages collection cannot be created.
IPRO_E_DOCUMENTSINITFAILED | Documents collection cannot be created.
IPRO_E_SCANNERSINITFAILED | Scanners collection cannot be created.
IPRO_E_SCANNERINITFAILED | Scanner not initialized.
IPRO_E_CONVERTERSINITFAILED | Converters collection cannot be created.
IPRO_E_SETTINGMANAGERINITFAILED | SettingManager object cannot be created.
IPRO_E_OBJECTISINVALID | Invalid object: cannot be used.
IPRO_E_CONVERTERMANAGERUNKNOWN | ConverterManager not found.
IPRO_E_CONVERTERNOTFOUND | Converter not found.
IPRO_W_ZONEINVALID | Some zones have incorrect attributes.
DOCUMENT_INVALID_ERR | Corrupt document.
DOCUMENT_ACCESS_ERR | Document access error.
DOCUMENT_RDONLY_SAVE_ERR | Document is read-only.
DOCUMENT_CONVERT_ERR | Document conversion error.
DOCUMENT_SHAREVIOLATION_ERR | Sharing violation.
DOCUMENT_NOTEXIST_ERR | Document does not exist.
DOCUMENTMGR_NOTINIT_ERR | Document Manager is not initialized.
DOCUMENT_CANCEL | Document operation cancelled.
DOCUMENT_VERSION_ERR | Document version error.
DOCUMENT_ZOP_ERR | Zone operation error.
DOCUMENT_ZOP_NOTFOUND_ERR | Zone not found.
DOCUMENT_ZOP_BADSHAPE_ERR | Zone has invalid shape.
DOCUMENT_ZOP_NEEDOCR_ERR | OCR needed.
WORKFLOW_START_ERR | The starting of the active workflow has failed.
WORKFLOW_PROCESSED_ERR | The workflow is already processed.
WORKFLOW_INTERACTIVE_ERR | The workflow step is not in interactive mode.
WORKFLOW_INPUT_ERR | The workflow doesn't need any input file.
WORKFLOW_OUTPUT_ERR | The workflow doesn't need any output file.
WORKFLOW_CREATION_ERR | Workflow creation error.
WORKFLOW_INACTIVE_ERR | The workflow is inactive but the method needs an active one.
WORKFLOW_ACTIVE_ERR | The workflow is active but the method needs an inactive one.
WORKFLOW_INVALID_ERR | The workflow definition is invalid or doesn't exist.
WORKFLOW_DOCUMENT_ERR | The workflow definition doesn't belong to document.
WORKFLOW_ITEMNOTFOUND_ERR | Item not found.
WORKFLOW_PARAMNOTFOUND_ERR | Parameter not found.
WORKFLOW_PARAMEXISTS_ERR | Parameter already exists.
WORKFLOW_RECCHARS_INF | Number of recognized characters: %ls.
WORKFLOW_RECWORDS_INF | Number of recognized words: %ls.
WORKFLOW_RECREJCHARS_INF | Number of rejected characters: %ls.
WORKFLOW_LDFAXCORR_INF | Fax correction: %ls.
WORKFLOW_LDROT_INF | Rotation: %ls.
WORKFLOW_LDSKEW_WARN | Large image skew.
WORKFLOW_BARCODE_INF | An incoming barcode cover page was detected and the associated workflow was found.
WORKFLOW_BARCODE_ERR | An incoming barcode cover page was detected, but its associated workflow was not found.
WORKFLOW_LDPATTERN_WARN | There are no files with a name that matches the specified pattern.
WORKFLOW_HWND_ERR | Parent window is not defined.
WORKFLOW_HWNDCREATE_ERR | Failed to create window.
WORKFLOW_HWND_WARN | Parent window is not defined.
WORKFLOW_RECLANGCONF_WARN | Language conflict detected.
WORKFLOW_ZNMANUAL_INF | Image was zoned manually.
WORKFLOW_ZNTEMPLATE_INF | Image was template zoned: '%ls'.
WORKFLOW_IPNOTOOL_ERR | Enhancement template contains unknown tool.
WORKFLOW_IPLOAD_ERR | Error loading enhancement template file.
WORKFLOW_IPTEMPLATE_INF | Image was enhanced with '%ls'.
WORKFLOW_IPMANUAL_INF | Image was enhanced manually.
WORKFLOW_IPMANUAL_WARN | User performed no manual image enhancement.
WORKFLOW_EDBLANK_WARN | Page is blank, not saved.
WORKFLOW_EDCONVERT_WARN | Conversion of one or more images was skipped.
WORKFLOW_EDNOFILE_WARN | Output file was not generated.
WORKFLOW_DEPAGERANGE_ERR | Invalid page range.
WORKFLOW_DETEMPLATE_ERR | Invalid form template file.
WORKFLOW_LDPDFCREATE_ERR | Communication error with the PDF printer driver.
WORKFLOW_GOOGLEDOCS_FILETYPE_ERR | Cannot save this file type to GoogleDocs.
WORKFLOW_EVERNOTE_FILETYPE_ERR | Cannot save this file type to Evernote.
WORKFLOW_LDBLANKPAGE_WARN | Blank page was detected and skipped.
WORKFLOW_INTERACTIONSUPRESSED_WARN | User interaction was suppressed.
WORKFLOW_CANCEL_WARN | User canceled the operation.
WORKFLOW_PAGECLASS_WARN | Page could not be classified.
WORKFLOW_PAGECLASS_INF | Page was classified: %ls.
LINK_MORESPACE_ERR | Need a bigger buffer.
LINK_CANCEL_WARN | User canceled the operation.
LINK_NOTAUTHORIZED_ERR | Not authorized to access the server.
LINK_NOTFOUND_ERR | Couldn't find the path.
LINK_FILEEXISTS_ERR | The specified file already exists on the server.
LINK_EVERNOTE_BAD_DATA_FORMAT | The format of the request data was incorrect.
LINK_EVERNOTE_PERMISSION_DENIED | Not permitted to perform action.
LINK_EVERNOTE_DATA_REQUIRED | A required parameter/field was absent.
LINK_EVERNOTE_LIMIT_REACHED | Operation denied due to data size limit.
LINK_EVERNOTE_QUOTA_REACHED | Operation denied due to user storage limit.
LINK_EVERNOTE_INVALID_AUTH | Username and/or password incorrect.
LINK_EVERNOTE_AUTH_EXPIRED | Authentication token expired/revoked.
LINK_EVERNOTE_DATA_CONFLICT | Change denied due to data conflict.
LINK_EVERNOTE_ENML_VALIDATION | Content of submitted note was malformed.
LINK_EVERNOTE_SHARD_UNAVAILABLE | Service shard with account data is temporarily down.
LINK_EVERNOTE_TOO_WHATEVER | Operation denied due to data size limit.
LINK_EVERNOTE_UNSUPPORTED_OPERATION | Operation denied because it is currently unsupported.
LINK_EVERNOTE_TAKEN_DOWN | Operation denied because access to the corresponding object is prohibited in response to a take-down notice.
LINK_EVERNOTE_RATE_LIMIT_REACHED | Operation denied because the calling application has reached the hourly API call limit of the user.
LINK_EVERNOTE_BUSINESS_SECURITY_LOGIN_REQUIRED | Access to a business account has been denied because the user must complete additional steps in order to comply with business security requirements.
LINK_EVERNOTE_DEVICE_LIMIT_REACHED | Operation denied because the maximum allowed number of devices of the user has exceeded.

◆ RETCODEINFO

enum RETCODEINFO

Error code (return code) categories.

The RECERR codes can be grouped into some categories according to their types. These categories can be queried to a specified error code by calling kRecGetErrorInfo.

Enumerator
RET_OK | Normal operation (REC_OK)
RET_WARNING | A warning situation (like NO_TXT_WARN or IMF_PASSWORD_WARN etc.)
RET_MEMORY_ERROR | A memory allocation releated error (like FILE_MEM_ERR or MEM_INVALIDPOINTER_ERR etc.)
RET_FILE_ERROR | A file handling error (like FILE_NOTFOUND_ERR or IMF_FILENOTEMPTY_ERR etc.)
RET_SCANNER_ERROR | A scanner related error (like RSD_PAPERJAM or RSD_COVEROPEN etc.)
RET_IMAGE_ERROR | An image problem (like IMG_SIZE_ERR or IMF_NOTSUP_ERR etc.)
RET_OCR_ERROR | A recognition problem (like FRX_INIT_ERR or BAR_INVALID_CODE_ERR etc.)
RET_TEXT_ERROR | A text conversion error (like L_ERROR_TOO_MANY_SHEETS or L_FERROR_PERMISSION etc.)
RET_OTHER_ERROR | Uncategorized error (like CHR_LANG_NOTFOUND_ERR or API_PROCESS_ABORTED_ERR etc.)
RET_UNKNOWN | The return code is unknown.

Function Documentation

◆ kRecGetErrorInfo()

RETCODEINFO RECAPIKRN kRecGetErrorInfo | ( | RECERR | ErrCode,
 |  | LPCSTR * | lpErrSym )

Getting additional information about an error.

The kRecGetErrorInfo function retrieves some information about an error code.

Parameters
[in] | ErrCode | RECERR error code.
[out] | lpErrSym | Pointer of a variable to store a pointer of an internal string. This string is the symbolic representation of the error code.
Return values
RETCODEINFO Specifies an error category (no error is RET_OK, warnings are RET_WARNING, while other values mean different error situations like RET_FILE_ERROR, RET_SCANNER_ERROR, RET_IMAGE_ERROR, etc.).
Note
The symbolic name of the error is returned in lpErrSym. The symbolic name is "REC_OK" for REC_OK, "FILE_ERR" for FILE_ERR, etc. This string can be used to do localized error message handling as the symbolic name is version independent.
Error code symbols are available in ASCII encoding. You may use kRecConvertCodePage2UnicodeEx to convert to UTF-16.
The specification of this function in C# is:
RETCODEINFO kRecGetErrorInfo(RECERR re, out string pErrSym);
RETCODEINFO
RETCODEINFO
Error code (return code) categories.
Definition RECERR.h:29
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecGetErrorInfo
RETCODEINFO RECAPIKRN kRecGetErrorInfo(RECERR ErrCode, LPCSTR *lpErrSym)
Getting additional information about an error.
The specification of this function in Java is:
int kRecGetErrorInfo(int ErrCode, String[] lpErrSym)
The specification of this function in Python is:
def kRecGetErrorInfo(ErrCode: int) -> Tuple[int, str]

◆ kRecGetErrorUIText()

RECERR RECAPIKRN kRecGetErrorUIText | ( | RECERR | ErrCode,
 |  | LONG | ErrExt,
 |  | LPCTSTR | lpErrStr,
 |  | LPTSTR | lpErrUIText,
 |  | int * | pBuffLen )

Getting the error text of an error.

The kRecGetErrorUIText function retrieves the error text of an error code in the language specified with kRecSetUILang.

Parameters
[in] | ErrCode | RECERR error code.
[in] | ErrExt | The value of the extended error code returned by kRecGetLastError
[in] | lpErrStr | The value of the additional textual information returned by kRecGetLastError
[out] | lpErrUIText | A string buffer to store the error text in current codepage or UTF-16 in Windows or UTF-8 in Linux and MacOS
[in,out] | pBuffLen | Pointer to the length of the string buffer. On entering it contains the length of the buffer, on returning it gets the exact length of the full string with the terminating zero.
Return values
RECERR
Note
You can call this function twice: first with lpErrUIText == NULL, second with lpErrUIText of the required length. ErrExt and lpErrStr are those returned by a single call to kRecGetLastError
The specification of this function in C# is:
RECERR kRecGetErrorUIText(RECERR errCode, int errExt, string errStr, out string errUIText);
kRecGetErrorUIText
RECERR RECAPIKRN kRecGetErrorUIText(RECERR ErrCode, LONG ErrExt, LPCTSTR lpErrStr, LPTSTR lpErrUIText, int *pBuffLen)
Getting the error text of an error.
The specification of this function in Java is:
int kRecGetErrorUIText(int ErrCode, int ErrExt, String lpErrStr, String[] lpErrUIText)
The specification of this function in Python is:
def kRecGetErrorUIText(ErrCode: int, ErrExt: "LONG", lpErrStr: str) -> Tuple[int, str]

◆ kRecGetLastError()

RECERR RECAPIKRN kRecGetLastError | ( | LONG * | pErrExt,
 |  | LPTSTR | pErrStr,
 |  | int | buflen )

Getting last error.

This function provides additional information on the error returned with the previous RecAPI function. This function should be called immediately after any RecAPI API call when the function returned with a value other than REC_OK. Its return code, an extended error code and a supplementary character string may help to identify the problem.

Parameters
[out] | pErrExt | Pointer of a variable to store the extended error code. Zero (0) value of extended error means there is no extended error information. This parameter can be NULL.
[out] | pErrStr | Pointer of a string buffer to store the supplementary character string with additional textual information about the error. Its empty string value means there is no such information. This parameter can be NULL.
[in] | buflen | Length of the string buffer.
Return values
RECERR The main error code which is the same as the one returned with the failed function.
Note
See also the function kRecGetLastErrorEx for getting information about more than one error or warning.
There are typical file-related error situations, e.g. a file cannot be created or found. For these errors the return code of this function contains the error code (e.g. FILE_OPEN_ERR) and the supplementary character string contains the name of the file.
kRecGetErrorInfo can be used for retrieving some additional information about an error.
kRecGetErrorUIText can be used for retrieving the error text of an error code.
The specification of this function in C# is:
RECERR kRecGetLastError(out int ErrExt, out string ErrStr);
// or when pErrExt is NULL in C/C++
RECERR kRecGetLastError(out string ErrStr);
// or when pErrStr is NULL in C/C++
RECERR kRecGetLastError(out int ErrExt);
// or when both are NULL
RECERR kRecGetLastError();
kRecGetLastError
RECERR RECAPIKRN kRecGetLastError(LONG *pErrExt, LPTSTR pErrStr, int buflen)
Getting last error.
The specification of this function in Java is:
int kRecGetLastError(int[] pErrExt, String[] pErrStr)
The specification of this function in Python is:
def kRecGetLastError() -> Tuple[int, int, str]

◆ kRecGetLastErrorEx()

RECERR RECAPIKRN kRecGetLastErrorEx | ( | LONG * | pErrExt,
 |  | LPTSTR * | ppErrStr,
 |  | LPTSTR * | ppErrXml )

Getting last error.

This function provides additional information on the error or errors returned by the previous RecAPI function. kRecGetLastErrorEx is an extension of the kRecGetLastError function. The main difference between the two is that this function can return information about several errors or warnings, not only the first one that occurred at the previous function. This function should be called immediately after any RecAPI API call when the function returned with a value other than REC_OK.

Parameters
[out] | pErrExt | Pointer of a variable to store the extended error code of the first error. Zero (0) value of extended error means there is no extended error information. This parameter can be NULL.
[out] | ppErrStr | Address of a pointer to a string which is allocated and filled by this function with additional textual information about the error. The string is an empty string if there is no additional information. This parameter can be NULL.
[out] | ppErrXml | Address of a pointer to a string which is allocated and filled by this function with XML data for all the errors that happened. The string is an empty string if there are no errors. This parameter can be NULL.
Return values
RECERR The main error code which is the same as that one returned with the failed function.
Note
The memory allocated for ppErrStr and ppErrXml must be released using kRecFree.
The return value and the extended error code are for a single error, just as with the kRecGetLastError function. The ppErrStr error string also contains the same information as with the kRecGetLastError function, while the ppErrXml string contains an XML element for each error and warning that happened during the previous function call. This function could be more handy than the kRecGetLastError function even when you do not need the XML string because there is no buffer length problem with this function.
The string returned in ppErrXml contains elements in XML format. Its root element is an <errors> tag containing <error/> and <warning/> tags with information about the error (or warning) in different attributes. The usual attributes are as follows:
  • code="number": number is a hexadecimal string containing the RECERR code
  • sym="string": string is the symbolic representation of the RECERR code (e.g. "FILE_OPEN_ERR")
  • ext="number": number is a hexadecimal string containing the extended error code, if any
  • str="string": string is the supplementary character string with additional textual information about the error or warning, if any
There are additional container elements in case of kRecProcessPages and kRecProcessPagesEx functions. These elements specify the file name and the file page where the error or warning happened. The usual structure is the following:
<errors>
<file name="filename">
<page filepage="number" pagenum="number">
<error code="number" sym="string"/>
</page>
</file>
</errors>
The 1 based filepage attribute contains the hexadecimal value of the page number of the file, so it is reset to 1 at each file. The 1 based pagenum attribute contains the global page number (also hexadecimal).
When the image source is a scanner at the kRecProcessPages function, then only a page container element is added for each error with a single pagenum attribute.
There are no such container elements at page oriented functions. There are typical file-related error situations, e.g. a file cannot be created or found. For these errors the the 'str' attribute of the error element contains the name of the file.
See kRecGetLastError, kRecGetErrorInfo and kRecGetErrorUIText for additional information.
The specification of this function in C# is:
RECERR kRecGetLastErrorEx(out string ErrXml);
kRecGetLastErrorEx
RECERR RECAPIKRN kRecGetLastErrorEx(LONG *pErrExt, LPTSTR *ppErrStr, LPTSTR *ppErrXml)
Getting last error.
Note that there are no ErrExt and ErrStr parameters in C#, the function returns the XML string only! If you need the simpler single-error functionality, use the kRecGetLastError function.
The specification of this function in Java is:
int kRecGetLastErrorEx(String[] ppErrXml)
The specification of this function in Python is:
def kRecGetLastErrorEx() -> Tuple[int, str]

◆ watch_recerr()

RECKRNDLL LPCSTR RECKRNCALL watch_recerr ( RECERR ErrCode )

Debugging utility function: Getting a string with the symbolic error code.

The watch_recerr function retrieves the symbolic error code of an error.

Parameters
[in] ErrCode RECERR error code.
Return values
LPCSTR A pointer to the error string.
Note
This function is designed to be used in a Watch window while debugging an application. Most of the error codes are large negative numbers, less than -32768, and Visual Studio is not able to show their symbolic value when you place the mouse pointer over a RECERR variable. This function does not have any side effects, so it can be safely used in Watch expressions. For example, to see a legible code value of the variable rc put the expression
watch_recerr(rc)
watch_recerr
RECKRNDLL LPCSTR RECKRNCALL watch_recerr(RECERR ErrCode)
Debugging utility function: Getting a string with the symbolic error code.
in a Watch window.
In most cases Visual Studio's standard search rules do not find a symbol in a different DLL, therefore we suggest you create a function in your module as follows and use your function in the watch window:
const char *recerr(RECERR ErrCode)
{
return watch_recerr(ErrCode);
}


RecAPI: Settings Manager Module

Classes | Typedefs | Enumerations | Functions
Settings Manager Module
KernelAPI » General Operations Module

This is the manager of settings at the KernelAPI level. More...

Classes

struct SEnumTypeElement
Descriptor structure of an enum type element. More...

Typedefs

typedef struct RECSTSSTRUCT * HSETTING
Handle of a setting.

Enumerations

enum STSTYPES {
STS_UNDEFINED ,
STS_ENUM ,
STS_INT ,
STS_DOUBLE ,
STS_BOOL ,
STS_STRING ,
STS_USTRING ,
STS_ARRAY_INT ,
STS_ARRAY_DOUBLE ,
STS_ARRAY_ENUM ,
STS_ARRAY_BOOL ,
STS_SET ,
STS_REF
}
Type ID's of settings. More...

Functions

RECERR RSTSAPI | kRecSettingGetHandle (HSETTING root_of_query, const char *symb_name, HSETTING *ret_handle, INTBOOL *has_setting)
Getting the handle of a node.
RECERR RSTSAPI | kRecSettingHasSetting (HSETTING node, INTBOOL *has_setting)
Querying whether it is a setting.
RECERR RSTSAPI | kRecSettingGetType (HSETTING sett, STSTYPES *type)
Querying the type.
RECERR RSTSAPI | kRecSettingIsFlagSet (HSETTING sett, unsigned int flgs, INTBOOL *is_set)
Querying flags.
RECERR RSTSAPI | kRecSettingGetName (HSETTING node, const char **the_name)
Querying the name.
RECERR RSTSAPI | kRecSettingIsDefault (int sid, HSETTING node, INTBOOL *is_default)
Checking whether the setting is default or not.
RECERR RSTSAPI | kRecSettingGetNextChild (HSETTING the_parent, HSETTING prev_child, HSETTING *the_child)
Enumerating children.
RECERR RSTSAPI | kRecSettingGetCloneOrigin (HSETTING clone_node, HSETTING *origin_node)
Accessing the origin of the clone node.
RECERR RSTSAPI | kRecSettingGetInt (int sid, HSETTING sett, int *the_value)
Accessing the current value of an STS_INT or STS_ENUM or STS_BOOL setting.
RECERR RSTSAPI | kRecSettingGetDouble (int sid, HSETTING sett, double *the_value)
Accessing the current value of an STS_DOUBLE setting.
RECERR RSTSAPI | kRecSettingGetString (int sid, HSETTING sett, const char **the_value)
Accessing the current value of an STS_STRING setting.
RECERR RSTSAPI | kRecSettingGetUString (int sid, HSETTING sett, const WCHAR **the_value)
Accessing the current value of an STS_USTRING setting.
RECERR RSTSAPI | kRecSettingGetIntArray (int sid, HSETTING sett, const int **the_value)
Accessing the current value of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET setting.
RECERR RSTSAPI | kRecSettingGetDoubleArray (int sid, HSETTING sett, const double **the_value)
Accessing the current value of a STS_ARRAY_DOUBLE setting.
RECERR RSTSAPI | kRecSettingGetIntArrayAt (int sid, HSETTING sett, int index, int *the_value)
Accessing an element of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET setting.
RECERR RSTSAPI | kRecSettingGetDoubleArrayAt (int sid, HSETTING sett, int index, double *the_value)
Accessing an element of an STS_ARRAY_DOUBLE setting.
RECERR RSTSAPI | kRecSettingGetIntDefault (HSETTING sett, int *the_default)
Accessing the default value of an STS_INT or STS_ENUM or STS_BOOL setting.
RECERR RSTSAPI | kRecSettingGetDoubleDefault (HSETTING sett, double *the_default)
Accessing the default value of a STS_DOUBLE setting.
RECERR RSTSAPI | kRecSettingGetStringDefault (HSETTING sett, const char **the_default)
Accessing the default value of an STS_STRING setting.
RECERR RSTSAPI | kRecSettingGetUStringDefault (HSETTING sett, const WCHAR **the_default)
Accessing the default value of an STS_USTRING setting.
RECERR RSTSAPI | kRecSettingGetIntArrayDefault (HSETTING sett, const int **the_default)
Accessing the default value of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET setting.
RECERR RSTSAPI | kRecSettingGetDoubleArrayDefault (HSETTING sett, const double **the_default)
Accessing the default value of an STS_ARRAY_DOUBLE setting.
RECERR RSTSAPI | kRecSettingGetSymbolic (int sid, HSETTING sett, char *the_value, unsigned int *buffer_size)
Getting value in a string format.
RECERR RSTSAPI | kRecSettingGetIntArrayDefaultAt (HSETTING sett, int index, int *the_default)
Accessing an element of the default value of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET setting.
RECERR RSTSAPI | kRecSettingGetDoubleArrayDefaultAt (HSETTING sett, int index, double *the_default)
Accessing an element of the default value of an STS_ARRAY_DOUBLE setting.
RECERR RSTSAPI | kRecSettingGetNumberOfEnumElements (HSETTING sett, int *num_of_values)
Getting the number of enum elements.
RECERR RSTSAPI | kRecSettingGetEnumElement (HSETTING sett, int index, const char **str_value, int *int_value)
Getting an enum element.
RECERR RSTSAPI | kRecSettingSetInt (int sid, HSETTING sett, int new_value)
Setting the value of an STS_INT or STS_ENUM or STS_BOOL setting.
RECERR RSTSAPI | kRecSettingSetDouble (int sid, HSETTING sett, double new_value)
Setting the value of a STS_DOUBLE setting.
RECERR RSTSAPI | kRecSettingSetString (int sid, HSETTING sett, const char *new_value)
Setting the value of an STS_STRING or STS_USTRING setting.
RECERR RSTSAPI | kRecSettingSetUString (int sid, HSETTING sett, const WCHAR *new_value)
Setting the value of a STS_STRING or STS_USTRING setting.
RECERR RSTSAPI | kRecSettingSetIntArray (int sid, HSETTING sett, const int *new_values)
Setting the value of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET setting.
RECERR RSTSAPI | kRecSettingSetDoubleArray (int sid, HSETTING sett, const double *new_values)
Setting the value of an STS_ARRAY_DOUBLE setting.
RECERR RSTSAPI | kRecSettingSetIntArrayAt (int sid, HSETTING sett, int index, int new_value)
Setting the value of an element of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET setting.
RECERR RSTSAPI | kRecSettingSetDoubleArrayAt (int sid, HSETTING sett, int index, double new_value)
Setting an element of the value of an STS_ARRAY_DOUBLE setting.
RECERR RSTSAPI | kRecSettingSetToDefault (int sid, HSETTING sett, INTBOOL whole_subtree)
Setting the value to default.
RECERR RSTSAPI | kRecSettingSetToDefaultPlusC (int sid, HSETTING sett, INTBOOL whole_subtree)
Setting the value to default (also in cloned settings).
RECERR RSTSAPI | kRecSettingSetArrayToDefaultAt (int sid, HSETTING sett, int index)
Setting the element of an array to default.
RECERR RSTSAPI | kRecSettingSetArrayToDefaultAtPlusC (int sid, HSETTING sett, int index)
Setting the element of an array to default (also in cloned settings).
RECERR RSTSAPI | kRecSettingGetSizeOfArray (HSETTING sett, int *the_size)
Getting the size of an array.
RECERR RSTSAPI | kRecSettingCreateInt (HSETTING *created_setting, STSTYPES type, HSETTING root_of_creation, const char *symb_name, unsigned int flags, int def_value, const SEnumTypeElement *enum_elements)
Creating an int setting (STS_INT or STS_ENUM or STS_BOOL).
RECERR RSTSAPI | kRecSettingCreateDouble (HSETTING *created_setting, HSETTING root_of_creation, const char *symb_name, unsigned int flags, double def_value)
Creating a double setting (STS_DOUBLE).
RECERR RSTSAPI | kRecSettingCreateString (HSETTING *created_setting, HSETTING root_of_creation, const char *symb_name, unsigned int flags, const char *def_value)
Creating a string setting (STS_STRING).
RECERR RSTSAPI | kRecSettingCreateUString (HSETTING *created_setting, HSETTING root_of_creation, const char *symb_name, unsigned int flags, const WCHAR *def_value)
Creating a unicode string setting (STS_USTRING).
RECERR RSTSAPI | kRecSettingCreateIntArray (HSETTING *created_setting, STSTYPES type, HSETTING root_of_creation, const char *symb_name, int size, unsigned int flags, const int *def_values, const SEnumTypeElement *enum_elements)
Creating an int array setting (STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET).
RECERR RSTSAPI | kRecSettingCreateDoubleArray (HSETTING *created_setting, HSETTING root_of_creation, const char *symb_name, int size, unsigned int flags, const double *def_values)
Creating a double array setting (STS_ARRAY_DOUBLE).
RECERR RSTSAPI | kRecSettingDelete (HSETTING node)
Deleting a setting.
RECERR RSTSAPI | kRecSettingDeleteSubtree (HSETTING root_of_subtree)
Deleting a subtree.
RECERR RSTSAPI | kRecSettingClone (HSETTING root_of_cloning, const char *new_symb_name)
Creating a clone.
RECERR RSTSAPI | kRecSettingLoad (int sid, LPCTSTR filename)
Loading settings.
RECERR RSTSAPI | kRecSettingSave (int sid, HSETTING root_of_subtree, LPCTSTR filename, INTBOOL save_all, INTBOOL append)
Saving settings.
RECERR RSTSAPI | kRecSettingCopyValues (HSETTING node, int from_sid, int to_sid, INTBOOL whole_subtree)
Copying the values between Settings Collections.

Flags of settings

#define | STSFLG_DEFAULT 0x00000000
The default flag.
#define | STSFLG_HIDDEN 0x00000001
It does not appear in the enumeration and its succedents also do not.
#define | STSFLG_INFO 0x00000002
This setting returns some information from a previous process. Its value cannot be changed by the User.
#define | STSFLG_DONTSAVE 0x00000004
It does not appear in any saved file.
#define | STSFLG_GLOBAL 0x00000008
Its value is stored in a global place, not in the Settings Collection area, thus it has the same value in all the Settings Collections.
#define | STSFLG_ENCRYPT 0x00000010
It requires encryption before getting its value symbolically, thus it is saved/loaded in an encrypted form.
#define | STSFLG_USER 0x00000020
This is a user-defined setting (created through C API calls). This flag is set automatically! Only the user-defined settings can be deleted.
#define | STSFLG_BITFIELD 0x00000040
This is a bitfield enum setting. It is only an information flag (i.e. bitfield and non-bitfield enums are handled in the same way), but it is unmasked from non-enum settings.
#define | STSFLG_STAYINPENDING 0x00000080
Internal use only.
#define | STSFLG_CLONEDBIT 0x00000100
This is a clone of another setting.
#define | STSFLG_DONTSETTODEFAULT 0x00000200
When kRecSettingSetToDefault sets all the settings of a given subtree of the setting tree to their default values, the settings having this flag are not set.
#define | STSFLG_SLINK 0x00000400
This is a symbolic link to a subtree of settings. See the description of symbolic links.
#define | STSFLG_CLONED (STSFLG_CLONEDBIT | STSFLG_USER)
All the clones have a user-flag for deletable property.
#define | STSFLG_RESERVED (STSFLG_USER|STSFLG_STAYINPENDING|STSFLG_CLONEDBIT|0xFF000000)
These flags cannot be set by the User, thus they will be unmasked in the API functions creating settings.

Detailed Description

This is the manager of settings at the KernelAPI level.

The settings are organized into a tree. Each node has a name that does not contain a point, which must be unique among the children of its parent node. It is not necessarily unique among all the nodes of the tree. Because of this, each node is identified by its symbolic name, which mirrors the path from the root of the tree to that node, thus it is globally unique. This symbolic name contains the names of the nodes separated by points in the order of their appearance in the path. The name of the root is an empty string. The name of each setting is case-insensitive.

For example on the 1st layer of the tree, there is a node named Kernel. This is the root of the subtree of the kernel settings. One of them is the Timeout, which is a child of the Kernel node, thus its symbolic name is Kernel.Timeout. Of course, the tree can have more than two layers (e.g. Kernel.Img.Deskew.Slope). See also the diagram below.

A setting handle (HSETTING) can be retrieved for each node by referring to its symbolic name. Any other operations can be done with this handle.

There are two types of nodes. One has a setting (e.g. Kernel.Decomp.Method), the other does not (e.g. Kernel.Decomp). The API gives an approach for handling settings, but there are some cases when a simple node can also be passed (e.g. saving a subtree into a file), thus a handle can be retrieved for both types. Of course, there can be more than one node having a setting in the same path.

Different types of settings can be defined: integer (including int, bool and enum), double, integer array (including int, bool, enum and set array), double array, string and Unicode string (see STSTYPES). Their value can be set or got by their types or it can be got symbolically (represented in a string format) for any type.

Every setting has a default value, which cannot be changed during the whole lifetime of that setting. It can be set only at creating. On the other hand, every setting has a current value, which can be different in different Settings Collections. Of course, the current value can be changed anytime in any collection.

For example, here are some paths and nodes relating to image deskewing and despeckling. Double-border boxes denote nodes with a setting; single border boxes denote settingless nodes. Two symbolic (path) names are shown as examples, for nodes with settings. Each setting can take only one value at a time, but different values can be stored in different Settings Collections, as the example shows for the deskew mode.

Every setting has flags for specializing its work, which cannot be changed during the whole lifetime of that setting. They can be set only at creating.

DevKit Users can create their own settings, store them in the same tree and maintain them in the same way. The name of a setting must not contain the following characters:

  • ';' - it denotes comments in setting files,
  • ':' - it is the separator of the origin name in setting files,
  • '=' - it is the separator of the value in setting files,
  • '*' - it denotes the root of a clone subtree in setting files.

The creation of an individual setting cannot redefine a previously created setting having the same name. In such a case, the previously defined one remains unchanged and the more recent definition is lost.

Since the definition of each setting is at runtime, there can be some cases when the setting has been created before its real definition (e.g. at loading its value from a file). In this case, a special pending setting is created, which does not have any type. It has only a name (thus it is inserted into the tree) and value-strings (in a symbolic string format) in the proper Settings Collection(s) (where it has been loaded). In this state, the value of such a setting cannot be changed except by loading. On the other hand, its value can be saved from the proper Settings Collection(s). At the real definition of such a setting these symbolic values are parsed into the type of the defined setting.

Any subtree can be cloned, i.e. it can be duplicated. The original subtree and its clone have the same parent node. If a new node is inserted into an original subtree, its clone will be inserted into all clones of the subtree as well.

IMPORTANT NOTE: it is not recommended to create a setting that is wanted to be created by a later cloning step.

Any subtree can be saved into a file, which can contain lines of the following form:

setting.name.with.full.path : origin.name.with.full.path = value_in_string_format

or

setting.name.with.full.path : origin.name.with.full.path *

The former is for a setting, the latter is for a settingless node (which is generally the root of a clone subtree). Of course, the origin name is written only at clone settings. The string format value is the same as the one that can be got symbolically, directly from StsMan (see kRecSettingGetSymbolic). The string format of int and double settings contains only the number, that of the enum and bool settings contain the identifier of the given enum elements (the value may be a combination of some elements, in this case the element ID's are separated by a '|', if the value does not have any ID, it is represented by the number itself). The symbolic value of strings and unicode strings may contain escape sequences and that of the arrays contains the elements of the array in the appropriate form (one of the above), separated with commas.

Of course, the setting files can be loaded. This operation changes only the value of the settings being in the file. Thus if a setting missing from the file was chagned before loading, its value is not affected by the loading operation. See notes of kRecSettingLoad for details. A setting file may be changed manually, but it is not recommended, because mistyping of a setting name or a value may be very complicated to be realized or tracked.

Symbolic links

The symbolic link is a special type of string setting. It points to a subtree of the setting tree by its value (i.e. its value must be the name of the root node of the indicated subtree). Symbolic links can be created by kRecSettingCreateString using the flag STSFLG_SLINK.

The settings of the referenced subtree can be accessed in the same way as if they were the settings of a subtree, whose root is the symbolic link setting. Under the symbolic link node, there are reference nodes for indicating the nodes of the linked subtree.

For example, there may be a symbolic link setting MyOMgr. Let its value be the string "Kernel.OcrMgr", which is an existing node in the tree. In this case, the default filling method can be accessed through the setting Kernel.OcrMgr.DefaultFillingMethod and also through the reference MyOMgr.DefaultFillingMethod.

The creation and working of references are automatic after adjusting the value of the symbolic link, thus settings should not be created under the symbolic link. Of course, the references can be used with their own HSETTING. If the value of a symbolic link is changed, a reference will point to an element of a new referenced subtree, but its HSETTING remains the same.

Note
The HSETTING identifies a node in the setting tree. In general, it is unchanged from its creation during the further working of the Engine. But in the case of User-defined settings it cannot be guaranteed, because the integrating application can delete these settings at run time. Thus possible parallel storing and deleting of a HSETTING should be avoided.
There are some functions that retrieve a pointer allocated by StsMan and not by the User. Of course, these pointers may lose their validity according to their role. For example, the internal buffer of the current value of a string setting may be reallocated when the value of that string is changed, thus the formerly retrieved pointer of this buffer may become invalid. Therefore the use of some critical section may be a good practise. It is not required to call any releasing function for these retrieved internal pointers and of course freeing functions must not be called for them.
Saving the value of an enum setting writes the name of the enumerator or the pipe-separated names if the value is a combination of enumerators. A setting file can contain both enumerators or numeric values for an enum setting. However, it is recommended to put enumerator names into a manually created setting file (if it is possible), because the numeric value of a particular enumerator may be changed between versions. See the following code fragment, which put the following line into the setting file: MySettings.Enum = VENUM1|VENUM2+1, which means that the value of the setting cannot be combined exclusively with enumerators.
...
typedef enum E_VENUM
{
VENUM1 = 2,
VENUM2 = 4
} E_VENUM;
...
{
...
HSETTING createds;
int sid = 0;
...
// Defining the enum type
SEnumTypeElement enum_elements = new SEnumTypeElement[3];
enum_elements[0].id = "VENUM1"; enum_elements[0].value = VENUM1;
enum_elements[1].id = "VENUM2"; enum_elements[1].value = VENUM2;
enum_elements[2].id = NULL;
// Creating the setting
kRecSettingCreateInt(&createds, STS_ENUM, NULL, "MySettings.Enum", STSFLG_DEFAULT, VENUM1, enum_elements);
delete [] enum_elements; // It can be deleted right after creation.
...
// Changing the value
kRecSettingSetInt(sid, createds, 5);
...
// Saving the settings
kRecSettingSave(sid, createds, "path/mysetting.sts", TRUE, FALSE);
...
}
kRecSettingSave
RECERR RSTSAPI kRecSettingSave(int sid, HSETTING root_of_subtree, LPCTSTR filename, INTBOOL save_all, INTBOOL append)
Saving settings.
kRecSettingCreateInt
RECERR RSTSAPI kRecSettingCreateInt(HSETTING *created_setting, STSTYPES type, HSETTING root_of_creation, const char *symb_name, unsigned int flags, int def_value, const SEnumTypeElement *enum_elements)
Creating an int setting (STS_INT or STS_ENUM or STS_BOOL).
kRecSettingSetInt
RECERR RSTSAPI kRecSettingSetInt(int sid, HSETTING sett, int new_value)
Setting the value of an STS_INT or STS_ENUM or STS_BOOL setting.
STSFLG_DEFAULT
#define STSFLG_DEFAULT
The default flag.
Definition KrnStsApi.h:330
HSETTING
struct RECSTSSTRUCT * HSETTING
Handle of a setting.
Definition KrnStsApi.h:287
STS_ENUM
@ STS_ENUM
Definition KrnStsApi.h:306
SEnumTypeElement
Descriptor structure of an enum type element.
Definition KrnStsApi.h:297
SEnumTypeElement::id
const char * id
Identifier of the given element of the enum type.
Definition KrnStsApi.h:298
SEnumTypeElement::value
int value
Value of the given element of the enum type.
Definition KrnStsApi.h:299
The function kRecQuit removes all the Settings Collections, pending and user settings, and sets the remaining settings to default, so the setting states are the same after every subsequent kRecQuit - kRecInit pair. In previous versions of CSDK the kRecQuit did not do these steps, thus after a subsequent kRecInit all the settings existed and had the same value as before the previous kRecQuit. This behaviour can be simulated in CSDK v16 or later doing a workaround: Before kRecQuit:
  1. save the required setting values from the required Settings Collections,
After kRecInit:
  1. create all the required user settings,
  2. create the required Settings Collections,
  3. load the proper setting files into the proper Settings Collections.
For C++-fan DevKit Users, we created a wrapper API (with its public sources in KrnStsCppApi.h) on KernelAPI, which is also a good sample for usage of StsMan through KernelApi calls.
See the list of all the RecAPI settings for more information.
The following sample code demonstrates the most important operations of the settings.
int MySpecialInit ()
{
HSETTING hdtxt_outformat, hmy_output_name;
RECERR err = REC_OK;
DTXTOUTPUTFORMATS dtxt_outformat = DTXT_TXTS;
int my_session = kRecCreateSettingsCollection(0);
//Creating a string setting (the NULL root is equal to the root of the whole
//tree). This setting will not be saved into a file (DONTSAVE flag).
err = kRecSettingCreateString(&hmy_output_name, NULL, "MyIni.Output.Name",
STSFLG_DONTSAVE, "path/out.txt");
...
//Loading a setting file.
err = kRecSettingLoad(my_session, "last_opt.sts");
...
//Getting the handle of a setting. The passed name must be relative to the
//root of the query, which is equal to the root of the whole tree here. The INTBOOL parameter
//has_setting (here NULL) indicates whether the node has a setting or not.
err = kRecSettingGetHandle(NULL, "Kernel.DTXT.DirectTxtFormat", &hdtxt_outformat, NULL);
if (err == REC_OK)
//Getting the value of an enum (int) setting.
err = kRecSettingGetInt(my_session, hdtxt_outformat, (int *)&dtxt_outformat);
...
//Setting the value of our own string setting created above.
switch (dtxt_outformat)
{
case DTXT_TXTF:
err = kRecSettingSetString(my_session, hmy_output_name, "path/rtf/out.txt");
break;
case DTXT_TXTCSV:
err = kRecSettingSetString(my_session, hmy_output_name, "path/html/out.csv");
break;
case DTXT_IOTPDF:
err = kRecSettingSetString(my_session, hmy_output_name, "path/pdf/out.pdf");
break;
case DTXT_XMLCOORD:
err = kRecSettingSetString(my_session, hmy_output_name, "path/xml/out.xml");
break;
case DTXT_BINARY:
err = kRecSettingSetString(my_session, hmy_output_name, "path/html/out.bin");
break;
default:
//Setting the value to default. (FALSE is for indicating that only the given
//setting must be set not the whole subtree, whose root is the given
//setting.)
err = kRecSettingSetToDefault(my_session, hmy_output_name, FALSE);
}
...
//Every initialisation step of this function is done in the session created
//above. Thus it must be retrieved outside.
return my_session;
}
DTXTOUTPUTFORMATS
DTXTOUTPUTFORMATS
DTXT output formats.
Definition KernelApi.h:9582
DTXT_BINARY
@ DTXT_BINARY
Definition KernelApi.h:9588
DTXT_TXTF
@ DTXT_TXTF
Definition KernelApi.h:9585
DTXT_XMLCOORD
@ DTXT_XMLCOORD
Definition KernelApi.h:9587
DTXT_TXTS
@ DTXT_TXTS
Definition KernelApi.h:9583
DTXT_IOTPDF
@ DTXT_IOTPDF
Definition KernelApi.h:9589
DTXT_TXTCSV
@ DTXT_TXTCSV
Definition KernelApi.h:9584
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
REC_OK
@ REC_OK
Successful operation, no error.
Definition RECERR_doc.h:20
kRecCreateSettingsCollection
int RECAPIKRN kRecCreateSettingsCollection(int sid)
Creating a new Settings Collection.
kRecSettingSetString
RECERR RSTSAPI kRecSettingSetString(int sid, HSETTING sett, const char *new_value)
Setting the value of an STS_STRING or STS_USTRING setting.
kRecSettingCreateString
RECERR RSTSAPI kRecSettingCreateString(HSETTING *created_setting, HSETTING root_of_creation, const char *symb_name, unsigned int flags, const char *def_value)
Creating a string setting (STS_STRING).
kRecSettingSetToDefault
RECERR RSTSAPI kRecSettingSetToDefault(int sid, HSETTING sett, INTBOOL whole_subtree)
Setting the value to default.
kRecSettingGetInt
RECERR RSTSAPI kRecSettingGetInt(int sid, HSETTING sett, int *the_value)
Accessing the current value of an STS_INT or STS_ENUM or STS_BOOL setting.
kRecSettingGetHandle
RECERR RSTSAPI kRecSettingGetHandle(HSETTING root_of_query, const char *symb_name, HSETTING *ret_handle, INTBOOL *has_setting)
Getting the handle of a node.
STSFLG_DONTSAVE
#define STSFLG_DONTSAVE
It does not appear in any saved file.
Definition KrnStsApi.h:334
kRecSettingLoad
RECERR RSTSAPI kRecSettingLoad(int sid, LPCTSTR filename)
Loading settings.

Typedef Documentation

◆ HSETTING

typedef struct RECSTSSTRUCT* HSETTING

Handle of a setting.

This handle can be used for accessing the element of the settings tree. Thus, this handle can be a node with or without a setting. There are some functions that can be used for passing nodes without a setting. These functions generally work on a subtree of the settings tree. The handle of a node can be retrieved using the path of the node (kRecSettingGetHandle). See also notes of StsMan.

Enumeration Type Documentation

◆ STSTYPES

enum STSTYPES

Type ID's of settings.

Enumerator
STS_UNDEFINED | This is a setting in a pending (pre-defined) state.
STS_ENUM | This is an enum setting, which is physically an integer.
STS_INT | This is an integer setting.
STS_DOUBLE | This is a double setting.
STS_BOOL | This is a boolean setting, which is physically an integer.
STS_STRING | This is a string setting.
STS_USTRING | This is a unicode (UTF-16) string setting, in which each character has a length of 2 bytes.
STS_ARRAY_INT | This is an array of integers.
STS_ARRAY_DOUBLE | This is an array of doubles.
STS_ARRAY_ENUM | This is an array of enums, which is physically an array of integers.
STS_ARRAY_BOOL | This is an array of booleans, which is physically an array of integers.
STS_SET | This is a set type, which can be indexed by elements of a given enum. The values of its elements can be boolean indicating whether the given element is in the set or not. It is physically an array of integers. Its size should be equal to the greatest element of the enum type + 1.
STS_REF | Internal used.

Function Documentation

◆ kRecSettingClone()

RECERR RSTSAPI kRecSettingClone | ( | HSETTING | root_of_cloning,
 |  | const char * | new_symb_name )

Creating a clone.

It makes a clone from all the nodes of the specified subtree and puts the clone subtree into the tree as a child of the parent of the original subtree. The name and path of the root is "maybe.point.separated.section"."nonpointseparatedsection" , the names and paths of the nodes of the subtree are "maybe.point.separated.section"."nonpointseparatedsection"."maybe.point.separated.section.i" . The name and path of the clone of the root will be "maybe.point.separated.section".new_symb_name , the names and paths of the clones of the nodes of the subtree will be "maybe.point.separated.section".new_symb_name."maybe.point.separated.section.i" .

Parameters
[in] | root_of_cloning | This is the handle of the root of the original subtree.
[in] | new_symb_name | This is the last section of the name (and path) of the clone of root_of_cloning. Of course, it must not contain any point.
Return values
STSMN_HANDLE_ERR | root_of_cloning is invalid or NULL.
STSMN_PARAMETER_ERR | new_symb_name contains a '.'.
STSMN_OPNOTALLOWED_ERR | The operation is not allowed, because there already exists a node with the same name as the one specified for the clone node.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingClone(IntPtr root_of_cloning, string new_symb_name);
kRecSettingClone
RECERR RSTSAPI kRecSettingClone(HSETTING root_of_cloning, const char *new_symb_name)
Creating a clone.

◆ kRecSettingCopyValues()

RECERR RSTSAPI kRecSettingCopyValues | ( | HSETTING | node,
 |  | int | from_sid,
 |  | int | to_sid,
 |  | INTBOOL | whole_subtree )

Copying the values between Settings Collections.

It copies the value of setting(s) from a given Settings Collection to another one.

Parameters
[in] | node | This is the node.
[in] | from_sid | This is the source Settings Collection.
[in] | to_sid | This is the destination Settings Collection.
[in] | whole_subtree | When it is TRUE the function copies the values of all the settings in the subtree. Otherwise, it copies only the given setting. In this latter case node must be a setting node.
Return values
STSMN_HANDLE_ERR | node is invalid.
STSMN_PARAMETER_ERR | whole_subtree is FALSE, but node does not have any settings or one (or both) of the given Settings Collections is invalid.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingCopyValues(IntPtr node, int from_sid, int to_sid, bool whole_subtree);
kRecSettingCopyValues
RECERR RSTSAPI kRecSettingCopyValues(HSETTING node, int from_sid, int to_sid, INTBOOL whole_subtree)
Copying the values between Settings Collections.

◆ kRecSettingCreateDouble()

RECERR RSTSAPI kRecSettingCreateDouble | ( | HSETTING * | created_setting,
 |  | HSETTING | root_of_creation,
 |  | const char * | symb_name,
 |  | unsigned int | flags,
 |  | double | def_value )

Creating a double setting (STS_DOUBLE).

It creates a double setting and inserts that into the settings tree.

Parameters
[out] | created_setting | This is the handle of the created setting.
[in] | root_of_creation | See kRecSettingCreateInt.
[in] | symb_name | See kRecSettingCreateInt.
[in] | flags | See kRecSettingCreateInt.
[in] | def_value | See kRecSettingCreateInt.
Return values
See kRecSettingCreateInt.
Note
The specification of this function in C# is:
RECERR kRecSettingCreateDouble(out IntPtr created_setting, IntPtr root_of_creation, string symb_name, STSFLAGS flags, double def_value);
kRecSettingCreateDouble
RECERR RSTSAPI kRecSettingCreateDouble(HSETTING *created_setting, HSETTING root_of_creation, const char *symb_name, unsigned int flags, double def_value)
Creating a double setting (STS_DOUBLE).

◆ kRecSettingCreateDoubleArray()

RECERR RSTSAPI kRecSettingCreateDoubleArray | ( | HSETTING * | created_setting,
 |  | HSETTING | root_of_creation,
 |  | const char * | symb_name,
 |  | int | size,
 |  | unsigned int | flags,
 |  | const double * | def_values )

Creating a double array setting (STS_ARRAY_DOUBLE).

It creates an array setting of double values and inserts that into the settings tree.

Parameters
[out] | created_setting | This is the handle of the created setting.
[in] | root_of_creation | See kRecSettingCreateInt.
[in] | symb_name | See kRecSettingCreateInt.
[in] | size | This is the size of the created array.
[in] | flags | See kRecSettingCreateInt.
[in] | def_values | This is the default value of the setting. It cannot be changed in the whole lifetime of the setting. The content of the passed buffer is copied.
Return values
See kRecSettingCreateInt.
Note
The specification of this function in C# is:
RECERR kRecSettingCreateDoubleArray(out IntPtr created_setting, IntPtr root_of_creation, string symb_name, STSFLAGS flags, double[] def_value);
kRecSettingCreateDoubleArray
RECERR RSTSAPI kRecSettingCreateDoubleArray(HSETTING *created_setting, HSETTING root_of_creation, const char *symb_name, int size, unsigned int flags, const double *def_values)
Creating a double array setting (STS_ARRAY_DOUBLE).

◆ kRecSettingCreateInt()

RECERR RSTSAPI kRecSettingCreateInt | ( | HSETTING * | created_setting,
 |  | STSTYPES | type,
 |  | HSETTING | root_of_creation,
 |  | const char * | symb_name,
 |  | unsigned int | flags,
 |  | int | def_value,
 |  | const SEnumTypeElement * | enum_elements )

Creating an int setting (STS_INT or STS_ENUM or STS_BOOL).

It creates a physical integer setting of a given type and inserts that into the settings tree.

Parameters
[out] | created_setting | This is the handle of the created setting.
[in] | type | It determines the type of the created setting. It can be STS_INT, STS_BOOL and STS_ENUM. See STSTYPES for details.
[in] | root_of_creation | This is the root of the subtree, in which the setting will be inserted. The real position of the created setting is determined by this root and the symb_name parameter. It can be NULL. In this case the root of the insertion is the root of the whole tree.
[in] | symb_name | This is a point-separated symbolic name. The sections separated by the points denote the individual nodes of the path from root_of_creation to the created setting; it does not contain the section of this creation root.
[in] | flags | This is a flag or a combination of flags. There are some flags that cannot be set/unset by the User. They are combined in STSFLG_RESERVED, they will be unmasked from flags. Of course, STSFLG_BITFIELD can be used but only with enum settings.
[in] | def_value | This is the default value of the setting. It cannot be changed in the whole lifetime of the setting.
[in] | enum_elements | Only at enum settings, it must be passed the elements of the enum type here. The field id of the i-th enum element is the enum identifier of the element, the field value is the value belonging to this ID (which maybe a member of a real enum type). The end of this list is indicated by a NULL id. The array and its elements can be deleted right after the function returns.
Return values
STSMN_HANDLE_ERR | root_of_creation is invalid.
STSMN_PARAMETER_ERR | The symbolic name should not contain ','.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingCreateInt(out IntPtr created_setting, STSTYPES type, IntPtr root_of_creation, string symb_name, STSFLAGS flags, int def_value, SEnumTypeElement[] enum_elements);
// or when root_of_creation is NULL in C/C++
RECERR kRecSettingCreateInt(out IntPtr created_setting, STSTYPES type, string symb_name, STSFLAGS flags, int def_value, SEnumTypeElement[] enum_elements);
// or when enum_elements is NULL in C/C++
RECERR kRecSettingCreateInt(out IntPtr created_setting, STSTYPES type, IntPtr root_of_creation, string symb_name, STSFLAGS flags, int def_value);
// or when both are NULL
RECERR kRecSettingCreateInt(out IntPtr created_setting, STSTYPES type, string symb_name, STSFLAGS flags, int def_value);
STSTYPES
STSTYPES
Type ID's of settings.
Definition KrnStsApi.h:304

◆ kRecSettingCreateIntArray()

RECERR RSTSAPI kRecSettingCreateIntArray | ( | HSETTING * | created_setting,
 |  | STSTYPES | type,
 |  | HSETTING | root_of_creation,
 |  | const char * | symb_name,
 |  | int | size,
 |  | unsigned int | flags,
 |  | const int * | def_values,
 |  | const SEnumTypeElement * | enum_elements )

Creating an int array setting (STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET).

It creates an array setting of physically integer values and inserts that into the settings tree.

Parameters
[out] | created_setting | This is the handle of the created setting.
[in] | type | It determines the type of the created setting. It can be STS_ARRAY_INT, STS_ARRAY_BOOL, STS_ARRAY_ENUM and STS_SET. See STSTYPES for details.
[in] | root_of_creation | See kRecSettingCreateInt.
[in] | symb_name | See kRecSettingCreateInt.
[in] | size | This is the size of the created array.
[in] | flags | See kRecSettingCreateInt.
[in] | def_values | This is the default value of the setting. It cannot be changed in the whole lifetime of the setting. The content of the passed buffer is copied.
[in] | enum_elements | See kRecSettingCreateInt.
Return values
See kRecSettingCreateInt.
Note
The specification of this function in C# is:
RECERR kRecSettingCreateIntArray(out IntPtr created_setting, STSTYPES type, IntPtr root_of_creation, string symb_name, STSFLAGS flags, int[] def_values, SEnumTypeElement[] enum_elements)
kRecSettingCreateIntArray
RECERR RSTSAPI kRecSettingCreateIntArray(HSETTING *created_setting, STSTYPES type, HSETTING root_of_creation, const char *symb_name, int size, unsigned int flags, const int *def_values, const SEnumTypeElement *enum_elements)
Creating an int array setting (STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET).

◆ kRecSettingCreateString()

RECERR RSTSAPI kRecSettingCreateString | ( | HSETTING * | created_setting,
 |  | HSETTING | root_of_creation,
 |  | const char * | symb_name,
 |  | unsigned int | flags,
 |  | const char * | def_value )

Creating a string setting (STS_STRING).

It creates a string setting and inserts that into the settings tree.

Parameters
[out] | created_setting | This is the handle of the created setting.
[in] | root_of_creation | See kRecSettingCreateInt.
[in] | symb_name | See kRecSettingCreateInt.
[in] | flags | See kRecSettingCreateInt.
[in] | def_value | This is the default value of the setting. It cannot be changed in the whole lifetime of the setting. The content of the passed buffer is copied.
Return values
See kRecSettingCreateInt.
Note
The specification of this function in C# is:
RECERR kRecSettingCreateString(out IntPtr created_setting, IntPtr root_of_creation, string symb_name, STSFLAGS flags, string def_value);

◆ kRecSettingCreateUString()

RECERR RSTSAPI kRecSettingCreateUString | ( | HSETTING * | created_setting,
 |  | HSETTING | root_of_creation,
 |  | const char * | symb_name,
 |  | unsigned int | flags,
 |  | const WCHAR * | def_value )

Creating a unicode string setting (STS_USTRING).

It creates a unicode string setting and inserts that into the settings tree. See kRecSettingCreateString.

Note
The specification of this function in C# is:
RECERR kRecSettingCreateUString(out IntPtr created_setting, IntPtr root_of_creation, string symb_name, STSFLAGS flags, string def_value);
kRecSettingCreateUString
RECERR RSTSAPI kRecSettingCreateUString(HSETTING *created_setting, HSETTING root_of_creation, const char *symb_name, unsigned int flags, const WCHAR *def_value)
Creating a unicode string setting (STS_USTRING).

◆ kRecSettingDelete()

RECERR RSTSAPI kRecSettingDelete ( HSETTING node )

Deleting a setting.

It deletes the setting of a node, if it is user defined. If the given node is a leaf node it also removes the node from the tree.

Parameters
[in] node This is the node to be deleted.
Return values
STSMN_HANDLE_ERR | node is invalid or NULL.
STSMN_OPNOTALLOWED_ERR | The operation is not allowed, because node is the root of the whole tree, or is not a User-defined setting.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingDelete(IntPtr node);
kRecSettingDelete
RECERR RSTSAPI kRecSettingDelete(HSETTING node)
Deleting a setting.

◆ kRecSettingDeleteSubtree()

RECERR RSTSAPI kRecSettingDeleteSubtree ( HSETTING root_of_subtree )

Deleting a subtree.

It deletes all the user-defined settings of the subtree whose root is given. All the nodes of the given subtree that do not have any setting (or it has just been deleted) and any child, are removed recursively.

Parameters
[in] root_of_subtree This is the root of the subtree to be deleted. The root is also deleted (if this is allowed).
Return values
STSMN_HANDLE_ERR | root_of_subtree is invalid or NULL.
STSMN_OPNOTALLOWED_ERR | The operation is not allowed, because root_of_subtree is the root of the whole tree.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingDeleteSubtree(IntPtr root_of_subtree);
kRecSettingDeleteSubtree
RECERR RSTSAPI kRecSettingDeleteSubtree(HSETTING root_of_subtree)
Deleting a subtree.

◆ kRecSettingGetCloneOrigin()

RECERR RSTSAPI kRecSettingGetCloneOrigin | ( | HSETTING | clone_node,
 |  | HSETTING * | origin_node )

Accessing the origin of the clone node.

It retrieves the origin of a clone node or NULL, if it is not a clone.

Parameters
[in] | clone_node | This is the handle of the clone node.
[out] | origin_node | It gets the handle of the origin node (if any), otherwise it is NULL.
Return values
STSMN_HANDLE_ERR | prev_node is invalid or NULL.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingGetCloneOrigin(IntPtr clone_node, out IntPtr origin_node);
kRecSettingGetCloneOrigin
RECERR RSTSAPI kRecSettingGetCloneOrigin(HSETTING clone_node, HSETTING *origin_node)
Accessing the origin of the clone node.
.

◆ kRecSettingGetDouble()

RECERR RSTSAPI kRecSettingGetDouble | ( | int | sid,
 |  | HSETTING | sett,
 |  | double * | the_value )

Accessing the current value of an STS_DOUBLE setting.

See kRecSettingGetInt.

Note
The specification of this function in C# is:
RECERR kRecSettingGetDouble(int sid, IntPtr sett, out double the_value);
kRecSettingGetDouble
RECERR RSTSAPI kRecSettingGetDouble(int sid, HSETTING sett, double *the_value)
Accessing the current value of an STS_DOUBLE setting.

◆ kRecSettingGetDoubleArray()

RECERR RSTSAPI kRecSettingGetDoubleArray | ( | int | sid,
 |  | HSETTING | sett,
 |  | const double ** | the_value )

Accessing the current value of a STS_ARRAY_DOUBLE setting.

See kRecSettingGetString.

Note
The specification of this function in C# is:
RECERR kRecSettingGetDoubleArray(int sid, IntPtr sett, out double[] the_value);
kRecSettingGetDoubleArray
RECERR RSTSAPI kRecSettingGetDoubleArray(int sid, HSETTING sett, const double **the_value)
Accessing the current value of a STS_ARRAY_DOUBLE setting.

◆ kRecSettingGetDoubleArrayAt()

RECERR RSTSAPI kRecSettingGetDoubleArrayAt | ( | int | sid,
 |  | HSETTING | sett,
 |  | int | index,
 |  | double * | the_value )

Accessing an element of an STS_ARRAY_DOUBLE setting.

See kRecSettingGetIntArrayAt.

Note
The specification of this function in C# is:
RECERR kRecSettingGetDoubleArrayAt(int sid, IntPtr sett, int index, out double the_value);
kRecSettingGetDoubleArrayAt
RECERR RSTSAPI kRecSettingGetDoubleArrayAt(int sid, HSETTING sett, int index, double *the_value)
Accessing an element of an STS_ARRAY_DOUBLE setting.

◆ kRecSettingGetDoubleArrayDefault()

RECERR RSTSAPI kRecSettingGetDoubleArrayDefault | ( | HSETTING | sett,
 |  | const double ** | the_default )

Accessing the default value of an STS_ARRAY_DOUBLE setting.

See kRecSettingGetStringDefault.

Note
The specification of this function in C# is:
RECERR kRecSettingGetDoubleArrayDefault(IntPtr sett, out double[] the_value);
kRecSettingGetDoubleArrayDefault
RECERR RSTSAPI kRecSettingGetDoubleArrayDefault(HSETTING sett, const double **the_default)
Accessing the default value of an STS_ARRAY_DOUBLE setting.

◆ kRecSettingGetDoubleArrayDefaultAt()

RECERR RSTSAPI kRecSettingGetDoubleArrayDefaultAt | ( | HSETTING | sett,
 |  | int | index,
 |  | double * | the_default )

Accessing an element of the default value of an STS_ARRAY_DOUBLE setting.

See kRecSettingGetIntArrayDefaultAt.

Note
The specification of this function in C# is:
RECERR kRecSettingGetDoubleArrayDefaultAt(IntPtr sett, int index, out double the_default);
kRecSettingGetDoubleArrayDefaultAt
RECERR RSTSAPI kRecSettingGetDoubleArrayDefaultAt(HSETTING sett, int index, double *the_default)
Accessing an element of the default value of an STS_ARRAY_DOUBLE setting.

◆ kRecSettingGetDoubleDefault()

RECERR RSTSAPI kRecSettingGetDoubleDefault | ( | HSETTING | sett,
 |  | double * | the_default )

Accessing the default value of a STS_DOUBLE setting.

See kRecSettingGetIntDefault.

Note
The specification of this function in C# is:
RECERR kRecSettingGetDoubleDefault(IntPtr sett, out double the_default);
kRecSettingGetDoubleDefault
RECERR RSTSAPI kRecSettingGetDoubleDefault(HSETTING sett, double *the_default)
Accessing the default value of a STS_DOUBLE setting.

◆ kRecSettingGetEnumElement()

RECERR RSTSAPI kRecSettingGetEnumElement | ( | HSETTING | sett,
 |  | int | index,
 |  | const char ** | str_value,
 |  | int * | int_value )

Getting an enum element.

It gets the given enum element of the type of the given setting.

Parameters
[in] | sett | This is the handle of the setting.
[in] | index | This is the index of the required enum element. The number of enum elements can be retrieved by kRecSettingGetNumberOfEnumElements.
[out] | str_value | This is the name (identifier) of the given enum element. It can be NULL if the name of the element is not required. It points to an internal buffer of StsMan (see the notes of StsMan).
[out] | int_value | This is the value of the given enum element. It can be NULL, if the value of the element is not required.
Return values
STSMN_HANDLE_ERR | sett is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any setting.
STSMN_BADTYPE_ERR | The setting is not an enum type setting.
STSMN_PARAMETER_ERR | index is out of range.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingGetEnumElement(IntPtr sett, int index, out string str_value, out int int_value);
// or when str_value is NULL in C/C++
RECERR kRecSettingGetEnumElement(IntPtr sett, int index, out int int_value);
// or when int_value is NULL in C/C++
RECERR kRecSettingGetEnumElement(IntPtr sett, int index, out string str_value);
kRecSettingGetEnumElement
RECERR RSTSAPI kRecSettingGetEnumElement(HSETTING sett, int index, const char **str_value, int *int_value)
Getting an enum element.

◆ kRecSettingGetHandle()

RECERR RSTSAPI kRecSettingGetHandle | ( | HSETTING | root_of_query,
 |  | const char * | symb_name,
 |  | HSETTING * | ret_handle,
 |  | INTBOOL * | has_setting )

Getting the handle of a node.

This is how to get the handle of a node by its name.

Parameters
[in] | root_of_query | This is the starting node of the searching. It can be NULL, which means the root of the whole tree.
[in] | symb_name | The symbolic name of the node. It must be relative to root_of_query.
[out] | ret_handle | This is the retrieved handle.
[out] | has_setting | If it is not NULL it retrieves whether the node given by the name has a setting or not.
Return values
STSMN_HANDLE_ERR | root_of_query is invalid.
STSMN_NOTFOUND_ERR | The required node does not exist.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingGetHandle(IntPtr root_of_query, string symb_name, out IntPtr ret_handle, out bool has_setting);
// or when has_setting is NULL in C/C++
RECERR kRecSettingGetHandle(IntPtr root_of_query, string symb_name, out IntPtr ret_handle);
// or when root_of_query is NULL in C/C++
RECERR kRecSettingGetHandle(string symb_name, out IntPtr ret_handle, out bool has_setting);
// or when both are NULL
RECERR kRecSettingGetHandle(string symb_name, out IntPtr ret_handle);
.

◆ kRecSettingGetInt()

RECERR RSTSAPI kRecSettingGetInt | ( | int | sid,
 |  | HSETTING | sett,
 |  | int * | the_value )

Accessing the current value of an STS_INT or STS_ENUM or STS_BOOL setting.

It gets the value of the given setting in the given Settings Collection.

Parameters
[in] | sid | This is the Settings Collection ID.
[in] | sett | This is the handle of the setting.
[out] | the_value | It gets the value of the setting.
Return values
STSMN_HANDLE_ERR | sett is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any settings.
STSMN_BADTYPE_ERR | The setting type is not valid.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingGetInt(int sid, IntPtr sett, out int the_value);

◆ kRecSettingGetIntArray()

RECERR RSTSAPI kRecSettingGetIntArray | ( | int | sid,
 |  | HSETTING | sett,
 |  | const int ** | the_value )

Accessing the current value of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET setting.

See kRecSettingGetString.

Note
The specification of this function in C# is:
RECERR kRecSettingGetIntArray(int sid, IntPtr sett, out int[] the_value);
kRecSettingGetIntArray
RECERR RSTSAPI kRecSettingGetIntArray(int sid, HSETTING sett, const int **the_value)
Accessing the current value of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET settin...

◆ kRecSettingGetIntArrayAt()

RECERR RSTSAPI kRecSettingGetIntArrayAt | ( | int | sid,
 |  | HSETTING | sett,
 |  | int | index,
 |  | int * | the_value )

Accessing an element of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET setting.

It gets the value of the given element of the array setting in the given Settings Collection.

Parameters
[in] | sid | This is the ID of the Settings Collection.
[in] | sett | This is the handle of the setting.
[in] | index | This is the index of the required element.
[out] | the_value | It gets the retrieved value.
Return values
STSMN_HANDLE_ERR | sett is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any setting.
STSMN_BADTYPE_ERR | The setting type is not valid.
STSMN_PARAMETER_ERR | index is invalid.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingGetIntArrayAt(int sid, IntPtr sett, int index, out int the_value);
kRecSettingGetIntArrayAt
RECERR RSTSAPI kRecSettingGetIntArrayAt(int sid, HSETTING sett, int index, int *the_value)
Accessing an element of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET setting.
.

◆ kRecSettingGetIntArrayDefault()

RECERR RSTSAPI kRecSettingGetIntArrayDefault | ( | HSETTING | sett,
 |  | const int ** | the_default )

Accessing the default value of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET setting.

See kRecSettingGetStringDefault.

Note
The specification of this function in C# is:
RECERR kRecSettingGetIntArrayDefault(IntPtr sett, out int[] the_value);
kRecSettingGetIntArrayDefault
RECERR RSTSAPI kRecSettingGetIntArrayDefault(HSETTING sett, const int **the_default)
Accessing the default value of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET settin...

◆ kRecSettingGetIntArrayDefaultAt()

RECERR RSTSAPI kRecSettingGetIntArrayDefaultAt | ( | HSETTING | sett,
 |  | int | index,
 |  | int * | the_default )

Accessing an element of the default value of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET setting.

It gets the given element of the default value of the array setting.

Parameters
[in] | sett | This is the handle of the given array setting.
[in] | index | This is the index of the required element.
[out] | the_default | It gets the retrieved value.
Return values
STSMN_HANDLE_ERR | sett is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any setting.
STSMN_BADTYPE_ERR | The setting type is not valid.
STSMN_PARAMETER_ERR | index is invalid.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingGetIntArrayDefaultAt(IntPtr sett, int index, out int the_default);
kRecSettingGetIntArrayDefaultAt
RECERR RSTSAPI kRecSettingGetIntArrayDefaultAt(HSETTING sett, int index, int *the_default)
Accessing an element of the default value of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or ...

◆ kRecSettingGetIntDefault()

RECERR RSTSAPI kRecSettingGetIntDefault | ( | HSETTING | sett,
 |  | int * | the_default )

Accessing the default value of an STS_INT or STS_ENUM or STS_BOOL setting.

It gets the default value of the given setting.

Parameters
[in] | sett | This is the handle of the setting.
[out] | the_default | It gets the default value.
Return values
STSMN_HANDLE_ERR | sett is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any setting.
STSMN_BADTYPE_ERR | The setting type is not valid.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingGetIntDefault(IntPtr sett, out int the_default);
kRecSettingGetIntDefault
RECERR RSTSAPI kRecSettingGetIntDefault(HSETTING sett, int *the_default)
Accessing the default value of an STS_INT or STS_ENUM or STS_BOOL setting.
.

◆ kRecSettingGetName()

RECERR RSTSAPI kRecSettingGetName | ( | HSETTING | node,
 |  | const char ** | the_name )

Querying the name.

It retrieves the symbolic name of the given node.

Parameters
[in] | node | This is the handle of the node.
[out] | the_name | It gets a pointer of an internal buffer of StsMan (see the notes of StsMan), which contains the given symbolic name.
Return values
STSMN_HANDLE_ERR | node is invalid or NULL.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingGetName(IntPtr node, out string the_name);
kRecSettingGetName
RECERR RSTSAPI kRecSettingGetName(HSETTING node, const char **the_name)
Querying the name.
.

◆ kRecSettingGetNextChild()

RECERR RSTSAPI kRecSettingGetNextChild | ( | HSETTING | the_parent,
 |  | HSETTING | prev_child,
 |  | HSETTING * | the_child )

Enumerating children.

It retrieves the next child of the given parent node.

Parameters
[in] | the_parent | This is the handle of the parent node.
[in] | prev_child | This is the previous child in the enumeration. If it is NULL the function gives the first child.
[out] | the_child | It gets the handle of the next child (if any), otherwise it is NULL.
Return values
STSMN_HANDLE_ERR | the_parent is invalid or NULL, or prev_child is invalid.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingGetNextChild(IntPtr the_parent, IntPtr prev_child, out IntPtr the_child);
// and only in C# CSDK has a function for getting the first child
// this is completely equivalent to the calling of
// kRecSettingGetNextChild(the_parent, 0, out the_child);
RECERR kRecSettingGetFirstChild(IntPtr the_parent, out IntPtr the_child);
kRecSettingGetNextChild
RECERR RSTSAPI kRecSettingGetNextChild(HSETTING the_parent, HSETTING prev_child, HSETTING *the_child)
Enumerating children.
.

◆ kRecSettingGetNumberOfEnumElements()

RECERR RSTSAPI kRecSettingGetNumberOfEnumElements | ( | HSETTING | sett,
 |  | int * | num_of_values )

Getting the number of enum elements.

It gets the number of enum elements of the type of the setting. The function kRecSettingGetEnumElement can be used for enumerating the elements.

Parameters
[in] | sett | This is the handle of the setting.
[out] | num_of_values | It gets the number of the enum elements.
Return values
STSMN_HANDLE_ERR | sett is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any setting.
STSMN_BADTYPE_ERR | The setting is not an enum type setting.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingGetNumberOfEnumElements(IntPtr sett, out int num_of_values);
kRecSettingGetNumberOfEnumElements
RECERR RSTSAPI kRecSettingGetNumberOfEnumElements(HSETTING sett, int *num_of_values)
Getting the number of enum elements.

◆ kRecSettingGetSizeOfArray()

RECERR RSTSAPI kRecSettingGetSizeOfArray | ( | HSETTING | sett,
 |  | int * | the_size )

Getting the size of an array.

It gets the size of the given array setting.

Parameters
[in] | sett | This is the handle of the setting.
[out] | the_size | It gets the size of the array.
Return values
STSMN_HANDLE_ERR | sett is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any setting.
STSMN_BADTYPE_ERR | The given setting is not an array.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingGetSizeOfArray(IntPtr sett, out int the_size);
kRecSettingGetSizeOfArray
RECERR RSTSAPI kRecSettingGetSizeOfArray(HSETTING sett, int *the_size)
Getting the size of an array.

◆ kRecSettingGetString()

RECERR RSTSAPI kRecSettingGetString | ( | int | sid,
 |  | HSETTING | sett,
 |  | const char ** | the_value )

Accessing the current value of an STS_STRING setting.

It gets the value of the given setting in the given Settings Collection.

Parameters
[in] | sid | This is the Settings Collection ID.
[in] | sett | This is the handle of the setting.
[out] | the_value | It gets the value of the setting. It points to an internal buffer of StsMan (see the notes of StsMan), thus another thread running in parallel can modify its content or invalidate it. So for long-time usage it may be good practice to copy the string.
Return values
See kRecSettingGetInt.
Note
This function accepts only STS_STRING settings (i.e. even STS_USTRING is not usable).
The specification of this function in C# is:
RECERR kRecSettingGetString(int sid, IntPtr sett, out string the_value);
kRecSettingGetString
RECERR RSTSAPI kRecSettingGetString(int sid, HSETTING sett, const char **the_value)
Accessing the current value of an STS_STRING setting.
.

◆ kRecSettingGetStringDefault()

RECERR RSTSAPI kRecSettingGetStringDefault | ( | HSETTING | sett,
 |  | const char ** | the_default )

Accessing the default value of an STS_STRING setting.

It gets the default value of the given setting.

Parameters
[in] | sett | This is the handle of the setting.
[out] | the_default | It gets the default value. It points to an internal buffer of StsMan (see the notes of StsMan), thus another thread running in parallel can modify its content or invalidate it. (e.g. by deleting this setting). So for long-time usage it may be good practice to copy the string.
Return values
See kRecSettingGetIntDefault.
Note
This function accepts only STS_STRING settings (i.e. even STS_USTRING is not usable).
The specification of this function in C# is:
RECERR kRecSettingGetStringDefault(IntPtr sett, out string the_default);
kRecSettingGetStringDefault
RECERR RSTSAPI kRecSettingGetStringDefault(HSETTING sett, const char **the_default)
Accessing the default value of an STS_STRING setting.

◆ kRecSettingGetSymbolic()

RECERR RSTSAPI kRecSettingGetSymbolic | ( | int | sid,
 |  | HSETTING | sett,
 |  | char * | the_value,
 |  | unsigned int * | buffer_size )

Getting value in a string format.

It gets the value of the given setting in the given Settings Collection symbolically. The retrieved string contains the converted value of the setting. With enum types it gets the name of the element of the enum type, which represents the value (or it can be a combination of them as well). With arrays it gets a list of its successive elements separated with commas. With strings it gets a parsed string with C-like escape sequences. For settings with the flag STSFLG_ENCRYPTNEEDED it encrypts the string before return.

Parameters
[in] | sid | This is the ID of the Settings Collection.
[in] | sett | This is the handle of the setting.
[out] | the_value | It gets the value. This is allocated by the User.
[in,out] | buffer_size | It must contain the size of the buffer. If this size is not enough, the function retrieves the required size in this parameter and returns with STSMN_PARAMETER_ERR. Otherwise, the value of this parameter is not changed.
Return values
STSMN_HANDLE_ERR | sett is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any setting.
STSMN_PARAMETER_ERR | The buffersize is not enough. The required size is in buffer_size.
STSMN_EMPTYPENDVAL_WARN | This is a pending setting with empty pending value. I.e. if it would not be pending, it would have its default value in this settings collection.
REC_OK | Successful.
Note
The setting files contains the values of the settings in such string format.
The specification of this function in C# is:
RECERR kRecSettingGetSymbolic(int sid, IntPtr sett, out string the_value);
kRecSettingGetSymbolic
RECERR RSTSAPI kRecSettingGetSymbolic(int sid, HSETTING sett, char *the_value, unsigned int *buffer_size)
Getting value in a string format.

◆ kRecSettingGetType()

RECERR RSTSAPI kRecSettingGetType | ( | HSETTING | sett,
 |  | STSTYPES * | type )

Querying the type.

It retrieves the type of the setting.

Parameters
[in] | sett | This is the handle of the node.
[out] | type | It gets the retrieved type.
Return values
STSMN_HANDLE_ERR | sett is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any setting.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingGetType(IntPtr sett, out STSTYPES type);
kRecSettingGetType
RECERR RSTSAPI kRecSettingGetType(HSETTING sett, STSTYPES *type)
Querying the type.
.

◆ kRecSettingGetUString()

RECERR RSTSAPI kRecSettingGetUString | ( | int | sid,
 |  | HSETTING | sett,
 |  | const WCHAR ** | the_value )

Accessing the current value of an STS_USTRING setting.

See kRecSettingGetString.

Note
This function accepts only STS_USTRING settings (i.e. even STS_STRING is not usable).
The specification of this function in C# is:
RECERR kRecSettingGetUString(int sid, IntPtr sett, out string the_value);
kRecSettingGetUString
RECERR RSTSAPI kRecSettingGetUString(int sid, HSETTING sett, const WCHAR **the_value)
Accessing the current value of an STS_USTRING setting.

◆ kRecSettingGetUStringDefault()

RECERR RSTSAPI kRecSettingGetUStringDefault | ( | HSETTING | sett,
 |  | const WCHAR ** | the_default )

Accessing the default value of an STS_USTRING setting.

See kRecSettingGetStringDefault.

Note
This function accepts only STS_USTRING settings (i.e. even STS_STRING is not usable).
The specification of this function in C# is:
RECERR kRecSettingGetUStringDefault(IntPtr sett, out string the_default);
kRecSettingGetUStringDefault
RECERR RSTSAPI kRecSettingGetUStringDefault(HSETTING sett, const WCHAR **the_default)
Accessing the default value of an STS_USTRING setting.

◆ kRecSettingHasSetting()

RECERR RSTSAPI kRecSettingHasSetting | ( | HSETTING | node,
 |  | INTBOOL * | has_setting )

Querying whether it is a setting.

It retrieves whether the given handle is also a setting or only a node.

Parameters
[in] | node | This is the handle of the node.
[out] | has_setting | It is TRUE when it is also a setting.
Return values
STSMN_HANDLE_ERR | node is invalid or NULL.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingHasSetting(IntPtr node, out bool has_setting);
kRecSettingHasSetting
RECERR RSTSAPI kRecSettingHasSetting(HSETTING node, INTBOOL *has_setting)
Querying whether it is a setting.
.

◆ kRecSettingIsDefault()

RECERR RSTSAPI kRecSettingIsDefault | ( | int | sid,
 |  | HSETTING | node,
 |  | INTBOOL * | is_default )

Checking whether the setting is default or not.

This function gives TRUE when the given node is a setting and it has its default value in the given Settings Collection.

Parameters
[in] | sid | This is the Settings Collection ID.
[in] | node | This is the handle of the node.
[out] | is_default | It is TRUE when the given node is a setting and it has its default value.
Return values
STSMN_HANDLE_ERR | node is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any setting.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingIsDefault(int sid, IntPtr node, out bool is_default);
kRecSettingIsDefault
RECERR RSTSAPI kRecSettingIsDefault(int sid, HSETTING node, INTBOOL *is_default)
Checking whether the setting is default or not.
.

◆ kRecSettingIsFlagSet()

RECERR RSTSAPI kRecSettingIsFlagSet | ( | HSETTING | sett,
 |  | unsigned int | flgs,
 |  | INTBOOL * | is_set )

Querying flags.

It retrieves whether the given flag or flag combination is set or not in the given setting.

Parameters
[in] | sett | This is the handle of the node.
[in] | flgs | This is the given flag or flag combination.
[out] | is_set | It is TRUE when the given flag (or combination) is set.
Return values
STSMN_HANDLE_ERR | sett is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any setting.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingIsFlagSet(IntPtr sett, STSFLAGS flgs, out bool is_set);
kRecSettingIsFlagSet
RECERR RSTSAPI kRecSettingIsFlagSet(HSETTING sett, unsigned int flgs, INTBOOL *is_set)
Querying flags.
.

◆ kRecSettingLoad()

RECERR RSTSAPI kRecSettingLoad | ( | int | sid,
 |  | LPCTSTR | filename )

Loading settings.

It loads the value of the settings from the given file into the given Settings Collection.

Parameters
[in] | sid | This is the ID of the Settings Collection.
[in] | filename | This is the name of the file, from which the function loads the settings.
Return values
STSMN_INVALIDFILE_ERR | The given file has invalid lines.
STSMN_FULLSAVEDTREE_WARN | It is only a warning. The loaded file comes from a saving where the parameter save_all was TRUE. See the note below.
REC_OK | Successful.
... Error codes of the filehandling subsystem.
Note
An STSMN_FULLSAVEDTREE_WARN situation may be unsafe at developing time. For example, if the default value of a setting is changed between two builds and its value should not be changed at runtime (e.g. an internal setting of the integrated application), but there is an automatic loading step for handling the user settings of the integrating application. In the previous build, it did not cause an error, because the file contains the previous default value of the given setting. But in the present build, the setting gets this previous default value; this is erroneous behavior, since the setting should not be changed, as we mentioned. Thus it is suggested to save only settings with non-default values.
A setting file loading changes only the value of the settings being in the file. Thus if a setting missing from the file was chagned before loading, its value is not affected by the loading operation. If the setting file was saved with a FALSE value in parameter save_all of kRecSettingSave, the setting status was being at saving can be fully reproduced by calling kRecSettingSetToDefault before kRecSettingLoad.
See also notes about saving.
The specification of this function in C# is:
RECERR kRecSettingLoad(int sid, string filename);

◆ kRecSettingSave()

RECERR RSTSAPI kRecSettingSave | ( | int | sid,
 |  | HSETTING | root_of_subtree,
 |  | LPCTSTR | filename,
 |  | INTBOOL | save_all,
 |  | INTBOOL | append )

Saving settings.

It saves the value of the settings of the given subtree from the given Settings Collection.

Parameters
[in] | sid | This is the ID of the Settings Collection.
[in] | root_of_subtree | This is the root of the subtree to be saved including this node (if it has a setting). It can be NULL when the function saves the whole tree.
[in] | filename | This is the name of the file where the function saves the settings.
[in] | save_all | When it is true the function saves all the settings, otherwise it saves only the ones that have different values from their defaults. It is suggested to save only settings with non-default values, for an explanation of this, see the note of kRecSettingLoad.
[in] | append | When it is true the function appends the saved data to the given file.
Return values
STSMN_HANDLE_ERR | root_of_subtree is invalid.
REC_OK | Successful.
... Error codes of the filehandling subsystem.
Note
See also notes about saving.
The specification of this function in C# is:
RECERR kRecSettingSave(int sid, IntPtr root_of_subtree, string filename, bool save_all, bool append);
// or when root_of_subtree is NULL in C/C++
RECERR kRecSettingSave(int sid, string filename, bool save_all, bool append);

◆ kRecSettingSetArrayToDefaultAt()

RECERR RSTSAPI kRecSettingSetArrayToDefaultAt | ( | int | sid,
 |  | HSETTING | sett,
 |  | int | index )

Setting the element of an array to default.

It sets the value of an element of an array setting in the given Settings Collection to its default value. It does not set clone settings.

Parameters
[in] | sid | This is the ID of the Settings Collection.
[in] | sett | This is the handle of a node.
[in] | index | This is the index of the required element.
Return values
STSMN_HANDLE_ERR | sett is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any setting.
STSMN_BADTYPE_ERR | This is not an array setting.
STSMN_OPNOTALLOWED_ERR | This is a Read-only setting.
STSMN_PARAMETER_ERR | index is invalid.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingSetArrayToDefaultAt(int sid, IntPtr sett, int index);
kRecSettingSetArrayToDefaultAt
RECERR RSTSAPI kRecSettingSetArrayToDefaultAt(int sid, HSETTING sett, int index)
Setting the element of an array to default.

◆ kRecSettingSetArrayToDefaultAtPlusC()

RECERR RSTSAPI kRecSettingSetArrayToDefaultAtPlusC | ( | int | sid,
 |  | HSETTING | sett,
 |  | int | index )

Setting the element of an array to default (also in cloned settings).

It sets the value of an element of an array setting in the given Settings Collection to its default value. It does set clone settings (unlike kRecSettingSetArrayToDefaultAt). Generally a clone is created for differing from its origin, thus this function is recommended to use very carefully, because it loses this difference.

Parameters
[in] | sid | This is the ID of the Settings Collection.
[in] | sett | This is the handle of a node.
[in] | index | This is the index of the required element.
Return values
STSMN_HANDLE_ERR | sett is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any setting.
STSMN_BADTYPE_ERR | This is not an array setting.
STSMN_OPNOTALLOWED_ERR | This is a Read-only setting.
STSMN_PARAMETER_ERR | index is invalid.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingSetArrayToDefaultAtPlusC(int sid, IntPtr sett, int index);
kRecSettingSetArrayToDefaultAtPlusC
RECERR RSTSAPI kRecSettingSetArrayToDefaultAtPlusC(int sid, HSETTING sett, int index)
Setting the element of an array to default (also in cloned settings).

◆ kRecSettingSetDouble()

RECERR RSTSAPI kRecSettingSetDouble | ( | int | sid,
 |  | HSETTING | sett,
 |  | double | new_value )

Setting the value of a STS_DOUBLE setting.

It sets the value of the given double setting in the given Settings Collection. See kRecSettingSetInt.

Note
The specification of this function in C# is:
RECERR kRecSettingSetDouble(int sid, IntPtr sett, double new_value);
kRecSettingSetDouble
RECERR RSTSAPI kRecSettingSetDouble(int sid, HSETTING sett, double new_value)
Setting the value of a STS_DOUBLE setting.

◆ kRecSettingSetDoubleArray()

RECERR RSTSAPI kRecSettingSetDoubleArray | ( | int | sid,
 |  | HSETTING | sett,
 |  | const double * | new_values )

Setting the value of an STS_ARRAY_DOUBLE setting.

See kRecSettingSetString.

Note
The specification of this function in C# is:
RECERR kRecSettingSetDoubleArray(int sid, IntPtr sett, double[] new_value);
kRecSettingSetDoubleArray
RECERR RSTSAPI kRecSettingSetDoubleArray(int sid, HSETTING sett, const double *new_values)
Setting the value of an STS_ARRAY_DOUBLE setting.

◆ kRecSettingSetDoubleArrayAt()

RECERR RSTSAPI kRecSettingSetDoubleArrayAt | ( | int | sid,
 |  | HSETTING | sett,
 |  | int | index,
 |  | double | new_value )

Setting an element of the value of an STS_ARRAY_DOUBLE setting.

It sets the given element of the value of the double array setting in the given Settings Collection. See kRecSettingSetIntArrayAt.

Note
The specification of this function in C# is:
RECERR kRecSettingSetDoubleArrayAt(int sid, IntPtr sett, int index, double new_value);
kRecSettingSetDoubleArrayAt
RECERR RSTSAPI kRecSettingSetDoubleArrayAt(int sid, HSETTING sett, int index, double new_value)
Setting an element of the value of an STS_ARRAY_DOUBLE setting.

◆ kRecSettingSetInt()

RECERR RSTSAPI kRecSettingSetInt | ( | int | sid,
 |  | HSETTING | sett,
 |  | int | new_value )

Setting the value of an STS_INT or STS_ENUM or STS_BOOL setting.

It sets the value of the given integer, enum or boolean setting in the given Settings Collection.

Parameters
[in] | sid | This is the ID of the Settings Collection.
[in] | sett | This is the handle of the setting.
[in] | new_value | This is the new value to be set.
Return values
STSMN_HANDLE_ERR | sett is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any setting.
STSMN_BADTYPE_ERR | The setting type is not valid.
STSMN_OPNOTALLOWED_ERR | This is a Read-Only setting.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingSetInt(int sid, IntPtr sett, int new_value);

◆ kRecSettingSetIntArray()

RECERR RSTSAPI kRecSettingSetIntArray | ( | int | sid,
 |  | HSETTING | sett,
 |  | const int * | new_values )

Setting the value of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET setting.

See kRecSettingSetString.

Note
The specification of this function in C# is:
RECERR kRecSettingSetIntArray(int sid, IntPtr sett, int[] new_value);
kRecSettingSetIntArray
RECERR RSTSAPI kRecSettingSetIntArray(int sid, HSETTING sett, const int *new_values)
Setting the value of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET setting.

◆ kRecSettingSetIntArrayAt()

RECERR RSTSAPI kRecSettingSetIntArrayAt | ( | int | sid,
 |  | HSETTING | sett,
 |  | int | index,
 |  | int | new_value )

Setting the value of an element of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET setting.

It sets the given element of the value of the int, enum, bool array or the set setting in the given Settings Collection.

Parameters
[in] | sid | This is the ID of the Settings Collection.
[in] | sett | This is the handle of the array setting.
[in] | index | This is the index of the required element.
[in] | new_value | This is the new value of the given element.
Return values
STSMN_HANDLE_ERR | sett is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any setting.
STSMN_BADTYPE_ERR | The setting type is not valid.
STSMN_OPNOTALLOWED_ERR | This is a Read-only setting.
STSMN_PARAMETER_ERR | index is invalid.
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingSetIntArrayAt(int sid, IntPtr sett, int index, int new_value);
kRecSettingSetIntArrayAt
RECERR RSTSAPI kRecSettingSetIntArrayAt(int sid, HSETTING sett, int index, int new_value)
Setting the value of an element of an STS_ARRAY_INT or STS_ARRAY_ENUM or STS_ARRAY_BOOL or STS_SET se...

◆ kRecSettingSetString()

RECERR RSTSAPI kRecSettingSetString | ( | int | sid,
 |  | HSETTING | sett,
 |  | const char * | new_value )

Setting the value of an STS_STRING or STS_USTRING setting.

It sets the value of the given setting in the given Settings Collection.

Parameters
[in] | sid | This is the ID of the Settings Collection.
[in] | sett | This is the handle of the setting.
[in] | new_value | This is the new value to be set. It will be copied into an internal buffer in StsMan.
Return values
See kRecSettingSetInt
Note
This function can accept both STS_STRING and STS_USTRING settings. If the given setting is an STS_USTRING one, the function supposes new_value to be a UTF-8 encoded string and converts it to Unicode.
The specification of this function in C# is:
RECERR kRecSettingSetString(int sid, IntPtr sett, string new_value);

◆ kRecSettingSetToDefault()

RECERR RSTSAPI kRecSettingSetToDefault | ( | int | sid,
 |  | HSETTING | sett,
 |  | INTBOOL | whole_subtree )

Setting the value to default.

It sets the value of the given setting in the given Settings Collection to its default value. It can set the value of all settings in the subtree, whose root is the given setting or node. It does not set clone settings. It does not set the settings with flag STSFLG_DONTSETTODEFAULT unless whole_subtree is FALSE (i.e. the given one is the only one that is to be set). This feature lets you avoid the accidental changing of important settings values, assuming that the User who calls this function with FALSE, really wants to modify the given setting.

Parameters
[in] | sid | This is the ID of the Settings Collection.
[in] | sett | This is the handle of a node. If whole_subtree is FALSE it must be a setting, otherwise it can be a node or even NULL.
[in] | whole_subtree | If it is TRUE the function sets all the settings in the subtree (including the given one) to default.
Return values
STSMN_HANDLE_ERR | sett is invalid.
STSMN_NOSETTING_ERR | The node does not have any setting (when whole_subtree is FALSE).
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingSetToDefault(int sid, IntPtr sett, bool whole_subtree);

◆ kRecSettingSetToDefaultPlusC()

RECERR RSTSAPI kRecSettingSetToDefaultPlusC | ( | int | sid,
 |  | HSETTING | sett,
 |  | INTBOOL | whole_subtree )

Setting the value to default (also in cloned settings).

It sets the value of the given setting in the given Settings Collection to its default value. It can set the value of all settings in the subtree, whose root is the given setting or node. It does set clone settings (unlike kRecSettingSetToDefault). Generally a clone is created for differing from its origin, thus this function is recommended to use very carefully, because it loses this difference. It does not set the settings with flag STSFLG_DONTSETTODEFAULT unless whole_subtree is FALSE. This feature lets you avoid the accidental changing of important settings values, assuming that the User who calls this function with FALSE, really wants to modify the given setting.

Parameters
[in] | sid | This is the ID of the Settings Collection.
[in] | sett | This is the handle of a node. If whole_subtree is FALSE it must be a setting, otherwise it can be only a node.
[in] | whole_subtree | If it is TRUE the function sets all the settings in the subtree to default. In this case, if the node sett (the root of the subtree) is also a setting its value is also set.
Return values
STSMN_HANDLE_ERR | sett is invalid or NULL.
STSMN_NOSETTING_ERR | The node does not have any setting (when whole_subtree is FALSE).
REC_OK | Successful.
Note
The specification of this function in C# is:
RECERR kRecSettingSetToDefaultPlusC(int sid, IntPtr sett, bool whole_subtree);
kRecSettingSetToDefaultPlusC
RECERR RSTSAPI kRecSettingSetToDefaultPlusC(int sid, HSETTING sett, INTBOOL whole_subtree)
Setting the value to default (also in cloned settings).

◆ kRecSettingSetUString()

RECERR RSTSAPI kRecSettingSetUString | ( | int | sid,
 |  | HSETTING | sett,
 |  | const WCHAR * | new_value )

Setting the value of a STS_STRING or STS_USTRING setting.

See kRecSettingSetString.

Note
This function can accept both STS_STRING and STS_USTRING settings. If the given setting is an STS_STRING one, the function supposes that its value can be a UTF-8 encoded string, so new_value will be converted to UTF-8.
The specification of this function in C# is:
RECERR kRecSettingSetUString(int sid, IntPtr sett, string new_value);
kRecSettingSetUString
RECERR RSTSAPI kRecSettingSetUString(int sid, HSETTING sett, const WCHAR *new_value)
Setting the value of a STS_STRING or STS_USTRING setting.


RecAPI: SEnumTypeElement Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
SEnumTypeElement Struct Reference
KernelAPI » General Operations Module » Settings Manager Module

Descriptor structure of an enum type element. More...

#include <KrnStsApi.h>

Public Attributes

const char * | id
Identifier of the given element of the enum type.
int | value
Value of the given element of the enum type.

Detailed Description

Descriptor structure of an enum type element.

The elements of an enum type can be accessible in both int and string format. The string format provides better readability. For example, this string appears in the setting files and it can be useful for UI applications as well.


RecAPI: Profile Module

Enumerations | Functions
Profile Module
KernelAPI » General Operations Module

Profile handling for setting the environment according to each workflow. More...

Enumerations

enum PROFILES_INTENT {
PI_Default ,
PI_Indexing ,
PI_Archiving ,
PI_UnstructuredText ,
PI_TabulatedData ,
PI_DataExtraction ,
PI_FormatRetention ,
PI_ContentReuse ,
PI_EditableCopy ,
PI_BarcodeReading ,
PI_FormCreation ,
PI_DocClassify ,
PI_MakePDFSearchable ,
PI_SIZE
}
Intent of the workflow helped by the profile. More...
enum PROFILES_SOURCE_TYPE {
PST_Default ,
PST_Scanned ,
PST_Camera ,
PST_Screen ,
PST_PDForXPS ,
PST_SIZE
}
Source type of the workflow helped by the profile. More...
enum PROFILES_SOURCE_CONTENT {
PSC_Default ,
PSC_GeneralText ,
PSC_TemplatedForm ,
PSC_FreeForm ,
PSC_Tables ,
PSC_SIZE
}
Source content of the workflow helped by the profile. More...

Functions

RECERR RECAPIKRN kRecUseProfile (int sid, LPCTSTR profile)
Using the profile helping the workflow.

Detailed Description

Profile handling for setting the environment according to each workflow.

This module (in cooperation with Settings Manager Module) can make a workflow more optimal for a specific aim. For this, it uses profiles, which are collections of settings that can adjust the operation of the workflow optimal for the specific aim.

CSDK settings cover the entire environment for the workflow, such as the intent, source-format, processing options, and output format. Profiles make it easy to handle the thousands of settings controlling the environment for CSDK workflows, even for a programmer not familiar with the CSDK settings tree. CSDK comes with a built-in set of Profiles, each of those include high-level non-default settings relevant for a frequently used scenario. Profile settings affect the related workflow functions, adjusting the result and performance to the related scenario. Still, Profiles do not perform or process anything, but the developer is responsible for conducting the work by calling the appropriate functions, using correct parameters, and handling exceptions.

Loading a profile requires only a single call and saves the additional work attached to the use of low-level settings directly. You can load a profile into any Settings Collection, using the settings collection ID (sid). Call the following function to load a profile: kRecUseProfile.

Developers can fine-tune the CSDK workflow environment with low-level settings after loading a profile. The kRecUseProfile function resets all settings to the default, so make sure you load the Profile before customizing your workflow environment with any low-level setting or calling other CSDK API functions.

Refer to the Samples from number 77 on for details on Profile handling.

The following list contains the built-in profiles. For using them pass their name to the second argument of the function kRecUseProfile.

  • Archive2PDF - Prepares the settings for archiving the source to searchable PDF MRC for indexing purposes. Tunes the OCR engine for machine-printed text. (See also Sample 77.)
  • MakePDFSearchable - Prepares the settings for converting a PDF to searchable. Works fast and tunes the OCR engine for machine-printed text. (See also Sample 78.)
  • ExtractContent2Text - Prepares the settings for text extraction. The expected source is a form with an arbitrary layout, while the output is plain text or XML. Uses accurate OCR settings. (See also Sample 79.)
  • ExtractContent2Doc - Prepares the settings for a conversion to an essay mode document format. This means recognizing and extracting all the texts in reading order, including tables and pictures, while not preserving the original layout. It is ideal for producing large documents with mostly texts in a single column, with consolidated text properties across continuous pages. Input is assumed to be a large document in one. (See also Sample 80.)
  • TrueCopy2Doc - Prepares the settings for converting the source with the highest possible accuracy regarding the page layout and text formatting. It is the best mode for copying documents with a complex layout as it is. However, the text is scattered across various output blocks (such as text boxes). (See also Sample 81.)
  • Convert2EditableDoc - Prepares the settings for producing a document that is easy to edit, with a page layout resembling the original. Text flows in continuous paragraphs on a page, even at the expense of the original layout. Multiple columns are supported. (See also Sample 82.)
  • ExtractTables - Prepares the settings for converting a table or tabulated data to an XLS output while keeping the table layout. Works with multipage source documents too. (See also Sample 83.)
  • ExtractFormFields - Prepares the settings for converting a filled form, parsing the content with the form template specified for the workflow. Sets the output format as csv file. Use the Form Template Editor to prepare form templates and template libraries. (See also Sample 85.)
  • CreateFillableForm - Prepares the settings for converting an empty form to a fillable Acro-Form-based PDF. Does not require a form template but applies Logical Form Recognition (LFR). (See also Sample 84.)
  • DetectBarcodeSeparator - Prepares the settings for recognizing barcode separator pages in a flow of input documents.

Enumeration Type Documentation

◆ PROFILES_INTENT

enum PROFILES_INTENT

Intent of the workflow helped by the profile.

Enumerator
PI_Default | The intent is not specified.
PI_Indexing | Creating output for indexing.
PI_Archiving | Creating output for archiving documents.
PI_UnstructuredText | Focus on the text itself.
PI_TabulatedData | Creating table output.
PI_DataExtraction | Processing filled forms.
PI_FormatRetention | Focus on the page layout.
PI_ContentReuse | Creating easy to reuse document structure.
PI_EditableCopy | Editable output with layout as similar as possible.
PI_BarcodeReading | Reading barcodes.
PI_FormCreation | Processing empty forms.
PI_DocClassify | Using Document Classifier.
PI_MakePDFSearchable | Creating searchable PDF.
PI_SIZE | Number of intents.

◆ PROFILES_SOURCE_CONTENT

enum PROFILES_SOURCE_CONTENT

Source content of the workflow helped by the profile.

Enumerator
PSC_Default | The source content is not specified.
PSC_GeneralText | Text content.
PSC_TemplatedForm | Form content with structure described by a form template.
PSC_FreeForm | Form content with arbitrary structure.
PSC_Tables | Table(s) on the page.
PSC_SIZE | Number of source content.

◆ PROFILES_SOURCE_TYPE

enum PROFILES_SOURCE_TYPE

Source type of the workflow helped by the profile.

Enumerator
PST_Default | The source type is not specified.
PST_Scanned | Input from scanner.
PST_Camera | Input from digital camera.
PST_Screen | Input from screenshot.
PST_PDForXPS | Input from PDF or XPS file.
PST_SIZE | Number of source types.

Function Documentation

◆ kRecUseProfile()

RECERR RECAPIKRN kRecUseProfile | ( | int | sid,
 |  | LPCTSTR | profile )

Using the profile helping the workflow.

This function applies the specified profile. A profile is a collection of settings adjusting the operation of the workflow to the selected aim.

Parameters
[in] | sid | Settings Collection ID.
[in] | profile | The name of the profile. See the list of the built-in profiles.
Return values
RECERR
Note
This function sets all the settings to default before modifying the settings that adjust the operation of the workflow optimal to the aim. Thus this function must be called first before tunning any settings or calling any other functions of the workflow.
This function sets only the environment. It is the User, who is responsible for developing the workflow.


RecAPI: KRECMODULEINFO Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
KRECMODULEINFO Struct Reference
KernelAPI » General Operations Module

Module info. More...

#include <KernelApi.h>

Public Attributes

int Version
RECERR InitError

Detailed Description

Module info.

Note
See KRECMODULES for more information.

Member Data Documentation

◆ InitError

RECERR KRECMODULEINFO::InitError

Status code returned during the initialization of the module.

◆ Version

int KRECMODULEINFO::Version

Version number of the given module. If the module's DLL file(s) do not exist in the Engine Binaries directory its value will be zero (0). If the module was not initialized successfully, this value will be below zero (0). In this case the InitError field contains the error code.


RecAPI: PROGRESSMONITOR Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
PROGRESSMONITOR Struct Reference
KernelAPI » General Operations Module

Progress information. More...

#include <KernelApi.h>

Public Attributes

PROCESSID ProcessId
int | Percent
int | Reserved
const char * | Filename
int | PageNumber

Detailed Description

Progress information.

It is used for process callbacks.

Member Data Documentation

◆ Filename

const char* PROGRESSMONITOR::Filename

Name of the actual input file

◆ PageNumber

int PROGRESSMONITOR::PageNumber

Current page

◆ Percent

int PROGRESSMONITOR::Percent

Progress of the current process as a percentage.

◆ ProcessId

PROCESSID PROGRESSMONITOR::ProcessId

Identifier of the currently running process.

◆ Reserved

int PROGRESSMONITOR::Reserved

Not used.


RecAPI: Image File Handling Module

Typedefs | Enumerations | Functions
Image File Handling Module
KernelAPI

Supporting different image file formats. More...

Typedefs

typedef struct tagIMGFILEHANDLE * HIMGFILE
Handle of image files.

Enumerations

enum IMF_FORMAT {
FF_TIFNO = 0 ,
FF_TIFPB ,
FF_TIFHU ,
FF_TIFG31 ,
FF_TIFG32 ,
FF_TIFG4 ,
FF_TIFLZW ,
FF_PCX ,
FF_DCX ,
FF_SIM ,
FF_BMP_NO ,
FF_BMP_RLE8 ,
FF_BMP_RLE4 ,
FF_AWD ,
FF_JPG_SUPERB ,
FF_JPG_LOSSLESS = FF_JPG_SUPERB ,
FF_JPG_GOOD ,
FF_JPG_MIN ,
FF_PDA ,
FF_PNG ,
FF_XIFF ,
FF_GIF ,
FF_MAX_LOSSLESS ,
FF_MAX_GOOD ,
FF_MAX_MIN ,
FF_PGX ,
FF_PDF_MIN ,
FF_PDF_GOOD ,
FF_PDF_SUPERB ,
FF_PDF_LOSSLESS = FF_PDF_SUPERB ,
FF_PDF_MRC_MIN ,
FF_PDF_MRC_GOOD ,
FF_PDF_MRC_SUPERB ,
FF_PDF_MRC_LOSSLESS = FF_PDF_MRC_SUPERB ,
FF_TIFJPGNEW ,
FF_JPG2K_SUPERB ,
FF_JPG2K_LOSSLESS = FF_JPG2K_SUPERB ,
FF_JPG2K_GOOD ,
FF_JPG2K_MIN ,
FF_JBIG2_LOSSLESS ,
FF_JBIG2_LOSSY ,
FF_XPS ,
FF_WMP ,
FF_JBIG ,
FF_OPG ,
FF_PDF ,
FF_PDF_MRC ,
FF_JPG ,
FF_JPG2K ,
FF_TIF ,
FF_SIZE
}
Image formats. More...
enum IMF_IMAGEQUALITY {
IMF_IMAGEQUALITY_MIN = 0 ,
IMF_IMAGEQUALITY_GOOD = 1 ,
IMF_IMAGEQUALITY_SUPERB = 2 ,
IMF_IMAGEQUALITY_LOSSLESS = IMF_IMAGEQUALITY_SUPERB
}
Image quality (for DTXT PDF output) More...
enum IMF_MRCLEVEL {
IMF_MRCLEVEL_NO = 0 ,
IMF_MRCLEVEL_MIN = 1 ,
IMF_MRCLEVEL_GOOD = 2 ,
IMF_MRCLEVEL_SUPERB = 3 ,
IMF_MRCLEVEL_LOSSLESS = IMF_MRCLEVEL_SUPERB
}
MRC level (for DTXT PDF output) More...
enum COMPRESSION_TRADEOFF {
COMPRESSION_ADVANCED ,
COMPRESSION_FAST
}
Compression tradeoff. More...
enum IMF_PDFCOMPATIBILITY {
IMF_PDF_FORCESIZE = 0 ,
IMF_PDF_FORCEQUALITY = 1 ,
IMF_PDF15 = 2 ,
IMF_PDF14 = 3 ,
IMF_PDF13 = 4 ,
IMF_PDF12 = 5 ,
IMF_PDF11 = 6 ,
IMF_PDF10 = 7 ,
IMF_PDFA = 8 ,
IMF_PDFA1B = IMF_PDFA ,
IMF_PDF16 = 9 ,
IMF_PDF17 = 10 ,
IMF_PDFA2B = 11 ,
IMF_PDFA2U = 12 ,
IMF_PDFA1A = 13 ,
IMF_PDFA2A = 14 ,
IMF_PDFA3B = 15 ,
IMF_PDFA3U = 16 ,
IMF_PDFA3A = 17 ,
IMF_PDF20 = 18 ,
IMF_PDFUA1 = 19 ,
IMF_PDFUA2 = 20 ,
IMF_PDFA4 = 21 ,
IMF_PDFA4E = 22 ,
IMF_PDFA4F = 23
}
PDF compatibility (for saving PDF with KernelAPI) More...
enum IMF_PDFENCRYPTION {
IMF_PDFSECURITY_NONE ,
IMF_PDFSECURITY_STANDARD ,
IMF_PDFSECURITY_ENHANCED ,
IMF_PDFSECURITY_AES ,
IMF_PDFSECURITY_AES256 ,
IMF_PDFSECURITY_AES256X
}
PDF encryption types. More...
enum ENCRYPT_LEVEL {
ENC_NOPAS = 0 ,
ENC_MUSTPAS = 1 ,
ENC_MASTER = 2 ,
ENC_USER = 4 ,
ENC_MUSTUSER = ENC_MUSTPAS | ENC_USER ,
ENC_MUSTMASTER = ENC_MUSTPAS | ENC_MASTER ,
ENC_MUSTANY = ENC_MUSTPAS | ENC_MASTER | ENC_USER ,
ENC_NOACCESS = 8
}
PDF encryption level. More...

Functions

RECERR RECAPIKRN | kRecOpenImgFile (LPCTSTR pFilename, HIMGFILE *pHIMGFILE, int mode, IMF_FORMAT filetype)
Opening an image file.
RECERR RECAPIKRN | kRecCloseImgFile (HIMGFILE hIFile)
Closing an image file.
RECERR RECAPIKRN | kRecGetPDFEncLevel (HIMGFILE hIFile, ENCRYPT_LEVEL *pEncLev)
RECERR RECAPIKRN | kRecSetImfLoadFlags (int sid, DWORD fFlag)
Setting IMF PDF load flags.
RECERR RECAPIKRN | kRecGetImfLoadFlags (int sid, DWORD *pfFlag)
Getting IMF PDF load flags.
RECERR RECAPIKRN | kRecLoadImg (int sid, HIMGFILE hIFile, HPAGE *phPage, int iPage)
Loading a page from an opened image file.
RECERR RECAPIKRN | kRecLoadImgF (int sid, LPCTSTR pFilename, HPAGE *phPage, int nPage)
Loading a page directly from an image file.
RECERR RECAPIKRN | kRecLoadImgDataStream (int sid, HIMGFILE hIFile, HPAGE *phPage, int iPage)
Loading a page from an opened image file without decompressing the image.
RECERR RECAPIKRN | kRecLoadImgDataStreamF (int sid, LPCTSTR pFilename, HPAGE *phPage, int nPage)
Loading a page directly from an image file without decompressing the image.
RECERR RECAPIKRN | kRecDecompressImgDataStream (int sid, HPAGE hPage)
Decompressing a DataStream.
RECERR RECAPIKRN | kRecFreeImgDataStream (int sid, HPAGE hPage)
Deleting DataStream from an HPAGE.
RECERR RECAPIKRN | kRecLoadImgM (int sid, BYTE *lpBitmap, LPCIMG_INFO lpImg, HPAGE *phPage)
Loading a page directly from a memory buffer.
RECERR RECAPIKRN | kRecLoadImgMC (int sid, BYTE *lpBuf, size_t bufLen, LPCCOMPRESSED_IMG_INFO lpCImg, HPAGE *phPage)
Loading a page directly from a compressed memory buffer.
RECERR RECAPIKRN | kRecLoadImgDataStreamMC (int sid, BYTE *lpBuf, size_t bufLen, LPCOMPRESSED_IMG_INFO lpCImg, HPAGE *phPage)
Loading a page directly from a compressed memory buffer without decompressing the image.
RECERR RECAPIKRN | kRecSetCompressionLevel (int sid, int CompressionLevel)
Setting the compression level.
RECERR RECAPIKRN | kRecGetCompressionLevel (int sid, int *pCompressionLevel)
Getting the compression level.
RECERR RECAPIKRN | kRecSetCompressionTradeoff (int sid, COMPRESSION_TRADEOFF CompressionTradeoff)
Setting the compression trade-off.
RECERR RECAPIKRN | kRecGetCompressionTradeoff (int sid, COMPRESSION_TRADEOFF *pCompressionTradeoff)
Getting the compression tradeoff.
RECERR RECAPIKRN | kRecSetMRCCompressionSettingsFromLevel (int sid, int CompressionLevel, COMPRESSION_TRADEOFF CompressionTradeOff)
Modifying the MRC settings according to the given compression level and tradeoff.
RECERR RECAPIKRN | kRecSetJPGQuality (int sid, int nQuality)
Setting JPEG quality.
RECERR RECAPIKRN | kRecGetJPGQuality (int sid, int *pnQuality)
Getting JPEG quality.
RECERR RECAPIKRN | kRecSaveImg (int sid, HIMGFILE hIFile, IMF_FORMAT Imgfileformat, HPAGE hPage, IMAGEINDEX iiImg, INTBOOL bAppend)
Saving a page.
RECERR RECAPIKRN | kRecSaveImgForce (int sid, HIMGFILE hIFile, IMF_FORMAT Imgfileformat, HPAGE hPage, IMAGEINDEX iiImg, INTBOOL bAppend)
Saving a page with forcing the format.
RECERR RECAPIKRN | kRecSaveImgF (int sid, LPCTSTR pFilename, IMF_FORMAT Imgfileformat, HPAGE hPage, IMAGEINDEX img, INTBOOL bAppend)
Saving a page directly into a file.
RECERR RECAPIKRN | kRecSaveImgForceF (int sid, LPCTSTR pFilename, IMF_FORMAT Imgfileformat, HPAGE hPage, IMAGEINDEX iiImg, INTBOOL bAppend)
Saving a page directly into a file with forcing of the format.
RECERR RECAPIKRN | kRecSaveImgArea (int sid, HIMGFILE hIFile, IMF_FORMAT format, HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pRect, INTBOOL append)
Saving an area of a page.
RECERR RECAPIKRN | kRecSaveImgAreaF (int sid, LPCTSTR pFilename, IMF_FORMAT format, HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pRect, INTBOOL append)
Saving an area of a page directly into a file.
RECERR RECAPIKRN | kRecSetPdfPassword (HIMGFILE hIFile, LPCTSTR pwd)
Setting PDF password.
RECERR RECAPIKRN | kRecSetPdfTagInfo (int sid, INTBOOL bUseTagInfo)
Setting use of PDF tag information.
RECERR RECAPIKRN | kRecGetPdfTagInfo (int sid, INTBOOL *pbUseTagInfo)
Getting the use of PDF tag information.
RECERR RECAPIKRN | kRecGetImgFilePageCount (HIMGFILE hIFile, int *lpPageCount)
Getting the number of pages in an image file.
RECERR RECAPIKRN | kRecGetImgFilePageInfo (int sid, HIMGFILE hIFile, int nPage, LPIMG_INFO pImg, IMF_FORMAT *pFormat)
Getting information about a page of an image file.
RECERR RECAPIKRN | kRecCopyImgFilePage (int sid, HIMGFILE hIFileDst, int ndstPage, HIMGFILE hIFileSrc, int nsrcPage)
Copying a page between TIFF files.
RECERR RECAPIKRN | kRecDeleteImgFilePage (int sid, HIMGFILE hIFile, int nPage)
Removing a page from a TIFF file.
RECERR RECAPIKRN | kRecInsertImgFilePage (int sid, HPAGE hPage, IMAGEINDEX iiImg, HIMGFILE hIFile, int nPage, IMF_FORMAT format)
Inserting a page into a TIFF file.
RECERR RECAPIKRN | kRecIsMultipageImgFileFormat (IMF_FORMAT imgfileformat, INTBOOL *bEnabled)
Checking multi-page capability of an image format.
RECERR RECAPIKRN | kRecMatchImgFileFormat (int sid, HPAGE hPage, IMAGEINDEX iiImg, IMF_FORMAT imgfileformat, INTBOOL *match)
Checking whether an image is suitable for a file format.
RECERR RECAPIKRN | kRecPackImgFile (int sid, LPCTSTR pFileName)
Packing a TIFF file.
RECERR RECAPIKRN | kRecUpdateImgFilePage (int sid, HPAGE hPage, IMAGEINDEX iiImg, HIMGFILE hIFile, int nPage, IMF_FORMAT format)
Replacing a page in a TIFF file.
RECERR RECAPIKRN | kRecReplaceImgFilePage (int sid, HIMGFILE hIFileDst, int ndstPage, HIMGFILE hIFileSrc, int nsrcPage)
Replacing a page in a TIFF file.
RECERR RECAPIKRN | kRecGetImgFilePageIndex (HIMGFILE hIFile, int *pIndex)
Getting the index of the current page.

Image file opening modes

#define | IMGF_SCANNER (HIMGFILE)-1
Image input from scanner. (Use it with kRecLoadImg.)
#define | IMGF_READ 0
Opening file for reading only. The file can be shared. (Use it with kRecOpenImgFile.)
#define | IMGF_RDWR 2
Opening file for both reading and writing. The opening is exclusive. The file is appendable. When the file does not exist it creates a new one. (Use it with kRecOpenImgFile.)

IMF PDF Load Flags defines for loading PDF file

Possible bits of the setting Kernel.Imf.PDF.LoadFlags, which can be set by kRecSetImfLoadFlags. These bits can be combined and specify the elements of the PDF to be rendered onto the II_ORIGINAL image of the HPAGE at loading.

Note
There are other ways to affect on PDF processing. See also PDF_PROC_MODE.
#define | IMF_PDF_AS_IMAGE 1
Disable using PDF text. PDF is loaded as an image (e.g. a TIFF).
#define | IMF_PDF_NO_TAGS 2
Disable using PDF tags.
#define | IMF_PDF_ANN_NOTE (4 << 0)
Enable rendering sticky-note icons.
#define | IMF_PDF_ANN_LINK (4 << 1)
Enable rendering hyperlinks.
#define | IMF_PDF_ANN_TEXT (4 << 2)
Enable rendering text.
#define | IMF_PDF_ANN_LINE (4 << 3)
Enable rendering straight lines.
#define | IMF_PDF_ANN_SQUARE (4 << 4)
Enable rendering rectangles.
#define | IMF_PDF_ANN_CIRCLE (4 << 5)
Enable rendering ellipses.
#define | IMF_PDF_ANN_POLYGON (4 << 6)
Enable rendering closed and filled polygons.
#define | IMF_PDF_ANN_POLYLINE (4 << 7)
Enable rendering closed polygons.
#define | IMF_PDF_ANN_HIGHLIGHT (4 << 8)
Enable rendering highlights of the document text.
#define | IMF_PDF_ANN_UNDERLINE (4 << 9)
Enable rendering underline of the document text.
#define | IMF_PDF_ANN_SQUIGGLY (4 << 10)
Enable rendering jagged underline of the document text.
#define | IMF_PDF_ANN_CROSSOUT (4 << 11)
Enable rendering crossout of the document text.
#define | IMF_PDF_ANN_STAMP (4 << 12)
Enable rendering stamps.
#define | IMF_PDF_ANN_CARET (4 << 13)
Enable rendering carets.
#define | IMF_PDF_ANN_PENCIL (4 << 14)
Enable rendering freehand drawing.
#define | IMF_PDF_ANN_POPUP (4 << 15)
Enable rendering popup windows.
#define | IMF_PDF_ANN_FILEATTACHMENT (4 << 16)
Enable rendering file attachment icons.
#define | IMF_PDF_ANN_SOUND (4 << 17)
Enable rendering sound icons.
#define | IMF_PDF_ANN_MOVIE (4 << 18)
Enable rendering movie icons.
#define | IMF_PDF_ANN_FORM (4 << 19)
Enable rendering Acro-Form fields.
#define | IMF_PDF_ANN_SCREEN (4 << 20)
Enable rendering screen icons.
#define | IMF_PDF_ANN_PRINTERMARK (4 << 21)
Enable rendering printer's mark icons.
#define | IMF_PDF_ANN_TRAPNET (4 << 22)
Enable rendering trap network icons.
#define | IMF_PDF_ANN_WATERMARK (4 << 23)
Enable rendering watermark.
#define | IMF_PDF_ANN_3D (4 << 24)
Enable rendering 3d icons.

Pagenumber defines for loading a page

See kRecLoadImg.

#define | IMGF_NEXTPAGE -1
The next page of a HIMGFILE.
#define | IMGF_FIRSTPAGE 0
The first page of a HIMGFILE.

Detailed Description

Supporting different image file formats.

This module supports loading and saving different image file formats. Accessible formats are specified by IMF_FORMAT. During loading, the system can automatically detect the file format and compression method of the image files without using file extensions. Both this module, and the Image Handling Module support B/W, grayscale and color images.

CSDK v2025.1 can read the following multi-page image file formats: DCX, MAX, PDF, TIFF and TIFF-FX.

Load input can be an image file already open (kRecOpenImgFile, kRecLoadImg), the image file itself (kRecLoadImgF), or the memory of the integrating application (kRecLoadImgM, kRecLoadImgMC). The first two functions can handle multi-page image files. The former can load a specified page or the next page, while the latter can load only the specified one.

After the file is loaded, the image is forwarded to the Image Handling Module. Saving input is also provided by the Image Handling Module.

On loading, 4-bit greyscale images are converted into the 8-bit greyscale format, and 4-bit palette color images are converted into the 8-bit palette color format.

The working of the Image File Handling Module can be adjusted with settings in some points.

See also
PDF Files in CSDK 2025.1
Image File Format List

Extended image size

There are no module-specific limits to image size (measured in inches or centimeters). The available memory, the computing environment, and properties of individual image files all influence the size limits for successful image processing.

However, there are lower and upper limits for the size of the images (both for height and width) measured in pixels. By default, the Engine handles images at most 8400 pixels in height and width. The Engine refuses to load an image exceeding this limit, and the loading function will return with IMG_SIZE_ERR (Error string: "Non-supported image size.").

The image size limits are determined by the following Engine settings:

  • Kernel.Img.Max.Pix.X
  • Kernel.Img.Max.Pix.Y
  • Kernel.Img.Min.Pix.X
  • Kernel.Img.Min.Pix.Y The application can change the image size limits by altering these settings between 16-32000. Accordingly, the user can process larger images and thus, CSDK can reach either A0 size (33×46 inches) or a resolution of 2400 DPI in particular situations.

Nevertheless, certain CSDK image processing functions, such as kRecPreprocessImg, kRecLocateZones, and kRecRecognize might have other image size-related limits, and exceeding those can cause the operation to fail (IMG_SIZE_ERR).

Thus, increasing the image size limit settings may enable to loadi of larger images, but may cause errors in further processing. The default limit of 8400 pixels was determined so that any workflow may complete safely and successfully, without image size issues. Using the default value protects high-volume unattended processing from the use of high resources.

Notes

  • Available memory and/or memory segmentation (mainly due to system DLLs) can strongly decrease these amounts.
  • Preferably, use OmniPage CSDK in 64-bit mode to avoid the above memory issues. For 32-bit applications, we suggest enabling the linker option Enable Large Address in Visual Studio (or equivalent options in other linkers).
  • Prior CSDK 22.3: When CSDK should produce Microsoft Office output, such as Word or PowerPoint, the page limits of these formats should also be considered: the width and height of the page must be between 0.1 and 22 inches. Because of this, if an image exceeding this limit is loaded, CSDK does not create *.rtf, *.docx, or *.pptx files with CSDK’s layout retention output options Flowing Page or True Page. These options are retaining the original page size and layout. Exceeding this Microsoft Office software limitation results in an error, and the output file is not created.
  • Since CSDK 22.3: the Microsoft Office output is always created, regardless of the input image size. However, see Formatter.text.*.LimitPaperSize.

Using images without decompression

In a standard workflow, saving an image using a lossy compression method loses both the compression level and the quality of the input image even if the output file format is the same as the loaded one. It can be especially annoying when a JPEG image is put into a PDF file for creating a searchable PDF.

OmniPage CSDK 20.20 introduces a new notion called DataStream. This is an optional part of an HPAGE that contains the input image without any decompression. The DataStream can use JPEG or JPEG2000 compression; therefore such a page can be created from JPEG, JPEG2000 and TIFF using 'new style' JPEG files. After loading these types of image files, the HPAGE does not contain decompressed bitmap, but all CSDK functions can decompress it automatically if the decompressed bitmap is needed. After decompressing the DataStream the HPAGE contains both the DataStream and the decompressed bitmap. When the HPAGE is saved, you can specify whether or not to use the DataStream.

To keep compatibility with the previous versions of CSDK, two new settings were introduced:

  • Kernel.Imf.DataStream.TryToLoad: bool setting, default is false, and
  • Kernel.Imf.DataStream.Save: bool setting, default is true.

If you set Kernel.Imf.DataStream.TryToLoad to true, the standard image loading functions (kRecLoadImg, kRecLoadImgF) load the DataStream if possible, otherwise they load the decompressed image. There are functions (kRecLoadImgDataStream, kRecLoadImgDataStreamF, kRecLoadImgDataStreamMC), that – regardless of the status of Kernel.Imf.DataStream.TryToLoad – always load the DataStream, or return error if the input format is not suitable.

If Kernel.Imf.DataStream.Save is true, and the HPAGE contains DataStream, the saving operations (any kRecSaveImg* and also any kRecConvert2DTXT*) decide whether or not to write the DataStream into the output file.

  1. The DataStream will be saved if
    • the output format is compatible with the format of the DataStream, i.e. PDF (non-MRC), JPEG (for JPEG and TIFF inputs) or JPEG2000 (for JPEG2000 inputs); and
    • the IMAGEINDEX is II_ORIGINAL or II_CURRENT and it has not been changed (except rotation and deskew, see below)
    • the whole image area is saved.
  2. If the output file is PDF, then the DataStream can be saved even if the image has been rotated and/or 2d-deskewed, because PDF contains a transformation matrix that can describe the necessary transformation. If the output is JPEG or JPEG2000, the DataStream is used only if the image is neither rotated nor deskewed.
  3. In any other cases, the decompressed data will be saved.

If a CSDK function changes II_CURRENT image, the DataStream will be deleted except if the image is rotated or 2d-deskewed or Kernel.Img.KeepOriginalImage is true.

If you want to force saving the decompressed data, you can set Kernel.Imf.DataStream.Save to false, or you can delete DataStream calling kRecFreeImgDataStream.

Newer image formats

In OmniPage CSDK 2025.1 the following image formats were introduced (supported on: Windows, Linux, Embedded Linux, MacOS):

  • FF_PDF (instead of FF_PDF_MIN, FF_PDF_GOOD, FF_PDF_SUPERB),
  • FF_PDF_MRC (instead of FF_PDF_MRC_MIN, FF_PDF_MRC_GOOD, FF_PDF_MRC_SUPERB),
  • FF_JPG (instead of FF_JPG_MIN, FF_JPG_GOOD, FF_JPG_SUPERB),
  • FF_JPG2K (instead of FF_JPG2K_MIN, FF_JPG2K_GOOD, FF_JPG2K_SUPERB),
  • DTXT_IOTPDF (instead of DTXT_PDFIOT),
  • DTXT_IOTPDF_MRC (instead of DTXT_PDFIOT using MRC).

Note: The newer ones can be used with 5 different predefined levels (1-5) by calling kRecSetCompressionLevel. See the Tungsten Omnipage Capture SDK User's Guide for more details, in the Imaging Module, MRC image compression level comparison subsection.

In addition for PDF formats a trade-off setting is introduced (COMPRESSION_TRADEOFF, kRecSetCompressionTradeoff), which can speed up the used algorithm (producing a lower quality).

The higher compression level means lower compression and higher quality (i.e. greater file size).

Furthermore, there is a customization possibility for manual tuning of quality with compression level 0.

The kRecSetCompressionLevel and kRecSetCompressionTradeoff affect both the FF_PDF_MRC and the DTXT_IOTPDF_MRC pdf file types.

We recommend using the new MRC level feature, although the older formats mentioned can still be used. (We do not know how long we will support these.)

The older formats provided 3 predefined levels (MIN: Level=1, GOOD: Level=3, SUPERB: Level=5). The older levels can be reproduced by newer ones if the trade-off is COMPRESSION_ADVANCED:

Customization of JPGQuality

The quality of JPEG and JPEG2000 images can be tuned by the setting Kernel.IMF.JPG.Quality both in older and newer formats (either JPEG, JPEG2000 or non-MRC PDF). However, in newer formats the value of this setting is used only in compression level 0. For the predefined JPEG quality values of different compression levels see kRecSetJPGQuality.

Customization of quality for PDF formats

The new MRC level compression uses the following new settings (see detailed descriptions):

  • Kernel.IMF.PDF.ColorFormat
  • Kernel.IMF.PDF.BWFormat
  • Kernel.IMF.PDF.MRC.EnableMultipleFG
  • Kernel.IMF.PDF.MRC.BGLayer.JPGQuality
  • Kernel.IMF.PDF.MRC.BGLayer.SubSampleRate
  • Kernel.IMF.PDF.MRC.BGLayer.Method
  • Kernel.IMF.PDF.MRC.BGLayer.ConsolidationStrength
  • Kernel.IMF.PDF.MRC.BGLayer.Smoothing
  • Kernel.IMF.PDF.MRC.BGLayer.DilatationSteps
  • Kernel.IMF.PDF.MRC.FGLayer.JPGQuality
  • Kernel.IMF.PDF.MRC.FGLayer.SubSampleRate
  • Kernel.IMF.PDF.MRC.FGLayer.Method
  • Kernel.IMF.PDF.MRC.SelLayer.SubSampleRate
  • Kernel.IMF.PDF.MRC.Selector.Method

These are new setings, only effective for new level 5:

  • Kernel.IMF.PDF.MRC.EnableUseBigSelector
  • Kernel.IMF.PDF.MRC.EnableUseImagette

Each compression level uses predefined values for these new settings. Selecting a non-0 compression level the predefined values are used during creation of file, even if the value of any new setting were changed manually. However compression level 0 uses the current value of these settings. For putting the predefined values of a non-0 compression level into these settings the function kRecSetMRCCompressionSettingsFromLevel can be used. See notes in the documentation of the function for details.

Note
Older formats do not use the above mentioned new settings.

The older formats were customizable by different settings. If these settings were modified, their values were used during file creation.

The newer formats do not use some older settings:

  • Kernel.Imf.PDF.MRC.BWFormat,
  • Kernel.Imf.PDF.MRC.ColorFormat,
  • Kernel.Imf.PDF.MRC.JPGQualityBGMIN,
  • Kernel.Imf.PDF.MRC.JPGQualityBGGOOD,
  • Kernel.Imf.PDF.MRC.JPGQualityBGMAX,
  • Kernel.Imf.PDF.MRC.JPGQualityFGMAX.

Orientation of page at saving a PDF

There are some saving functions that can affect on the orientation of the page, when they create a PDF file (kRecSaveImg, kRecSaveImgF, kRecSaveImgForce, kRecSaveImgForceF, kRecConvert2DTXTEx and kRecMakePagesSearchable). The orientation of the written page depends on the IMAGEINDEX parameter of these functions. In case of PDF output this parameter can get only the following values:

  • II_ORIGINAL - preserves the orientation of the loaded page and the text is rotated according to that orientation.
  • II_CURRENT - uses the orientation of the current (preprocessed) image, which is equal to the orientation of the readable text.

The result of using other IMAGEINDEX values is undefined.

However there are some exceptions:

  • II_CURRENT can be used when kRecPreprocessImg have been already called.
  • II_ORIGINAL can be used when this image exists. See the lifetime of the different images of the HPAGE.
  • II_ORIGINAL can be used also when HPAGE contains DataStream or when kRecMakePagesSearchable is called.
Note
The older function kRecConvert2DTXT has no IMAGEINDEX parameter. Thus if it creates PDF output, the orientation of the page depends on the setting Kernel.Img.KeepOriginalImage as the followings:
  • if the setting is FALSE, the result of the function is the same as the one created by kRecConvert2DTXTEx using II_CURRENT image index.
  • if the setting is TRUE, the result of the function is the same as the one created by kRecConvert2DTXTEx using II_ORIGINAL image index.
Please note that the function kRecRecognize calls kRecConvert2DTXT (so not kRecConvert2DTXTEx) if its file name parameter is not empty. That's why it is recommended to use kRecConvert2DTXTEx instead.
An interesting trick, which can be useful sometimes: kRecMakePagesSearchable can changes the orientation of the pages in the PDF file even if it gets HPAGE's having no letters (if preprocess have been already called and II_CURRENT is passed in the IMAGEINDEX parameter).

JBIG2 compression in CSDK

JBIG2 is a very efficient compression method for black-and-white images. It generally produces better results with smaller compressed data sizes than the well-known G4 compression. The unique feature of JBIG2 is that it can be both lossless and lossy.

In CSDK, data compressed using the JBIG2 method can occur as stand-alone files (see FF_JBIG2_LOSSLESS and FF_JBIG2_LOSSY) or embedded data in PDF files. PDF files may contain streams representing black and white images or masks in MRC compressed colour images.

The JBIG2 format may contain several compression methods:

  1. arithmetic encoding: always lossless,
  2. symbol encoding: can be both lossy and lossless,
  3. a combination of the above two methods.

The result of lossy compression is significantly smaller in most cases than the result of lossless.

As with all lossy compression, JBIG2 symbol encoding may confuse some parts of the resulted compressed image with other ones, in some extreme cases. The probability of such an issue is extremely small, but not zero. To eliminate this small probability of a "wrong" result, the CSDK does not write lossy JBIG2 by default either into stand-alone files or PDF's, even if FF_JBIG2_LOSSY format is chosen.

It is possible to enable lossy compression by setting Kernel.IMF.JBIG2.ForceLosslessMode to 0. For all other values of this variable, lossless compression is obtained.

The exact operation of JBIG2 compression is determined by the use case itself (such as the output format, the settings of the PDF conversion) and certain JBIG2 settings. The main setting is Kernel.IMF.JBIG2.ForceLosslessMode. If its value is 0, it enables the use of both lossless and lossy algorithms of JBIG2 (determined by the use case). In all the other cases, only lossless conversion types are available, even if the FF_JBIG2_LOSSY format is selected.

Type of lossless conversions:

  • 1: Normal symbol-based lossless mode (~registers a single common symbol-dictionary entry for pixel-by-pixel identical occurences of the same connected component).
  • 2: "Non-reusing" symbol-based lossless mode (~registers separate symbol-dictionary entries even for pixel-by-pixel identical occurences of the same connected component) (experimental, mode 1 is recommended instead).
  • 3: Generic region encoding based lossless mode (~full-page bitmap with arithmetic compression).

If the value of ForceLosslessMode is -1, the setting Kernel.IMF.JBIG2.DefaultLosslessMode selects from the above types.

If the conversion decides to use a lossy method, the setting Kernel.IMF.JBIG2.LossyMode selects from the following types of lossy conversions:

  • -1: default behaviour (currently: behaves as 1)
  • 0: original mode - used in older OPSDK-versions
  • 1: safer mode - tries to prevent 6-8 mixes in problematic cases

Some other settings can adjust the conversion. See them in the list of JBIG2 settings.

Enumeration Type Documentation

◆ COMPRESSION_TRADEOFF

enum COMPRESSION_TRADEOFF

Compression tradeoff.

This enum gives the possible values of the setting Kernel.Imf.CompressionTradeoff, which determines whether the fast or advanced compression method is used. This setting is used when FF_PDF and FF_PDF_MRC output is created. In both cases

  • FAST trade-off indicates usage of JPEG or TIFF G4 compression,
  • ADVANCED trade-off uses JPEG2000 or JBIG2 compression,

according to the bit-depth of the image. In case of FF_PDF_MRC the trade-off affects on the algorithms used for creating layers as well.

Enumerator
COMPRESSION_ADVANCED | Use advanced but slower method (default).
COMPRESSION_FAST | Use fast compression method.

◆ ENCRYPT_LEVEL

enum ENCRYPT_LEVEL

PDF encryption level.

PDF files may be protected by two types of password: an open (also known as user) password and a permissions (also known as owner or master) password. The open password protects the opening of the file. When a file requires an open password, OmniPage CSDK cannot open it without this, so an appropriate interface must be provided for the user to supply the password. If a file is protected by a permissions password, it must be supplied in order to grant or deny permissions for different file operations, such as copying content, printing or modifying. When a particular operation is prohibited, OmniPage CSDK does not allow the operation concerned. If text copying is prohibited from a PDF file with a text layer and a permissions password is not given, CSDK opens it as if it were an image-only PDF. If printing is prohibited and a permissions password is not given, the PDF file cannot be opened. When a file is protected by both an open and a permissions password, OmniPage CSDK requires only the permissions password for full access to be granted. See kRecGetPDFEncLevel.

Enumerator
ENC_NOPAS | No need for any password at all.
ENC_MUSTPAS | This bit can be used only in bit combination. Password must be given. See ENC_MUSTUSER, ENC_MUSTMASTER and ENC_MUSTANY.
ENC_MASTER | Permissions password is needed, because text copying is prohibited. Without it, file is opened as image-only. It can also be used in bit combination, see ENC_MUSTMASTER and ENC_MUSTANY.
ENC_USER | This bit can be used only in bit combination. See ENC_MUSTUSER and ENC_MUSTANY.
ENC_MUSTUSER | The file is protected by an open password for opening. This is combination of bits ENC_MUSTPAS and ENC_USER.
ENC_MUSTMASTER | Permissions password is required for accessing the file. This is combination of bits ENC_MUSTPAS and ENC_MASTER.
ENC_MUSTANY | The file is protected by both password types. Giving the permissions password, the text content of the PDF is accessible. Giving the open password, PDF is loaded as image-only. This is a combination of the bits ENC_MUSTPAS, ENC_USER and ENC_MASTER.
ENC_NOACCESS | Unknown encryption mode. The file cannot be opened.

◆ IMF_FORMAT

enum IMF_FORMAT

Image formats.

The supported image formats. The multi-page file types (TIFF, DCX, MAX, PDF, JBIG) can contain pages compressed by different methods in the same file. Thus image format must be given page-by-page.

Note
Images to be loaded from image files into the Engine (or to be stored to disk from the Engine) can be in different formats. The main attributes of these files are:
  • the image type, i.e. the bit depth (B/W, 4 or 8-bit grayscale or color),
  • whether the image file contains only one or more images,
  • what kind of image compression has been used, if any.
The Engine does not support all the file formats listed here in the same way. Some of them can be read but cannot be created; other formats are supported by the Engine only for B/W images, etc.
  • Currently the FF_PDA, FF_BMP_RLE4 formats are not supported at all.
  • The FF_PCX, FF_DCX, FF_BMP_NO, FF_BMP_RLE8, FF_TIFNO, FF_TIFPB, and FF_PNG are supported by the Engine for both reading and writing and for all image types (B/W, 4-bit grayscale, 8-bit grayscale, 8-bit palette-color and 24-bit true-color).
  • Some other TIFF formats like FF_TIFHU, FF_TIFG31, FF_TIFG32, FF_TIFG4 and the FF_SIM formats support reading and writing B/W images only.
  • The three JPEG formats and FF_TIFJPGNEW images are supported by the Engine only for 8-bit grayscale and 24-bit color images.
  • If a 4-bit grayscale image in the Engine is to be saved to JPEG format, it will be automatically converted to an 8-bit grayscale one. Saving a B/W image into JPEG format is not supported.
  • With this toolkit version, the support of the At Work Document images (FF_AWD) has been removed. Microsoft no longer supports this format either.
  • Image formats supporting multi-page image files are the different TIFF formats, DCX, PDF, JBIG and the PaperPort MAX formats.
  • Both PDF input and output are supported on: Windows, Linux, MacOS. In addition PDF output is also supported on Embedded Linux. This information is true also for PDF_MRC.
  • For more information about PDF output see PDF Output in CSDK 2025.1.
In addition to the image file formats above, the Engine also supports TIFF-FX files for reading.
See notes of kRecSetJPGQuality for more information about the different JPEG and JPEG2000 formats.
For more detail on the supported image file formats see the topic Image File Format List.
Enumerator
FF_TIFNO | Uncompressed TIFF image format.
FF_TIFPB | Packbits TIFF image format.
FF_TIFHU | Group 3 Modified TIFF image format.
FF_TIFG31 | Standard G3 1D TIFF image format.
FF_TIFG32 | Standard G3 2D TIFF image format.
FF_TIFG4 | Standard G4 TIFF image format.
FF_TIFLZW | TIFF-LZW image format incorporating Unisys compression.
FF_PCX | PCX format.
FF_DCX | DCX format.
FF_SIM | Simple file format. Supported on: Windows, Linux, Embedded Linux, MacOS.
FF_BMP_NO | Windows bitmap format without compression.
FF_BMP_RLE8 | Windows bitmap RLE8 format.
FF_BMP_RLE4 | Windows bitmap RLE4 format. Only for reading!
FF_AWD | Not supported!
FF_JPG_SUPERB | Deprecated (see usage of new formats). JPEG format with negligible information loss.
FF_JPG_LOSSLESS | Deprecated, same as FF_JPG_SUPERB.
FF_JPG_GOOD | Deprecated (see usage of new formats). JPEG format with average information loss. (Results in medium-size image files when saving.)
FF_JPG_MIN | Deprecated (see usage of new formats). JPEG format optimized for minimum image file size. Worst image quality.
FF_PDA | Caere's proprietary compound document format. Only for reading! Only images with a single zone are supported!
FF_PNG | Portable Image format for Network Graphics.
FF_XIFF | TIFF-FX format. Only for reading! Supported on: Windows 32-bit.
FF_GIF | GIF image format incorporating Unisys compression.
FF_MAX_LOSSLESS | PaperPort MAX file format without information loss. Only for reading! Supported on: Windows 32-bit.
FF_MAX_GOOD | PaperPort MAX file format with average information loss. Only for reading! Supported on: Windows 32-bit.
FF_MAX_MIN | PaperPort MAX file format optimized for minimum image file size. Only for reading! Supported on: Windows 32-bit.
FF_PGX | Only for internal use!
FF_PDF_MIN | Deprecated (see usage of new formats). Adobe PDF format. Minimum image file size. Supported on: Windows, Linux, Embedded Linux, MacOS.
FF_PDF_GOOD | Deprecated (see usage of new formats). Adobe PDF format. Results in medium-size image files when saving. Supported on: Windows, Linux, Embedded Linux, MacOS.
FF_PDF_SUPERB | Deprecated (see usage of new formats). Adobe PDF format with negligible information loss. Supported on: Windows, Linux, Embedded Linux, MacOS.
FF_PDF_LOSSLESS | Deprecated, use FF_PDF_SUPERB instead.
FF_PDF_MRC_MIN | Deprecated (see usage of new formats). Adobe PDF format with MRC technology. Optimized for minimum image file size. Supported on: Windows, Linux, Embedded Linux, MacOS.
FF_PDF_MRC_GOOD | Deprecated (see usage of new formats). Adobe PDF format with MRC technology. (Results in medium-size image files when saving.) Supported on: Windows, Linux, Embedded Linux, MacOS.
FF_PDF_MRC_SUPERB | Deprecated (see usage of new formats). Adobe PDF format with MRC technology. PDF with small information loss. Supported on: Windows, Linux, Embedded Linux, MacOS.
FF_PDF_MRC_LOSSLESS | Deprecated, use FF_PDF_MRC_SUPERB instead.
FF_TIFJPGNEW | New JPG Compressed TIFF image format.
FF_JPG2K_SUPERB | Deprecated (see usage of new formats). JPEG2000 file format. Negligible information loss.
FF_JPG2K_LOSSLESS | Deprecated, same as FF_JPG2K_SUPERB.
FF_JPG2K_GOOD | Deprecated (see usage of new formats). JPEG2000 file format. Results in medium-size image files when saving.
FF_JPG2K_MIN | Deprecated (see usage of new formats). JPEG2000 file format. Optimized for minimum image file size.
FF_JBIG2_LOSSLESS | JBIG2 file format. Lossless image saving.
FF_JBIG2_LOSSY | JBIG2 file format. Optimized for minimum image file size.
FF_XPS | XPS file format. Supported on: Windows.
FF_WMP | Microsoft HD Photo (Windows Media Photo). Supported on: Windows.
FF_JBIG | JBIG format. Only for reading! Supported on: Windows.
FF_OPG | "OmniPageCSDK" HPAGE serialization format. One-page format, not appendable. The OPG file contains all members of the HPAGE including images, zones, letters and other internal information stored by HPAGE. Binary images, not image-only PDF images and palette-color images are saved using lossless compression, true-color and gray-scale images are saved using lossy compression. When an OPG file is being saved kRecSaveImg, kRecSaveImgF and kRecSaveImgForceF do not use their iiImg parameter, kRecSaveImgArea and kRecSaveImgAreaF do not use their iiImg and pRect parameters. Loading an OPG file restores the saved HPAGE. Primary image conversion is not applied when an OPG file is loaded.
FF_PDF | Adobe PDF format with changeable compression level (see usage of Saving MRC PDF files in KernelAPI PDF Output in KernelAPI). Supported on: Windows, Linux, Embedded Linux, MacOS.
FF_PDF_MRC | Adobe PDF format using MRC technology with changeable compression level (see usage of Saving MRC PDF files in KernelAPI PDF Output in KernelAPI). Supported on: Windows, Linux, Embedded Linux, MacOS.
FF_JPG | JPEG format with changeable compression level (see usage of new formats). Supported on: Windows, Linux, Embedded Linux, MacOS.
FF_JPG2K | JPEG2000 file format with changeable compression level (see usage of new formats). Supported on: Windows, Linux, Embedded Linux, MacOS.
FF_TIF | TIF file format with changeable compression and compression level (see usage of new formats). Supported on: Windows, Linux, Embedded Linux, MacOS.
FF_SIZE | Number of supported image file formats.

◆ IMF_IMAGEQUALITY

enum IMF_IMAGEQUALITY

Image quality (for DTXT PDF output)

Deprecated. This enum gives the possible values of Kernel.DTxt.PDF.BWQuality and ...ColorQuality. For details see the section about newer image formats.

Enumerator
IMF_IMAGEQUALITY_MIN | Minimal size, lowest quality.
IMF_IMAGEQUALITY_GOOD | Medium size, good quality.
IMF_IMAGEQUALITY_SUPERB | Large size, best quality.

◆ IMF_MRCLEVEL

enum IMF_MRCLEVEL

MRC level (for DTXT PDF output)

Deprecated. This enum gives the possible values of the setting Kernel.DTxt.PDF.UseMRC, which determines the MRC method used for DTXT PDF output. For details see the section about newer image formats.

Enumerator
IMF_MRCLEVEL_NO | Do not use MRC.
IMF_MRCLEVEL_MIN | Minimal size, lowest quality.
IMF_MRCLEVEL_GOOD | Medium size, good quality.
IMF_MRCLEVEL_SUPERB | Large size, best quality.

◆ IMF_PDFCOMPATIBILITY

enum IMF_PDFCOMPATIBILITY

PDF compatibility (for saving PDF with KernelAPI)

This enum gives the possible values of the setting Kernel.Imf.PDF.Compatibility, which is used during saving image-only or image-on-text PDF files. See also the section PDF output in KernelAPI.

Enumerator
IMF_PDF_FORCESIZE | Optimized for size.
IMF_PDF_FORCEQUALITY | Optimized for quality.
IMF_PDF15 | PDF 1.5.
IMF_PDF14 | PDF 1.4.
IMF_PDF13 | PDF 1.3.
IMF_PDF12 | PDF 1.2.
IMF_PDF11 | PDF 1.1.
IMF_PDF10 | PDF 1.0.
IMF_PDFA | PDF/A-1b compliant output (deprecated version of IMF_PDFA1B)
IMF_PDFA1B | PDF/A-1b compliant output.
IMF_PDF16 | PDF 1.6.
IMF_PDF17 | PDF 1.7.
IMF_PDFA2B | PDF/A-2b compliant output.
IMF_PDFA2U | PDF/A-2u compliant output.
IMF_PDFA1A | PDF/A-1a compliant output.
IMF_PDFA2A | PDF/A-2a compliant output.
IMF_PDFA3B | PDF/A-3b compliant output.
IMF_PDFA3U | PDF/A-3u compliant output.
IMF_PDFA3A | PDF/A-3a compliant output.
IMF_PDF20 | PDF 2.0.
IMF_PDFUA1 | PDF/UA-1.
IMF_PDFUA2 | PDF/UA-2.
IMF_PDFA4 | PDF/A-4.
IMF_PDFA4E | PDF/A-4e.
IMF_PDFA4F | PDF/A-4f.

◆ IMF_PDFENCRYPTION

enum IMF_PDFENCRYPTION

PDF encryption types.

PDF files may be saved with different encryption types. The setting Kernel.Imf.PDF.PDFSecurity.Type gets one of the values listed below for specifying the used encryption type. See also the description of saving encrypted PDF.

Enumerator
IMF_PDFSECURITY_NONE | There is no encryption.
IMF_PDFSECURITY_STANDARD | Standard, 40 bit encryption.
IMF_PDFSECURITY_ENHANCED | Enhanced, 128 bit encryption.
IMF_PDFSECURITY_AES | AES 128 bit encryption.
IMF_PDFSECURITY_AES256 | AES 256 bit encryption.
IMF_PDFSECURITY_AES256X | AES 256 bit encryption with hardened hash.

Function Documentation

◆ kRecCloseImgFile()

RECERR RECAPIKRN kRecCloseImgFile ( HIMGFILE hIFile )

Closing an image file.

This function closes an image file opened by kRecOpenImgFile.

Parameters
[in] hIFile Handle of the image file.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecCloseImgFile(IntPtr pHIMGFILE);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecCloseImgFile
RECERR RECAPIKRN kRecCloseImgFile(HIMGFILE hIFile)
Closing an image file.
The specification of this function in Java is:
int kRecCloseImgFile(HIMGFILE hIFile)
HIMGFILE
struct tagIMGFILEHANDLE * HIMGFILE
Handle of image files.
Definition KernelApi.h:11244
The specification of this function in Python is:
def kRecCloseImgFile(hIFile: "HIMGFILE") -> int

◆ kRecCopyImgFilePage()

RECERR RECAPIKRN kRecCopyImgFilePage | ( | int | sid,
 |  | HIMGFILE | hIFileDst,
 |  | int | ndstPage,
 |  | HIMGFILE | hIFileSrc,
 |  | int | nsrcPage )

Copying a page between TIFF files.

The kRecCopyImgFilePage function copies a page from a source TIFF image file and inserts it into a destination TIFF image file.

Parameters
[in] | sid | Settings Collection ID.
[in] | hIFileDst | Handle of the destination TIFF image file opened by kRecOpenImgFile for writing.
[in] | ndstPage | Page number of the page in the destination image file, before which the page should be copied, -1 means append. To insert the page as the first page in the image file, the value zero (0) should be specified.
[in] | hIFileSrc | Handle of the source TIFF image file opened by kRecOpenImgFile for reading.
[in] | nsrcPage | Page number of the page in the source image file to be copied from. For a single-page source image file a value of zero (0) should be specified.
Return values
RECERR
Note
In order to save time, this operation is performed without decompressing the page.
This function belongs to the Multi-page TIFF File Handling Function Group. To use these functions, the pages in the multi-page TIFF file must be stored in One-strip format and the StripBytesCount TIFF tag must exist in the page header. Note that TIFF image files created by OmniPage CSDK fulfill this requirement.
The specification of this function in C# is:
RECERR kRecCopyImgFilePage(int sid, IntPtr hIFileDst, int ndstPage, IntPtr hIFileSrc, int nsrcPage);
kRecCopyImgFilePage
RECERR RECAPIKRN kRecCopyImgFilePage(int sid, HIMGFILE hIFileDst, int ndstPage, HIMGFILE hIFileSrc, int nsrcPage)
Copying a page between TIFF files.
The specification of this function in Java is:
int kRecCopyImgFilePage(int sid, HIMGFILE hIFileDst, int ndstPage, HIMGFILE hIFileSrc, int nsrcPage)
The specification of this function in Python is:
def kRecCopyImgFilePage(sid: int, hIFileDst: "HIMGFILE", ndstPage: int, hIFileSrc: "HIMGFILE", nsrcPage: int) -> int

◆ kRecDecompressImgDataStream()

RECERR RECAPIKRN kRecDecompressImgDataStream | ( | int | sid,
 |  | HPAGE | hPage )

Decompressing a DataStream.

This function decompresses the DataStream of the given HPAGE loaded by kRecLoadImgDataStream or kRecLoadImgDataStreamF.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the DataStream.
Return values
RECERR
Note
This function is deprecated. All CSDK functions can decompress the image automatically if the decompressed image is needed.
This function works on an HPAGE contaning DataStream. See the details about possible operations and their working in the documentation of DataStream. If hPage does not contain DataStream, or DataStream already has been decompressed the function returns REC_OK without doing anything.
After calling this function hPage will contain both the compressed DataStream and the decompressed image.
The specification of this function in C# is:
RECERR kRecDecompressImgDataStream(int sid, IntPtr hPage);
kRecDecompressImgDataStream
RECERR RECAPIKRN kRecDecompressImgDataStream(int sid, HPAGE hPage)
Decompressing a DataStream.
The specification of this function in Java is:
int kRecDecompressImgDataStream(int sid, HPAGE hPage)
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
The specification of this function in Python is:
def kRecDecompressImgDataStream(sid: int, hPage: "HPAGE") -> int

◆ kRecDeleteImgFilePage()

RECERR RECAPIKRN kRecDeleteImgFilePage | ( | int | sid,
 |  | HIMGFILE | hIFile,
 |  | int | nPage )

Removing a page from a TIFF file.

The kRecDeleteImgFilePage deletes a page from a TIFF image file.

Parameters
[in] | sid | Settings Collection ID.
[in] | hIFile | Handle of the multi-page TIFF image file.
[in] | nPage | Page number of the page to be deleted. The value zero (0) means the first page of the file.
Return values
RECERR
Note
The kRecDeleteImgFilePage function does not delete the selected page physically from the multi-page TIFF image file. The kRecPackImgFile function can remove any previously deleted (or updated) page.
The kRecDeleteImgFilePage deletes the page logically also from a one-page TIFF file. In this case, most image viewers cannot open the resulting file. But the CSDK functions can handle such a file, so it can be opened, closed and packed; its page count can be queried and pages can be inserted into it. If kRecPackImgFile gets such a file it removes the page physically and the resulting pageless file can be handled in the same way.
This function belongs to the Multi-page TIFF File Handling Function Group. To use these functions, the pages in the multi-page TIFF file must be stored in One-strip format and the StripBytesCount TIFF tag must exist in the page header. Note that TIFF image files created by the OmniPage CSDK fulfills this requirement.
The specification of this function in C# is:
RECERR kRecDeleteImgFilePage(int sid, IntPtr hIFile, int nPage);
kRecDeleteImgFilePage
RECERR RECAPIKRN kRecDeleteImgFilePage(int sid, HIMGFILE hIFile, int nPage)
Removing a page from a TIFF file.
The specification of this function in Java is:
int kRecDeleteImgFilePage(int sid, HIMGFILE hIFile, int nPage)
The specification of this function in Python is:
def kRecDeleteImgFilePage(sid: int, hIFile: "HIMGFILE", nPage: int) -> int

◆ kRecFreeImgDataStream()

RECERR RECAPIKRN kRecFreeImgDataStream | ( | int | sid,
 |  | HPAGE | hPage )

Deleting DataStream from an HPAGE.

This function deletes the uncompressed DataStream from the HPAGE loaded by kRecLoadImgDataStream or kRecLoadImgDataStreamF.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the DataStream.
Return values
RECERR
Note
This function works on an HPAGE contaning DataStream. See the details about possible operations and their working in the documentation of DataStream. If hPage does not contain DataStream the function returns API_PARAMETER_ERR. kRecFreeImg function frees the whole HPAGE (including DataStream), so in typical workflow this function should not be called.
The specification of this function in C# is:
RECERR kRecFreeImgDataStream(int sid, IntPtr hPage);
kRecFreeImgDataStream
RECERR RECAPIKRN kRecFreeImgDataStream(int sid, HPAGE hPage)
Deleting DataStream from an HPAGE.
The specification of this function in Java is:
int kRecFreeImgDataStream(int sid, HPAGE hPage)
The specification of this function in Python is:
def kRecFreeImgDataStream(sid: int, hPage: "HPAGE") -> int

◆ kRecGetCompressionLevel()

RECERR RECAPIKRN kRecGetCompressionLevel | ( | int | sid,
 |  | int * | pCompressionLevel )

Getting the compression level.

This function retrieves the compression level used when an image is saved to specific formats.

Parameters
[in] | sid | Settings Collection ID.
[out] | pCompressionLevel | Pointer of a variable to store the current compression level.
Return values
RECERR
Note
This function gets the value of the setting Kernel.Imf.CompressionLevel.
The compression level can be set by kRecSetCompressionLevel.
The specification of this function in C# is:
RECERR kRecGetCompressionLevel(int sid, out int CompressionLevel);
kRecGetCompressionLevel
RECERR RECAPIKRN kRecGetCompressionLevel(int sid, int *pCompressionLevel)
Getting the compression level.
The specification of this function in Java is:
int kRecGetCompressionLevel(int sid, int[] pCompressionLevel)
The specification of this function in Python is:
def kRecGetCompressionLevel(sid: int) -> Tuple[int, int]

◆ kRecGetCompressionTradeoff()

RECERR RECAPIKRN kRecGetCompressionTradeoff | ( | int | sid,
 |  | COMPRESSION_TRADEOFF * | pCompressionTradeoff )

Getting the compression tradeoff.

This function gets the compression trade-off used when an image is saved to specific formats.

Parameters
[in] | sid | Settings Collection ID.
[out] | pCompressionTradeoff | Pointer of a variable to store the current compression tradeoff.
Return values
RECERR
Note
This function gets the value of the setting Kernel.Imf.CompressionTradeoff.
The compression level can be set by kRecSetCompressionTradeoff.
The specification of this function in C# is:
RECERR kRecGetCompressionTradeoff(int sid, out int CompressionTradeoff);
kRecGetCompressionTradeoff
RECERR RECAPIKRN kRecGetCompressionTradeoff(int sid, COMPRESSION_TRADEOFF *pCompressionTradeoff)
Getting the compression tradeoff.
The specification of this function in Java is:
int kRecGetCompressionTradeoff(int sid, COMPRESSION_TRADEOFF[] pCompressionTradeoff)
COMPRESSION_TRADEOFF
COMPRESSION_TRADEOFF
Compression tradeoff.
Definition KernelApi.h:11336
The specification of this function in Python is:
def kRecGetCompressionTradeoff(sid: int) -> Tuple[int, int]

◆ kRecGetImfLoadFlags()

RECERR RECAPIKRN kRecGetImfLoadFlags | ( | int | sid,
 |  | DWORD * | pfFlag )

Getting IMF PDF load flags.

The kRecGetImfLoadFlags function get the current IMF Load Flags.

Parameters
[in] | sid | Settings Collection ID.
[out] | pfFlag | The IMF Load Flag combination
Return values
RECERR
Note
This function gets the setting Kernel.Imf.PDF.LoadFlags. This setting can be chaged by kRecSetImfLoadFlags.
The specification of this function in C# is:
RECERR kRecGetImfLoadFlags(int sid, out uint fFlag);
kRecGetImfLoadFlags
RECERR RECAPIKRN kRecGetImfLoadFlags(int sid, DWORD *pfFlag)
Getting IMF PDF load flags.
The specification of this function in Java is:
int kRecGetImfLoadFlags(int sid, long[] pfFlag)
The specification of this function in Python is:
def kRecGetImfLoadFlags(sid: int) -> Tuple[int, int]

◆ kRecGetImgFilePageCount()

RECERR RECAPIKRN kRecGetImgFilePageCount | ( | HIMGFILE | hIFile,
 |  | int * | lpPageCount )

Getting the number of pages in an image file.

The kRecGetImgFilePageCount function inquires the number of pages in an image file. With this function there is no need to load the pages of an image file to find out their number.

Parameters
[in] | hIFile | Handle of the image file opened by kRecOpenImgFile to be examined.
[out] | lpPageCount | Pointer of a variable to get the number of pages.
Return values
RECERR
Note
The HIMGFILE passed to this function can be opened for writing as well.
The specification of this function in C# is:
RECERR kRecGetImgFilePageCount(IntPtr hIFile, out int pPageCount);
kRecGetImgFilePageCount
RECERR RECAPIKRN kRecGetImgFilePageCount(HIMGFILE hIFile, int *lpPageCount)
Getting the number of pages in an image file.
The specification of this function in Java is:
int kRecGetImgFilePageCount(HIMGFILE hIFile, int[] lpPageCount)
The specification of this function in Python is:
def kRecGetImgFilePageCount(hIFile: "HIMGFILE") -> Tuple[int, int]

◆ kRecGetImgFilePageIndex()

RECERR RECAPIKRN kRecGetImgFilePageIndex | ( | HIMGFILE | hIFile,
 |  | int * | pIndex )

Getting the index of the current page.

This function retrieves the current index of the page counter. The page counter holds the index of the page to be read from a multi-page image file by a subsequent image loader function call kRecLoadImg passing a IMGF_NEXTPAGE parameter.

Parameters
[in] | hIFile | Handle of the file.
[out] | pIndex | Pointer of a variable to store the index of the page. It is a zero-based index. If the latest page has been loaded, it is -1.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetImgFilePageIndex(IntPtr hIFile, out int pIndex);
kRecGetImgFilePageIndex
RECERR RECAPIKRN kRecGetImgFilePageIndex(HIMGFILE hIFile, int *pIndex)
Getting the index of the current page.
The specification of this function in Java is:
int kRecGetImgFilePageIndex(HIMGFILE hIFile, int[] pIndex)
The specification of this function in Python is:
def kRecGetImgFilePageIndex(hIFile: "HIMGFILE") -> Tuple[int, int]

◆ kRecGetImgFilePageInfo()

RECERR RECAPIKRN kRecGetImgFilePageInfo | ( | int | sid,
 |  | HIMGFILE | hIFile,
 |  | int | nPage,
 |  | LPIMG_INFO | pImg,
 |  | IMF_FORMAT * | pFormat )

Getting information about a page of an image file.

The kRecGetImgFilePageInfo function inquires the size, resolution and other attributes of the specified page of an image file.

Parameters
[in] | sid | Settings Collection ID.
[in] | hIFile | Handle of the image file.
[in] | nPage | Pagenumber of the required page.
[out] | pImg | Address of the structure to get the page information.
[out] | pFormat | Pointer of a variable to get the compression format of the page.
Return values
RECERR
Note
The use of this function does not influence current page counter etc. settings when reading from a multi-page image file using subsequent kRecLoadImg calls.
In case of PDF and XPS files this function needs to load the page for determining its color-depth. However, this loading can fail if the dimension of the page is out of the enabled range (Kernel.Img.Max.Pix.X and ...Y and Kernel.Img.Min.Pix.X and ...Y). In such a case this function returns with IMG_SIZE_ERR.
This function can return with IMF_NOTSUP_ERR. In such a case, User can use the table of the supported file types for determining the reason of this error.
The specification of this function in C# is:
RECERR kRecGetImgFilePageInfo(int sid, IntPtr hIFile, int nPage, out IMG_INFO pImg, out IMF_FORMAT pFormat);
kRecGetImgFilePageInfo
RECERR RECAPIKRN kRecGetImgFilePageInfo(int sid, HIMGFILE hIFile, int nPage, LPIMG_INFO pImg, IMF_FORMAT *pFormat)
Getting information about a page of an image file.
IMF_FORMAT
IMF_FORMAT
Image formats.
Definition KernelApi.h:11179
_IMG_INFO
Structure of an image containing basic physical information.
Definition KernelApi.h:214
The specification of this function in Java is:
int kRecGetImgFilePageInfo(int sid, HIMGFILE hIFile, int nPage, IMG_INFO pImg, IMF_FORMAT[] pFormat)
The specification of this function in Python is:
def kRecGetImgFilePageInfo(sid: int, hIFile: "HIMGFILE", nPage: int) -> Tuple[int, "IMG_INFO", int]

◆ kRecGetJPGQuality()

RECERR RECAPIKRN kRecGetJPGQuality | ( | int | sid,
 |  | int * | pnQuality )

Getting JPEG quality.

This function retrieves the JPEG quality setting used when images were saved into JPEG or JPEG2000 files.

Parameters
[in] | sid | Settings Collection ID.
[out] | pnQuality | JPEG quality.
Return values
RECERR
Note
This function gets the value of the setting Kernel.Imf.JPG.Quality. This setting can be changed by kRecSetJPGQuality.
The specification of this function in C# is:
RECERR kRecGetJPGQuality(int sid, out int nQuality);
kRecGetJPGQuality
RECERR RECAPIKRN kRecGetJPGQuality(int sid, int *pnQuality)
Getting JPEG quality.
The specification of this function in Java is:
int kRecGetJPGQuality(int sid, int[] pnQuality)
The specification of this function in Python is:
def kRecGetJPGQuality(sid: int) -> Tuple[int, int]

◆ kRecGetPDFEncLevel()

RECERR RECAPIKRN kRecGetPDFEncLevel | ( | HIMGFILE | hIFile,
 |  | ENCRYPT_LEVEL * | pEncLev )

This function retrieves the encryption level of the opened PDF. For more information see ENCRYPT_LEVEL and Handling Encrypted PDF Files.

Parameters
[in] | hIFile | Handle of the image file.
[out] | pEncLev | Pointer of a variable to store the encryption level.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetPDFEncLevel(IntPtr hIFile, out ENCRYPT_LEVEL pEncLev);
kRecGetPDFEncLevel
RECERR RECAPIKRN kRecGetPDFEncLevel(HIMGFILE hIFile, ENCRYPT_LEVEL *pEncLev)
ENCRYPT_LEVEL
ENCRYPT_LEVEL
PDF encryption level.
Definition KernelApi.h:11400
The specification of this function in Java is:
int kRecGetPDFEncLevel(HIMGFILE hIFile, ENCRYPT_LEVEL[] pEncLev)
The specification of this function in Python is:
def kRecGetPDFEncLevel(hIFile: "HIMGFILE") -> Tuple[int, int]

◆ kRecGetPdfTagInfo()

RECERR RECAPIKRN kRecGetPdfTagInfo | ( | int | sid,
 |  | INTBOOL * | pbUseTagInfo )

Getting the use of PDF tag information.

This function gets whether the Engine is set to use the tag information of the PDF file or not. For more information see kRecSetPdfTagInfo.

Parameters
[in] | sid | Settings Collection ID.
[out] | pbUseTagInfo | Pointer of a variable to store whether the Engine is set to use tag information. If it is TRUE the tag information is used.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetPdfTagInfo(int sid, out bool pbUseTagInfo);
kRecGetPdfTagInfo
RECERR RECAPIKRN kRecGetPdfTagInfo(int sid, INTBOOL *pbUseTagInfo)
Getting the use of PDF tag information.
The specification of this function in Java is:
int kRecGetPdfTagInfo(int sid, int[] pbUseTagInfo)
The specification of this function in Python is:
def kRecGetPdfTagInfo(sid: int) -> Tuple[int, bool]

◆ kRecInsertImgFilePage()

RECERR RECAPIKRN kRecInsertImgFilePage | ( | int | sid,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | HIMGFILE | hIFile,
 |  | int | nPage,
 |  | IMF_FORMAT | format )

Inserting a page into a TIFF file.

The kRecInsertImgFilePage function inserts a compressed image into a TIFF image file.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the image to be inserted.
[in] | iiImg | Index of the image to be inserted.
[in] | hIFile | Handle of the multi-page TIFF image file.
[in] | nPage | Page number of the page in the image file before which the new page should be inserted. To insert the page as the first page in the image file, the value zero (0) should be specified.
[in] | format | Image file format (compression) to be applied to the page. Of course, only the TIFF formats can be selected.
Return values
RECERR
Note
This function belongs to the Multi-page TIFF File Handling Function Group. To use these functions, the pages in the multi-page TIFF file must be stored in One-strip format and the StripBytesCount TIFF tag must exist in the page header. TIFF image files created by OmniPage CSDK fulfill this requirement.
The specification of this function in C# is:
RECERR kRecInsertImgFilePage(int sid, IntPtr hPage, IMAGEINDEX iiImg, IntPtr hIFile, int nPage, IMF_FORMAT format);
IMAGEINDEX
IMAGEINDEX
Index of each image type in HPAGE.
Definition KernelApi.h:991
kRecInsertImgFilePage
RECERR RECAPIKRN kRecInsertImgFilePage(int sid, HPAGE hPage, IMAGEINDEX iiImg, HIMGFILE hIFile, int nPage, IMF_FORMAT format)
Inserting a page into a TIFF file.
The specification of this function in Java is:
int kRecInsertImgFilePage(int sid, HPAGE hPage, IMAGEINDEX iiImg, HIMGFILE hIFile, int nPage, IMF_FORMAT format)
The specification of this function in Python is:
def kRecInsertImgFilePage(sid: int, hPage: "HPAGE", iiImg: int, hIFile: "HIMGFILE", nPage: int, format: int) -> int

◆ kRecIsMultipageImgFileFormat()

RECERR RECAPIKRN kRecIsMultipageImgFileFormat | ( | IMF_FORMAT | imgfileformat,
 |  | INTBOOL * | bEnabled )

Checking multi-page capability of an image format.

The kRecIsMultipageImgFileFormat function checks whether the specified image file format can handle multi-page image files.

Parameters
[in] | imgfileformat | Selected image file format to be checked.
[out] | bEnabled | Pointer of a Boolean variable to get the information. The returned value of TRUE means that the selected image file format supports multi-page images.
Return values
RECERR
Note
OmniPage Capture SDK supports the following multi-page image file formats for reading: DCX, MAX, PDF, TIFF and TIFF-FX. Multi-page image file formats supported for writing are DCX, MAX, TIFF and image-only PDF.
The specification of this function in C# is:
RECERR kRecIsMultipageImgFileFormat(IMF_FORMAT imgfileformat, out bool bEnabled);
kRecIsMultipageImgFileFormat
RECERR RECAPIKRN kRecIsMultipageImgFileFormat(IMF_FORMAT imgfileformat, INTBOOL *bEnabled)
Checking multi-page capability of an image format.
The specification of this function in Java is:
int kRecIsMultipageImgFileFormat(IMF_FORMAT imgfileformat, int[] bEnabled)
The specification of this function in Python is:
def kRecIsMultipageImgFileFormat(imgfileformat: int) -> Tuple[int, bool]

◆ kRecLoadImg()

RECERR RECAPIKRN kRecLoadImg | ( | int | sid,
 |  | HIMGFILE | hIFile,
 |  | HPAGE * | phPage,
 |  | int | iPage )

Loading a page from an opened image file.

The kRecLoadImg function loads a page from an image file opened by kRecOpenImgFile into the image management module.

If the image source provides a gray-scale image, this function can convert it to B/W. If the image source provides a 24-bit color image, this function can convert it to gray-scale or B/W. The way this function handles the different image types (such as B/W, gray-scale or 24-bit color images) is called primary image conversion mode. The conversion mode to be applied can be set by the kRecSetImgConvMode API function. This function should also be used for subsequent access to pages of multi-page image files. The kRecLoadImg function activates the PID_IMGINPUT process. The PID_SCANNER_WARMUP process might also be activated by using image file handle IMGF_SCANNER.

Parameters
[in] | sid | Settings Collection ID.
[in] | hIFile | Handle of the image file.
[out] | phPage | Address of a variable to store the handle of the created page.
[in] | iPage | The page number of the page to be loaded. IMGF_NEXTPAGE means the next page.
Return values
RECERR
Note
Not all the image formats are supported on all platforms. For details see the description of IMF_FORMAT.
See details about size limits of input images.
During loading, the 4-bit gray-scale images are converted into an 8-bit gray-scale format, and 4-bit palette color images are converted into the 8-bit palette color format.
If the bits per pixel value of the image file is not one of the supported values, the function returns IMG_BITSPERPIXEL_ERR. See the table of supported file formats.
When the page is no longer needed, the application should call the kRecFreeImg function which removes the page from the image management module.
This function is fairly fault-tolerant: an image is loaded even if some errors occur. If the phPage output parameter contains a NULL value, the image has not been loaded into the Engine. If the function returns an error but phPage is not NULL then you may have a corrupted image loaded. It gives an IMG_DPI_WARN warning when the resolution is less than 75 DPI or greater than 2400 DPI, but of course the image is loaded and in this case it is not corrupted. It is strongly recommended to handle the return code of this function properly.
If the input is JPEG file, the function can analyse exif info in order to determine the orientation and resolution of the image, see: Kernel.Imf.JPG.Resolution, JPG_RESOLUTION, Kernel.Imf.JPG.Orientation, JPG_ORIENTATION.
After having successfully loaded an image, its attributes can be inquired by calling the kRecGetImgInfo function. For JPG, TIF and PDF files additional information can be inquired by calling the kRecGetImgMetaData function.
If the input is JPEG, JPEG2000 or TIFF using 'new style' JPEG, this function can load the compressed data stream without decompressing, See the details about possible operations and their working in the documentation of DataStream.
If the input is JPG file, the function analyses exif info in order to determine whether the image is captured by digital camera (phone) or not, and sets IMG_FLAGS_CAMERAIMAGE flag accordingly see: IMG_FLAGS.
You can read pages of a multi-page image file one after the other by calling this function repeatedly with a IMGF_NEXTPAGE pagenumber, since each subsequent call automatically increments the page counter by 1. While the kRecGetImgFilePageCount function inquires the number of pages in an image file, the kRecGetImgFilePageIndex provides the current index of the page counter. When loading from an exact page number, the page counter is set to the given one, thus specifying IMGF_NEXTPAGE directly after loading, the 5th page (passing 5 in iPage) loads the 6th page.
Processing the pages of a multi-page image file:
RECERR rc;
int nPages;
HPAGE hPage;
char *imgfile = "imgfile.tif";
HIMGFILE hIFile = NULL;
rc = kRecOpenImgFile( imgfile, &hIFile, IMGF_READ, (IMF_FORMAT)0);
rc = kRecGetImgFilePageCount(hIFile, &nPages);
for (int i = 0; i < nPages; i++) {
rc = kRecLoadImg(sid, hIFile, &hPage, IMGF_NEXTPAGE);
if (rc != REC_OK) {
kRecCloseImgFile(hIFile);
// . . . Some error handling . . .
return;
}
// . . .
// do something
// (e.g: save part of the image or call kRecRecognize)
// . . .
rc = kRecFreeImg(hPage);
}
kRecCloseImgFile(hIFile);
REC_OK
@ REC_OK
Successful operation, no error.
Definition RECERR_doc.h:20
kRecFreeImg
RECERR RECAPIKRN kRecFreeImg(HPAGE hPage)
Removing a page.
IMGF_NEXTPAGE
#define IMGF_NEXTPAGE
The next page of a HIMGFILE.
Definition KernelApi.h:11503
kRecLoadImg
RECERR RECAPIKRN kRecLoadImg(int sid, HIMGFILE hIFile, HPAGE *phPage, int iPage)
Loading a page from an opened image file.
kRecOpenImgFile
RECERR RECAPIKRN kRecOpenImgFile(LPCTSTR pFilename, HIMGFILE *pHIMGFILE, int mode, IMF_FORMAT filetype)
Opening an image file.
IMGF_READ
#define IMGF_READ
Opening file for reading only. The file can be shared. (Use it with kRecOpenImgFile....
Definition KernelApi.h:11253
The specification of this function in C# is:
RECERR kRecLoadImg(int sid, IntPtr hIFile, out IntPtr phPage, int page);
The specification of this function in Java is:
int kRecLoadImg(int sid, HIMGFILE hIFile, HPAGE phPage, int iPage)
The specification of this function in Python is:
def kRecLoadImg(sid: int, hIFile: "HIMGFILE", iPage: int) -> Tuple[int, "HPAGE"]

◆ kRecLoadImgDataStream()

RECERR RECAPIKRN kRecLoadImgDataStream | ( | int | sid,
 |  | HIMGFILE | hIFile,
 |  | HPAGE * | phPage,
 |  | int | iPage )

Loading a page from an opened image file without decompressing the image.

The kRecLoadImgDataStream function loads a page from an image file opened by kRecOpenImgFile without decompressing the image.

Parameters
[in] | sid | Settings Collection ID.
[in] | hIFile | Handle of the image file.
[out] | phPage | Address of a variable to store the handle of the created page.
[in] | iPage | The page number of the page to be loaded. IMGF_NEXTPAGE means the next page.
Return values
RECERR
Note
This function supports only JPEG, JPEG2000 and TIFF using 'new style' JPEG input formats.
The returned HPAGE does not contain decompressed bitmap. See the details about possible operations and their working in the documentation of DataStream.
See details about size limits of input images.
You can read pages of a multi-page image file one after the other by calling this function repeatedly with a IMGF_NEXTPAGE pagenumber, since each subsequent call automatically increments the page counter by 1. While the kRecGetImgFilePageCount function inquires the number of pages in an image file, the kRecGetImgFilePageIndex provides the current index of the page counter. When loading from an exact page number, the page counter is set to the given one, thus specifying IMGF_NEXTPAGE directly after loading, the 5th page (passing 5 in iPage) loads the 6th page.
When the page is no longer needed, the application should call the kRecFreeImg function which removes the page from the image management module.
The specification of this function in C# is:
RECERR kRecLoadImgDataStream(int sid, IntPtr hIFile, out IntPtr phPage, int page);
kRecLoadImgDataStream
RECERR RECAPIKRN kRecLoadImgDataStream(int sid, HIMGFILE hIFile, HPAGE *phPage, int iPage)
Loading a page from an opened image file without decompressing the image.
The specification of this function in Java is:
int kRecLoadImgDataStream(int sid, HIMGFILE hIFile, HPAGE phPage, int iPage)
The specification of this function in Python is:
def kRecLoadImgDataStream(sid: int, hIFile: "HIMGFILE", iPage: int) -> Tuple[int, "HPAGE"]

◆ kRecLoadImgDataStreamF()

RECERR RECAPIKRN kRecLoadImgDataStreamF | ( | int | sid,
 |  | LPCTSTR | pFilename,
 |  | HPAGE * | phPage,
 |  | int | nPage )

Loading a page directly from an image file without decompressing the image.

This function loads a page from the specified image file without decompressing the image.

Parameters
[in] | sid | Settings Collection ID.
[in] | pFilename | Path of the image file.
[out] | phPage | Pointer of a variable to store the handle of the page.
[in] | nPage | The page number of the page to be loaded.
Return values
RECERR
Note
This function opens the file, loads the given page and closes the file as well.
This function supports only JPEG, JPEG2000 and TIFF using 'new style' JPEG input formats.
The returned HPAGE does not contain decompressed bitmap. See the details about possible operations and their working in the documentation of DataStream.
See details about size limits of input images.
When the page is no longer needed, the application should call the kRecFreeImg function which removes the page from the image management module.
The specification of this function in C# is:
RECERR kRecLoadImgDataStreamF(int sid, string filename, out IntPtr phPage, int page);
kRecLoadImgDataStreamF
RECERR RECAPIKRN kRecLoadImgDataStreamF(int sid, LPCTSTR pFilename, HPAGE *phPage, int nPage)
Loading a page directly from an image file without decompressing the image.
The specification of this function in Java is:
int kRecLoadImgDataStreamF(int sid, String pFilename, HPAGE phPage, int nPage)
The specification of this function in Python is:
def kRecLoadImgDataStreamF(sid: int, pFilename: str, nPage: int) -> Tuple[int, "HPAGE"]

◆ kRecLoadImgDataStreamMC()

RECERR RECAPIKRN kRecLoadImgDataStreamMC | ( | int | sid,
 |  | BYTE * | lpBuf,
 |  | size_t | bufLen,
 |  | LPCOMPRESSED_IMG_INFO | lpCImg,
 |  | HPAGE * | phPage )

Loading a page directly from a compressed memory buffer without decompressing the image.

This function loads a page from the specified compressed memory buffer. The image is not decompressed during the operation, thus the resulted HPAGE contains a DataStream only.

Parameters
[in] | sid | Settings Collection ID.
[in] | lpBuf | Buffer of the compressed bitmap to be loaded.
[in] | bufLen | Length of the buffer containing the compressed bitmap.
[out] | lpCImg | Compressed image information of the image to be loaded.
[out] | phPage | Pointer of a variable to store the handle of the page.
Return values
RECERR
Note
The returned HPAGE does not contain decompressed bitmap. See the details about possible operations and their working in the documentation of DataStream.
The format of the compressed memory buffer can be JPEG or JPEG2000.
See details about size limits of input images.
The specification of this function in C# is:
RECERR kRecLoadImgDataStreamMC(int sid, [In] byte[] lpBuf, [In] int bufLen, out COMPRESSED_IMG_INFO lpCImg, out IntPtr phPage);
kRecLoadImgDataStreamMC
RECERR RECAPIKRN kRecLoadImgDataStreamMC(int sid, BYTE *lpBuf, size_t bufLen, LPCOMPRESSED_IMG_INFO lpCImg, HPAGE *phPage)
Loading a page directly from a compressed memory buffer without decompressing the image.
_COMPRESSED_IMG_INFO
Basic physical information of a compressed image buffer.
Definition KernelApi.h:270
The specification of this function in Java is:
int kRecLoadImgDataStreamMC(int sid, java.nio.ByteBuffer lpBuf, long bufLen, COMPRESSED_IMG_INFO lpCImg, HPAGE phPage)

◆ kRecLoadImgF()

RECERR RECAPIKRN kRecLoadImgF | ( | int | sid,
 |  | LPCTSTR | pFilename,
 |  | HPAGE * | phPage,
 |  | int | nPage )

Loading a page directly from an image file.

This function loads a page from the specified image file.

If the image source provides a gray-scale image, this function can convert it to B/W. If the image source provides a 24-bit color image, this function can convert it to gray-scale or B/W. The way this function handles the different image types (such as B/W, gray-scale or 24-bit color images) is called primary image conversion mode. The conversion mode to be applied can be set by the kRecSetImgConvMode API function. This function should also be used for subsequent access to pages of multi-page image files. The kRecLoadImgF function activates the PID_IMGINPUT process.

Parameters
[in] | sid | Settings Collection ID.
[in] | pFilename | Path of the image file.
[out] | phPage | Pointer of a variable to store the handle of the page.
[in] | nPage | The page number of the page to be loaded.
Return values
RECERR
Note
Not all the image formats are supported on all platforms. For details see the description of IMF_FORMAT.
See details about size limits of input images.
When loading, the 4-bit gray-scale images are converted into an 8-bit gray-scale format, and 4-bit palette color images are converted into the 8-bit palette color format.
If the bits per pixel value of the image file is not one of the supported values, the function returns IMG_BITSPERPIXEL_ERR. See the table of supported file formats.
When the page is no longer needed, the application should call the kRecFreeImg function which removes the page from the image management module.
This function is fairly fault-tolerant: an image is loaded even if some errors occur. If the phPage output parameter contains a NULL value, the image has not been loaded into the Engine. If the function returns an error but phPage is not NULL you may have a corrupted image loaded. It gives an IMG_DPI_WARN warning when the resolution is less than 75 DPI or greater than 2400 DPI, but of course the image is loaded and in this case it is not corrupted. It is strongly recommended to handle the return code of this function properly.
After an image has been successfully loaded, its attributes can be inquired by calling the kRecGetImgInfo function.
If the input is JPEG, JPEG2000 or TIFF using 'new style' JPEG, this function can load the compressed data stream without decompressing, See the details about possible operations and their working in the documentation of DataStream.
This function opens the file, loads the given page and closes the file as well. So it is typically used for loading only one page from the file. For subsequent processing of multiple pages from a file, the function kRecLoadImg can be used more efficiently.
The specification of this function in C# is:
RECERR kRecLoadImgF(int sid, string filename, out IntPtr phPage, int page);
kRecLoadImgF
RECERR RECAPIKRN kRecLoadImgF(int sid, LPCTSTR pFilename, HPAGE *phPage, int nPage)
Loading a page directly from an image file.
The specification of this function in Java is:
int kRecLoadImgF(int sid, String pFilename, HPAGE phPage, int nPage)
The specification of this function in Python is:
def kRecLoadImgF(sid: int, pFilename: str, nPage: int) -> Tuple[int, "HPAGE"]

◆ kRecLoadImgM()

RECERR RECAPIKRN kRecLoadImgM | ( | int | sid,
 |  | BYTE * | lpBitmap,
 |  | LPCIMG_INFO | lpImg,
 |  | HPAGE * | phPage )

Loading a page directly from a memory buffer.

This function loads a page from the specified memory buffer.

If the image source provides a gray-scale image, this function can convert it to B/W. If the image source provides a 24-bit color image, this function can convert it to gray-scale or B/W. The way this function handles the different image types (such as B/W, gray-scale or 24-bit color images) is called primary image conversion mode. The conversion mode to be applied can be set by the kRecSetImgConvMode API function. The kRecLoadImgM function activates the PID_IMGINPUT process.

Parameters
[in] | sid | Settings Collection ID.
[in] | lpBitmap | Buffer of the bitmap to be loaded.
[in] | lpImg | Image information of the image to be loaded.
[out] | phPage | Pointer of a variable to store the handle of the page.
Return values
RECERR
Note
See details about size limits of input images.
When loading B/W images, the CSDK considers the one (1) bits as black pixels, and the zero (0) bits as white pixels.
When loading, the 4-bit gray-scale images are converted into an 8-bit gray-scale format, and 4-bit palette color images are converted into 8-bit palette color format.
When loading a 24-bit color image the order of the components can be BGR or RGB and can be specified by calling kRecSetImgFormat.
When loading a 32-bit color image the order of the components can be BGRA or ARGB and can be specified by calling kRecSetImgFormat. In this case the alpha component is ignored and the image is converted to a 24-bit one.
When the page is no longer needed, the application should call the kRecFreeImg function which removes the page from the image management module.
This function is fairly fault-tolerant: an image is loaded even if some errors occur. If the phPage output parameter contains a NULL value, the image has not been loaded into the Engine. If the function returns an error but phPage is not NULL you may have a corrupted image loaded. It gives an IMG_DPI_WARN warning when the resolution is less than 75 DPI or greater than 2400 DPI, but of course the image is loaded and in this case it is not corrupted. It is strongly recommended to handle the return code of this function properly.
The specification of this function in C# is:
RECERR kRecLoadImgM(int sid, [In] byte[] lpBitmap, [In] IMG_INFO lpImg, out IntPtr phPage);
kRecLoadImgM
RECERR RECAPIKRN kRecLoadImgM(int sid, BYTE *lpBitmap, LPCIMG_INFO lpImg, HPAGE *phPage)
Loading a page directly from a memory buffer.
The specification of this function in Java is:
int kRecLoadImgM(int sid, java.nio.ByteBuffer lpBitmap, IMG_INFO lpImg, HPAGE phPage)

◆ kRecLoadImgMC()

RECERR RECAPIKRN kRecLoadImgMC | ( | int | sid,
 |  | BYTE * | lpBuf,
 |  | size_t | bufLen,
 |  | LPCCOMPRESSED_IMG_INFO | lpCImg,
 |  | HPAGE * | phPage )

Loading a page directly from a compressed memory buffer.

This function loads a page from the specified compressed memory buffer. It decompresses the compressed memory buffer and directly calls kRecLoadImgM to load the page. See kRecLoadImgM for more details!

Parameters
[in] | sid | Settings Collection ID.
[in] | lpBuf | Buffer of the compressed bitmap to be loaded.
[in] | bufLen | Length of the buffer containing the compressed bitmap.
[in] | lpCImg | Compressed image information of the image to be loaded.
[out] | phPage | Pointer of a variable to store the handle of the page.
Return values
RECERR
Note
See details about size limits of input images.
The specification of this function in C# is:
RECERR kRecLoadImgMC(int sid, [In] byte[] lpBuf, [In] int bufLen, [In] COMPRESSED_IMG_INFO lpCImg, out IntPtr phPage);
kRecLoadImgMC
RECERR RECAPIKRN kRecLoadImgMC(int sid, BYTE *lpBuf, size_t bufLen, LPCCOMPRESSED_IMG_INFO lpCImg, HPAGE *phPage)
Loading a page directly from a compressed memory buffer.
The specification of this function in Java is:
int kRecLoadImgMC(int sid, java.nio.ByteBuffer lpBuf, long bufLen, COMPRESSED_IMG_INFO lpCImg, HPAGE phPage)

◆ kRecMatchImgFileFormat()

RECERR RECAPIKRN kRecMatchImgFileFormat | ( | int | sid,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | IMF_FORMAT | imgfileformat,
 |  | INTBOOL * | match )

Checking whether an image is suitable for a file format.

The kRecMatchImgFileFormat function checks whether the specified image can be saved in the specified image file format.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the image to be checked.
[in] | iiImg | Index of the image to be checked.
[in] | imgfileformat | Selected image file format.
[out] | match | Address of a Boolean variable to get the information. The returned value of TRUE means that the selected image file format can be used on the image.
Return values
RECERR
Note
There are various considerations to be taken into account for the different image types. They can be found in the reference for IMF_FORMAT.
The specification of this function in C# is:
RECERR kRecMatchImgFileFormat(int sid, IntPtr hPage, IMAGEINDEX iiImg, IMF_FORMAT imgfileformat, out bool match);
kRecMatchImgFileFormat
RECERR RECAPIKRN kRecMatchImgFileFormat(int sid, HPAGE hPage, IMAGEINDEX iiImg, IMF_FORMAT imgfileformat, INTBOOL *match)
Checking whether an image is suitable for a file format.
The specification of this function in Java is:
int kRecMatchImgFileFormat(int sid, HPAGE hPage, IMAGEINDEX iiImg, IMF_FORMAT imgfileformat, int[] match)
The specification of this function in Python is:
def kRecMatchImgFileFormat(sid: int, hPage: "HPAGE", iiImg: int, imgfileformat: int) -> Tuple[int, bool]

◆ kRecOpenImgFile()

RECERR RECAPIKRN kRecOpenImgFile | ( | LPCTSTR | pFilename,
 |  | HIMGFILE * | pHIMGFILE,
 |  | int | mode,
 |  | IMF_FORMAT | filetype )

Opening an image file.

This function opens an image file into the image file management module. Loading an image requires an additional loading step (kRecLoadImg).

Parameters
[in] | pFilename | File name of the image file.
[out] | pHIMGFILE | Handle of the image file.
[in] | mode | Opening mode. See IMGF_READ and IMGF_RDWR.
[in] | filetype | Type of the created file. This parameter has meaning only when the opening mode is IMGF_RDWR. In this case, it means not the compression mode but the pure file type, for example, it determines that the file type is TIFF, but does not differentiate between FF_TIFG4 and FF_TIFLZW. The precise file format, including compression method, will be determined at saving time (e.g. kRecSaveImg, etc.)
Return values
RECERR
Note
Not all the image formats are supported on all platforms. For details see the description of IMF_FORMAT.
The specification of this function in C# is:
RECERR kRecOpenImgFile(string pFilename, out IntPtr pHIMGFILE, FILEOPENMODE mode, IMF_FORMAT filetype);
The specification of this function in Java is:
int kRecOpenImgFile(String pFilename, HIMGFILE pHIMGFILE, int mode, IMF_FORMAT filetype)
The specification of this function in Python is:
def kRecOpenImgFile(pFilename: str, mode: int, filetype: int) -> Tuple[int, "HIMGFILE"]

◆ kRecPackImgFile()

RECERR RECAPIKRN kRecPackImgFile | ( | int | sid,
 |  | LPCTSTR | pFileName )

Packing a TIFF file.

The kRecPackImgFile function packs the selected multi-page TIFF image file. It removes any previously deleted or replaced pages from the TIFF file.

Parameters
[in] | sid | Settings Collection ID.
[in] | pFileName | Name of the TIFF image file to be packed.
Return values
RECERR
Note
The integrating application can delete, replace or update pages in a multi-page TIFF image file using the kRecDeleteImgFilePage, kRecReplaceImgFilePage and kRecUpdateImgFilePage functions, respectively. These functions work on an opened image file (HIMGFILE, kRecOpenImgFile), but packing MUST NOT be used on opened files. (For closing a file use kRecCloseImgFile.) The reason for using packing is that the packed image file is usually smaller and often provides better performance.
Calling this function may take several seconds for image files containing a lot of pages.
The kRecDeleteImgFilePage deletes the page logically also from a one-page TIFF file. In this last case, most image viewers cannot open the resulting file. But the CSDK functions can handle such a file, so it can be opened, closed and packed, its page count can be queried, pages can be inserted into it. If kRecPackImgFile gets such a file it removes the page physically and the resulting pageless file can be handled in the same way.
This function belongs to the Multi-page TIFF File Handling Function Group. To use these functions, the pages in the multi-page TIFF file must be stored in One-strip format and the StripBytesCount TIFF tag must exist in the page header. Note that TIFF image files created by OmniPage CSDK fulfills this requirement.
The specification of this function in C# is:
RECERR kRecPackImgFile(int sid, string pFileName);
kRecPackImgFile
RECERR RECAPIKRN kRecPackImgFile(int sid, LPCTSTR pFileName)
Packing a TIFF file.
The specification of this function in Java is:
int kRecPackImgFile(int sid, String pFileName)
The specification of this function in Python is:
def kRecPackImgFile(sid: int, pFileName: str) -> int

◆ kRecReplaceImgFilePage()

RECERR RECAPIKRN kRecReplaceImgFilePage | ( | int | sid,
 |  | HIMGFILE | hIFileDst,
 |  | int | ndstPage,
 |  | HIMGFILE | hIFileSrc,
 |  | int | nsrcPage )

Replacing a page in a TIFF file.

The kRecReplaceImgFilePage function replaces a page in a destination multi-page TIFF image file by another page stored in a source TIFF image file.

Parameters
[in] | sid | Settings Collection ID.
[in] | hIFileDst | Handle of the destination image file to be changed.
[in] | ndstPage | Page number of the page in the destination image file to be deleted and replaced. To replace the first page, the value zero (0) should be specified.
[in] | hIFileSrc | Handle of the source image file.
[in] | nsrcPage | Page number of the page in the source image file to be copied from. For a single-page source image file a value of zero (0) should be specified.
Return values
RECERR
Note
In order to save time, this operation is performed without decompressing the page. The compression method of the source page is not changed.
This function belongs to the Multi-page TIFF File Handling Function Group. To use these functions, the pages in the multi-page TIFF file must be stored in One-strip format and the StripBytesCount TIFF tag must exist in the page header. TIFF image files created by OmniPage CSDK fulfill this requirement.
Deleted or replaced pages can be physically removed from the image file by kRecPackImgFile.
The specification of this function in C# is:
RECERR kRecReplaceImgFilePage(int sid, IntPtr hIFileDst, int dstPage, IntPtr hIFileSrc, int nsrcPage);
kRecReplaceImgFilePage
RECERR RECAPIKRN kRecReplaceImgFilePage(int sid, HIMGFILE hIFileDst, int ndstPage, HIMGFILE hIFileSrc, int nsrcPage)
Replacing a page in a TIFF file.
The specification of this function in Java is:
int kRecReplaceImgFilePage(int sid, HIMGFILE hIFileDst, int ndstPage, HIMGFILE hIFileSrc, int nsrcPage)
The specification of this function in Python is:
def kRecReplaceImgFilePage(sid: int, hIFileDst: "HIMGFILE", ndstPage: int, hIFileSrc: "HIMGFILE", nsrcPage: int) -> int

◆ kRecSaveImg()

RECERR RECAPIKRN kRecSaveImg | ( | int | sid,
 |  | HIMGFILE | hIFile,
 |  | IMF_FORMAT | Imgfileformat,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | INTBOOL | bAppend )

Saving a page.

The kRecSaveImg function stores the Engine's page to disk into an image file. The kRecSaveImg function activates the PID_IMGSAVE process.

Parameters
[in] | sid | Settings Collection ID.
[in] | hIFile | Handle of the image file opened for writing by kRecOpenImgFile.
[in] | Imgfileformat | Image file format of the output file.
[in] | hPage | Handle of the page containing the image to be saved.
[in] | iiImg | Index of the image to be saved.
[in] | bAppend | Flag for image append mode. Its TRUE value indicates that the image will be appended to the image file specified by hIFile, if it exists. Appending is successful only if the image file format supports multi-page image files.
Return values
RECERR
Note
Not all the image formats are supported on all platforms. For details see the description of IMF_FORMAT.
If the given image file does not exist, it will be automatically created.
When the append flag is TRUE and the type of the given file format does not match the type of the existing multi-page image file, the function returns with an error. (I.e. it does not give an error when it appends e.g. an FF_TIFLZW to an FF_TIFG4.) To learn whether the Imgfileformat supports multi-page images kRecIsMultipageImgFileFormat can be called.
Not all of the image file types support all the possible BitsPerPixel (bit depth) values. The kRecMatchImgFileFormat function can be used to check whether the image can be saved in the specified format.
When a 8-bit palette color image is saved into JPEG format, it is converted to 24-bit color.
If hPage contains DataStream this function may save the page without recompression. See the details in the section about DataStream.
The specification of this function in C# is:
RECERR kRecSaveImg(int sid, IntPtr hIFile, IMF_FORMAT Imgfileformat, IntPtr hPage, IMAGEINDEX iiImg, bool bAppend);
kRecSaveImg
RECERR RECAPIKRN kRecSaveImg(int sid, HIMGFILE hIFile, IMF_FORMAT Imgfileformat, HPAGE hPage, IMAGEINDEX iiImg, INTBOOL bAppend)
Saving a page.
The specification of this function in Java is:
int kRecSaveImg(int sid, HIMGFILE hIFile, IMF_FORMAT Imgfileformat, HPAGE hPage, IMAGEINDEX iiImg, int bAppend)
The specification of this function in Python is:
def kRecSaveImg(sid: int, hIFile: "HIMGFILE", Imgfileformat: int, hPage: "HPAGE", iiImg: int, bAppend: bool) -> int

◆ kRecSaveImgArea()

RECERR RECAPIKRN kRecSaveImgArea | ( | int | sid,
 |  | HIMGFILE | hIFile,
 |  | IMF_FORMAT | format,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPCRECT | pRect,
 |  | INTBOOL | append )

Saving an area of a page.

The kRecSaveImgArea function saves a rectangular area of the specified image of a page to an image file opened by kRecOpenImgFile. This function is derived from the kRecSaveImg function. The kRecSaveImgArea function activates the PID_IMGSAVE process.

Parameters
[in] | sid | Settings Collection ID.
[in] | hIFile | Handle of the image file opened for writing.
[in] | format | Image file format for the output file.
[in] | hPage | Handle of the page containing the image whose area will be saved.
[in] | iiImg | Index of the image whose area will be saved.
[in] | pRect | Pointer to the requested area of the image to be saved. If this parameter contains a NULL value, then the entire image will be saved.
[in] | append | Flag for image append mode. Its TRUE value indicates that the current image will be appended to the given image file, if it exists. Appending is successful only if the specified image file format supports multi-page image files.
Return values
RECERR
Note
Not all the image formats are supported on all platforms. For details see the description of IMF_FORMAT.
If the given image file does not exist, it will be automatically created.
When the append flag is TRUE and the type of the given file format does not match the type of the existing multi-page image file, the function returns with an error. (I.e. it does not give an error when it appends e.g. an FF_TIFLZW to an FF_TIFG4.) To learn whether the format supports multi-page images kRecIsMultipageImgFileFormat can be called.
Not all of the image file types support all the possible BitsPerPixel values. The kRecMatchImgFileFormat function can be used to check whether the image can be saved in the specified format.
When a 8-bit palette color image is saved into JPEG format, it is converted to 24-bit color.
If hPage contains DataStream this function may save the page without recompression. See the details in the section about DataStream.
The specification of this function in C# is:
RECERR kRecSaveImgArea(int sid, IntPtr hIFile, IMF_FORMAT Imgfileformat, IntPtr hPage, IMAGEINDEX img, RECT pRect, bool bAppend);
// or
RECERR kRecSaveImgArea(int sid, IntPtr hIFile, IMF_FORMAT Imgfileformat, IntPtr hPage, IMAGEINDEX img, bool bAppend); // pRect is NULL in C/C++
kRecSaveImgArea
RECERR RECAPIKRN kRecSaveImgArea(int sid, HIMGFILE hIFile, IMF_FORMAT format, HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pRect, INTBOOL append)
Saving an area of a page.
.
The specification of this function in Java is:
int kRecSaveImgArea(int sid, HIMGFILE hIFile, IMF_FORMAT format, HPAGE hPage, IMAGEINDEX iiImg, RECT pRect, int append)
The specification of this function in Python is:
def kRecSaveImgArea(sid: int, hIFile: "HIMGFILE", format: int, hPage: "HPAGE", iiImg: int, pRect: "RECT", append: bool) -> int

◆ kRecSaveImgAreaF()

RECERR RECAPIKRN kRecSaveImgAreaF | ( | int | sid,
 |  | LPCTSTR | pFilename,
 |  | IMF_FORMAT | format,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPCRECT | pRect,
 |  | INTBOOL | append )

Saving an area of a page directly into a file.

The kRecSaveImgAreaF function saves a rectangular area of the specified image of a page to an image file directly. This function is a derivative of the kRecSaveImgF function. The kRecSaveImgAreaF function activates the PID_IMGSAVE process.

Parameters
[in] | sid | Settings Collection ID.
[in] | pFilename | Name of the image file to be saved.
[in] | format | Image file format for the output file.
[in] | hPage | Handle of the page containing the image whose area will be saved.
[in] | iiImg | Index of the image whose area will be saved.
[in] | pRect | Pointer to the requested area of the image to be saved. If this parameter contains a NULL value, then the entire image will be saved.
[in] | append | Flag for image append mode. Its TRUE value indicates that the current image will be appended to the given image file, if it exists. Appending is successful only if the specified image file format supports multi-page image files.
Return values
RECERR
Note
Not all the image formats are supported on all platforms. For details see the description of IMF_FORMAT.
If the given image file does not exist, it will be automatically created.
When the append flag is TRUE and the type of the given file format does not match the type of the existing multi-page image file, the function will return with an error. (I.e. it does not give an error when it appends e.g. an FF_TIFLZW to an FF_TIFG4.) To learn whether the format supports multi-page images kRecIsMultipageImgFileFormat can be called.
Not all of the image file types support all the possible BitsPerPixel values. The kRecMatchImgFileFormat function can be used to check whether the image can be saved in the specified format.
When a 8-bit palette color image is saved into JPEG format, it is converted to 24-bit color.
If hPage contains DataStream this function may save the page without recompression. See the details in the section about DataStream.
The specification of this function in C# is:
RECERR kRecSaveImgAreaF(int sid, string pFilename, IMF_FORMAT Imgfileformat, IntPtr hPage, IMAGEINDEX img, RECT pRect, bool bAppend);
// or
RECERR kRecSaveImgAreaF(int sid, string pFilename, IMF_FORMAT Imgfileformat, IntPtr hPage, IMAGEINDEX img, bool bAppend); // pRect is NULL in C/C++
kRecSaveImgAreaF
RECERR RECAPIKRN kRecSaveImgAreaF(int sid, LPCTSTR pFilename, IMF_FORMAT format, HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pRect, INTBOOL append)
Saving an area of a page directly into a file.
.
The specification of this function in Java is:
int kRecSaveImgAreaF(int sid, String pFilename, IMF_FORMAT format, HPAGE hPage, IMAGEINDEX iiImg, RECT pRect, int append)
The specification of this function in Python is:
def kRecSaveImgAreaF(sid: int, pFilename: str, format: int, hPage: "HPAGE", iiImg: int, pRect: "RECT", append: bool) -> int

◆ kRecSaveImgF()

RECERR RECAPIKRN kRecSaveImgF | ( | int | sid,
 |  | LPCTSTR | pFilename,
 |  | IMF_FORMAT | Imgfileformat,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | img,
 |  | INTBOOL | bAppend )

Saving a page directly into a file.

The kRecSaveImgF function stores the Engine's page to disk into an image file directly. The kRecSaveImgF function activates the PID_IMGSAVE process.

Parameters
[in] | sid | Settings Collection ID.
[in] | pFilename | Name of the image file to be saved.
[in] | Imgfileformat | Image file format of the output file.
[in] | hPage | Handle of the page containing the image to be saved.
[in] | img | Index of the image to be saved.
[in] | bAppend | Flag for image append mode. Its TRUE value indicates that the image will be appended to the image file specified by pFilename, if it exists. Appending is successful only if the image file format supports multi-page image files.
Return values
RECERR
Note
Not all the image formats are supported on all platforms. For details see the description of IMF_FORMAT.
If the given image file does not exist, it will be automatically created.
When the append flag is TRUE and the type of the given file format does not match the type of the existing multi-page image file, the function returns with an error. (I.e. it does not give an error when it appends e.g. an FF_TIFLZW to an FF_TIFG4.) To learn whether the Imgfileformat supports multi-page images kRecIsMultipageImgFileFormat can be called.
Not all of the image file types support all the possible BitsPerPixel (bit depth) values. The kRecMatchImgFileFormat function can be used to check whether the image can be saved in the specified format.
When a 8-bit palette color image is saved into JPEG format, it is converted to 24-bit color.
If hPage contains DataStream this function may save the page without recompression. See the details in the section about DataStream.
The specification of this function in C# is:
RECERR kRecSaveImgF(int sid, string pFilename, IMF_FORMAT Imgfileformat, IntPtr hPage, IMAGEINDEX img, bool bAppend);
kRecSaveImgF
RECERR RECAPIKRN kRecSaveImgF(int sid, LPCTSTR pFilename, IMF_FORMAT Imgfileformat, HPAGE hPage, IMAGEINDEX img, INTBOOL bAppend)
Saving a page directly into a file.
The specification of this function in Java is:
int kRecSaveImgF(int sid, String pFilename, IMF_FORMAT Imgfileformat, HPAGE hPage, IMAGEINDEX img, int bAppend)
The specification of this function in Python is:
def kRecSaveImgF(sid: int, pFilename: str, Imgfileformat: int, hPage: "HPAGE", img: int, bAppend: bool) -> int

◆ kRecSaveImgForce()

RECERR RECAPIKRN kRecSaveImgForce | ( | int | sid,
 |  | HIMGFILE | hIFile,
 |  | IMF_FORMAT | Imgfileformat,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | INTBOOL | bAppend )

Saving a page with forcing the format.

The kRecSaveImgForce function stores the Engine's page to disk into an image file. When the selected image cannot be saved into the specified format the image is converted to one that can receive it. The kRecSaveImgForce function activates the PID_IMGSAVE process.

Parameters
[in] | sid | Settings Collection ID.
[in] | hIFile | Handle of the image file opened for writing by kRecOpenImgFile.
[in] | Imgfileformat | Image file format of the output file.
[in] | hPage | Handle of the page containing the image to be saved.
[in] | iiImg | Index of the image to be saved.
[in] | bAppend | Flag for image append mode. Its TRUE value indicates that the image will be appended to the image file specified by hIFile, if it exists. Appending is successful only if the image file format supports multi-page image files.
Return values
RECERR
Note
Not all the image formats are supported on all platforms. For details see the description of IMF_FORMAT.
If the given image file does not exist, it will be automatically created.
When the append flag is TRUE and the type of the given file format does not match the type of the existing multi-page image file, the function returns with an error. (I.e. it does not give an error when it appends e.g. an FF_TIFLZW to an FF_TIFG4.) To learn whether the Imgfileformat supports multi-page images kRecIsMultipageImgFileFormat can be called.
The kRecMatchImgFileFormat function can be used to check whether the image can be saved in the specified format.
If hPage contains DataStream this function may save the page without recompression. See the details in the section about DataStream.
The specification of this function in C# is:
RECERR kRecSaveImgForce(int sid, IntPtr hIFile, IMF_FORMAT Imgfileformat, IntPtr hPage, IMAGEINDEX iiImg, bool bAppend);
kRecSaveImgForce
RECERR RECAPIKRN kRecSaveImgForce(int sid, HIMGFILE hIFile, IMF_FORMAT Imgfileformat, HPAGE hPage, IMAGEINDEX iiImg, INTBOOL bAppend)
Saving a page with forcing the format.
The specification of this function in Java is:
int kRecSaveImgForce(int sid, HIMGFILE hIFile, IMF_FORMAT Imgfileformat, HPAGE hPage, IMAGEINDEX iiImg, int bAppend)
The specification of this function in Python is:
def kRecSaveImgForce(sid: int, hIFile: "HIMGFILE", Imgfileformat: int, hPage: "HPAGE", iiImg: int, bAppend: bool) -> int

◆ kRecSaveImgForceF()

RECERR RECAPIKRN kRecSaveImgForceF | ( | int | sid,
 |  | LPCTSTR | pFilename,
 |  | IMF_FORMAT | Imgfileformat,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | INTBOOL | bAppend )

Saving a page directly into a file with forcing of the format.

The kRecSaveImgForceF function stores the Engine's page to disk into an image file. When the selected image cannot be saved into the specified format the image is converted to another similar one that can receive it. The kRecSaveImgForceF function activates the PID_IMGSAVE process.

Parameters
[in] | sid | Settings Collection ID.
[in] | pFilename | Name of the image file to be saved.
[in] | Imgfileformat | Image file format of the output file.
[in] | hPage | Handle of the page containing the image to be saved.
[in] | iiImg | Index of the image to be saved.
[in] | bAppend | Flag for image append mode. Its TRUE value indicates that the image will be appended to the image file specified by pFilename, if it exists. Appending is successful only if the image file format supports multi-page image files.
Return values
RECERR
Note
Not all the image formats are supported on all platforms. For details see the description of IMF_FORMAT.
If the given image file does not exist it, will be automatically created.
When the append flag is TRUE and the type of the given file format does not match the type of the existing multi-page image file, the function returns with an error. (I.e. it does not give an error when it appends e.g. an FF_TIFLZW to an FF_TIFG4.) To learn whether the Imgfileformat supports multi-page images kRecIsMultipageImgFileFormat can be called.
The kRecMatchImgFileFormat function can be used to check whether the image can be saved in the specified format.
If hPage contains DataStream this function may save the page without recompression. See the details in the section about DataStream.
The specification of this function in C# is:
RECERR kRecSaveImgForceF(int sid, string pFilename, IMF_FORMAT Imgfileformat, IntPtr hPage, IMAGEINDEX img, bool bAppend);
kRecSaveImgForceF
RECERR RECAPIKRN kRecSaveImgForceF(int sid, LPCTSTR pFilename, IMF_FORMAT Imgfileformat, HPAGE hPage, IMAGEINDEX iiImg, INTBOOL bAppend)
Saving a page directly into a file with forcing of the format.
The specification of this function in Java is:
int kRecSaveImgForceF(int sid, String pFilename, IMF_FORMAT Imgfileformat, HPAGE hPage, IMAGEINDEX iiImg, int bAppend)
The specification of this function in Python is:
def kRecSaveImgForceF(sid: int, pFilename: str, Imgfileformat: int, hPage: "HPAGE", iiImg: int, bAppend: bool) -> int

◆ kRecSetCompressionLevel()

RECERR RECAPIKRN kRecSetCompressionLevel | ( | int | sid,
 |  | int | CompressionLevel )

Setting the compression level.

This function specifies the compression level used when an image is saved to specific formats.

Parameters
[in] | sid | Settings Collection ID.
[in] | CompressionLevel | The compression level to be set. This may be a value between 1 and 5, or 0. 0 means custom level, otherwise higher value means weaker compression. The default level is 3.
Return values
RECERR
Note
This function changes the value of the setting Kernel.Imf.CompressionLevel.
This setting is used when the image is saved to FF_JPG, FF_JPG2K, FF_PDF, FF_PDF_MRC file formats, or DTXT_IOTPDF, DTXT_IOTPDF_MRC direct text formats.
See details about usage of compression level and trade-off.
The specification of this function in C# is:
RECERR kRecSetCompressionLevel(int sid, int CompressionLevel);
kRecSetCompressionLevel
RECERR RECAPIKRN kRecSetCompressionLevel(int sid, int CompressionLevel)
Setting the compression level.
The specification of this function in Java is:
int kRecSetCompressionLevel(int sid, int CompressionLevel)
The specification of this function in Python is:
def kRecSetCompressionLevel(sid: int, CompressionLevel: int) -> int

◆ kRecSetCompressionTradeoff()

RECERR RECAPIKRN kRecSetCompressionTradeoff | ( | int | sid,
 |  | COMPRESSION_TRADEOFF | CompressionTradeoff )

Setting the compression trade-off.

This function specifies the compression trade-off used when an image is saved to specific formats.

Parameters
[in] | sid | Settings Collection ID.
[in] | CompressionTradeoff | The compression tradeoff to be set. This may be COMPRESSION_FAST and COMPRESSION_ADVANCED (default).
Return values
RECERR
Note
This function changes the value of the setting Kernel.Imf.CompressionTradeoff.
This setting is used when the image is saved to FF_PDF, FF_PDF_MRC, or DTXT_IOTPDF, DTXT_IOTPDF_MRC formats with non-0 compression level.
See details about usage of compression level and trade-off.
The specification of this function in C# is:
RECERR kRecSetCompressionTradeoff(int sid, COMPRESSION_TRADEOFF CompressionTradeoff);
kRecSetCompressionTradeoff
RECERR RECAPIKRN kRecSetCompressionTradeoff(int sid, COMPRESSION_TRADEOFF CompressionTradeoff)
Setting the compression trade-off.
The specification of this function in Java is:
int kRecSetCompressionTradeoff(int sid, COMPRESSION_TRADEOFF CompressionTradeoff)
The specification of this function in Python is:
def kRecSetCompressionTradeoff(sid: int, CompressionTradeoff: int) -> int

◆ kRecSetImfLoadFlags()

RECERR RECAPIKRN kRecSetImfLoadFlags | ( | int | sid,
 |  | DWORD | fFlag )

Setting IMF PDF load flags.

The kRecSetImfLoadFlags function set an IMF Load Flags combination

Parameters
[in] | sid | Settings Collection ID.
[in] | fFlag | The IMF PDF Load Flag combination. See the possible bits.
Return values
RECERR
Note
To process the PDF just as an image (without any PDF info) set it to IMF_PDF_AS_IMAGE | IMF_PDF_NO_TAGS. Please note that recognition accuracy is usually worse if the bit IMF_PDF_AS_IMAGE is switched on!
This function changes the setting Kernel.Imf.PDF.LoadFlags. This setting can be retrieved by kRecGetImfLoadFlags.
The specification of this function in C# is:
RECERR kRecSetImfLoadFlags(int sid, uint fFlag);
kRecSetImfLoadFlags
RECERR RECAPIKRN kRecSetImfLoadFlags(int sid, DWORD fFlag)
Setting IMF PDF load flags.
The specification of this function in Java is:
int kRecSetImfLoadFlags(int sid, long fFlag)
The specification of this function in Python is:
def kRecSetImfLoadFlags(sid: int, fFlag: int) -> int

◆ kRecSetJPGQuality()

RECERR RECAPIKRN kRecSetJPGQuality | ( | int | sid,
 |  | int | nQuality )

Setting JPEG quality.

This function changes the JPEG quality setting used when saving images into JPEG or JPEG2000 files.

Parameters
[in] | sid | Settings Collection ID.
[in] | nQuality | JPEG quality to be set. This may be a value between 1 and 100, or -1 (default, see notes).
Return values
RECERR
Note
This function sets the value of the setting Kernel.Imf.JPG.Quality. This setting can be retrieved by kRecGetJPGQuality.
The quality differs from compression rate. The real compression rate cannot be calculated from the quality value, it depends on the content of the image as well.
Higher value means higher quality and weaker compression.
This setting is used when the image is saved to FF_JPG or FF_JPG2K formats and custom compression level is set (i.e. Kernel.Imf.CompressionLevel is 0, see: kRecSetCompressionLevel). When the compression level is not 0, this setting is disregarded, and the following predefined JPEG quality values are used:
  • FF_JPG:
    • level 5 - 90
    • level 4 - 82
    • level 3 - 75
    • level 2 - 62
    • level 1 - 50
  • FF_JPG2K:
    • level 5 - 75
    • level 4 - 62
    • level 3 - 50
    • level 2 - 30
    • level 1 - 10
The best quality can be achieved by setting Kernel.Imf.CompressionLevel = 0 and Kernel.Imf.JPG.Quality = 100. In this case FF_JPG2K applies lossless compression, FF_JPG has some negligible loss.
FF_JPG_MIN, FF_JPG_GOOD, FF_JPG_SUPERB, FF_JPG2K_MIN, FF_JPG2K_GOOD, FF_JPG2K_SUPERB can be used but they are deprecated. Use FF_JPG or FF_JPG2K instead.
If this setting is not default, the Image File Handling Module uses that value for FF_JPG_MIN, FF_JPG_GOOD, FF_JPG_SUPERB, FF_JPG2K_MIN, FF_JPG2K_GOOD, FF_JPG2K_SUPERB image formats (i.e. there is no difference between SUPERB, LOSSLESS, GOOD and MIN).
FF_JPG_SUPERB and FF_JPG2K_SUPERB has some negligible loss.
If this setting has its default value (-1), the different JPEG and JPEG2000 image formats represent the following qualities:
  • FF_JPG_SUPERB - 90
  • FF_JPG_GOOD - 75
  • FF_JPG_MIN - 50
  • FF_JPG - 50
  • FF_JPG2K_SUPERB - 75
  • FF_JPG2K_GOOD - 50
  • FF_JPG2K_MIN - 10
  • FF_JPG2K - 50
The specification of this function in C# is:
RECERR kRecSetJPGQuality(int sid, int nQuality);
kRecSetJPGQuality
RECERR RECAPIKRN kRecSetJPGQuality(int sid, int nQuality)
Setting JPEG quality.
The specification of this function in Java is:
int kRecSetJPGQuality(int sid, int nQuality)
The specification of this function in Python is:
def kRecSetJPGQuality(sid: int, nQuality: int) -> int

◆ kRecSetMRCCompressionSettingsFromLevel()

RECERR RECAPIKRN kRecSetMRCCompressionSettingsFromLevel | ( | int | sid,
 |  | int | CompressionLevel,
 |  | COMPRESSION_TRADEOFF | CompressionTradeOff )

Modifying the MRC settings according to the given compression level and tradeoff.

This function can be used to set customized PDF MRC parameters. See notes below for the list of the modified settings.

Parameters
[in] | sid | Settings Collection ID.
[in] | CompressionLevel | The compression level between 1 and 5.
[in] | CompressionTradeOff | The compression trade-off.
Return values
RECERR
Note
This function can be used for FF_PDF_MRC and DTXT_IOTPDF_MRC output. Compression level and compression trade-off together determine the value of the settings below. This function is useful when the User wants to change some of them and to use the predefined values for the remaining ones. For example, the following code uses level 3, in which the value of the setting Kernel.Imf.PDF.MRC.BGLayer.JPGQuality is 55 by default. However the code wants to use 30:
rc = kRecSetCompressionLevel(sid, 0); // using the customized values
rc = kRecSetMRCCompressionSettingsFromLevel(sid, 3, COMPRESSION_ADVANCED);
HSETTING hset;
kRecSettingGetHandle(NULL, "Kernel.Imf.PDF.MRC.BGLayer.JPGQuality", &hset, NULL);
kRecSettingSetInt(sid, hset, 30);
rc = kRecSaveImgF(sid, pFilename, FF_PDF_MRC, hPage, II_CURRENT, bAppend);
II_CURRENT
@ II_CURRENT
Definition KernelApi.h:1001
kRecSetMRCCompressionSettingsFromLevel
RECERR RECAPIKRN kRecSetMRCCompressionSettingsFromLevel(int sid, int CompressionLevel, COMPRESSION_TRADEOFF CompressionTradeOff)
Modifying the MRC settings according to the given compression level and tradeoff.
FF_PDF_MRC
@ FF_PDF_MRC
Definition KernelApi.h:11234
COMPRESSION_ADVANCED
@ COMPRESSION_ADVANCED
Use advanced but slower method (default).
Definition KernelApi.h:11337
kRecSettingGetHandle
RECERR RSTSAPI kRecSettingGetHandle(HSETTING root_of_query, const char *symb_name, HSETTING *ret_handle, INTBOOL *has_setting)
Getting the handle of a node.
kRecSettingSetInt
RECERR RSTSAPI kRecSettingSetInt(int sid, HSETTING sett, int new_value)
Setting the value of an STS_INT or STS_ENUM or STS_BOOL setting.
HSETTING
struct RECSTSSTRUCT * HSETTING
Handle of a setting.
Definition KrnStsApi.h:287
The following settings are changed by this function (see detailed descriptions):
  • Kernel.IMF.PDF.ColorFormat
  • Kernel.IMF.PDF.BWFormat
  • Kernel.IMF.PDF.MRC.EnableMultipleFG
  • Kernel.IMF.PDF.MRC.BGLayer.JPGQuality
  • Kernel.IMF.PDF.MRC.BGLayer.SubSampleRate
  • Kernel.IMF.PDF.MRC.BGLayer.Method
  • Kernel.IMF.PDF.MRC.BGLayer.ConsolidationStrength
  • Kernel.IMF.PDF.MRC.BGLayer.Smoothing
  • Kernel.IMF.PDF.MRC.BGLayer.DilatationSteps
  • Kernel.IMF.PDF.MRC.FGLayer.JPGQuality
  • Kernel.IMF.PDF.MRC.FGLayer.SubSampleRate
  • Kernel.IMF.PDF.MRC.FGLayer.Method
  • Kernel.IMF.PDF.MRC.SelLayer.SubSampleRate
  • Kernel.IMF.PDF.MRC.Selector.Method
The other MRC settings are independent of compression level and trade-off. They are not modified by this function.
The specification of this function in C# is:
RECERR kRecSetMRCCompressionSettingsFromLevel(int sid, int CompressionLevel, COMPRESSION_TRADEOFF CompressionTradeOff);
The specification of this function in Java is:
int kRecSetMRCCompressionSettingsFromLevel(int sid, int CompressionLevel, COMPRESSION_TRADEOFF CompressionTradeOff)
The specification of this function in Python is:
def kRecSetMRCCompressionSettingsFromLevel(sid: int, CompressionLevel: int, CompressionTradeOff: int) -> int

◆ kRecSetPdfPassword()

RECERR RECAPIKRN kRecSetPdfPassword | ( | HIMGFILE | hIFile,
 |  | LPCTSTR | pwd )

Setting PDF password.

This function sets the password for a PDF file opened by kRecOpenImgFile. To learn whether a password is required for processing the PDF kRecGetPDFEncLevel can be called. kRecSetPdfPasswordA supposes the password to be in the current system code page. Thus we suggest to use kRecSetPdfPasswordW.

Parameters
[in] | hIFile | Handle of the image file.
[in] | pwd | Password.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecSetPdfPassword(IntPtr hIFile, string pwd);
kRecSetPdfPassword
RECERR RECAPIKRN kRecSetPdfPassword(HIMGFILE hIFile, LPCTSTR pwd)
Setting PDF password.
The specification of this function in Java is:
int kRecSetPdfPassword(HIMGFILE hIFile, String pwd)
The specification of this function in Python is:
def kRecSetPdfPassword(hIFile: "HIMGFILE", pwd: str) -> int

◆ kRecSetPdfTagInfo()

RECERR RECAPIKRN kRecSetPdfTagInfo | ( | int | sid,
 |  | INTBOOL | bUseTagInfo )

Setting use of PDF tag information.

This function sets whether the Engine uses the tag information of the PDF file or not.

Parameters
[in] | sid | Settings Collection ID.
[in] | bUseTagInfo | Use of tag information. If it is TRUE the tag information is used.
Return values
RECERR
Note
The tag information affects the page layout decomposition and thus the recognition result. It can give a special structure to the page, which may not be seen during decomposition, thus improving the result. Unfortunately, there can be absolutely wrong tag information in a PDF file even if it displays properly in the viewer. In this case, the recognition result may have worse quality using tag information and may be better without this.
The specification of this function in C# is:
RECERR kRecSetPdfTagInfo(int sid, bool bUseTagInfo);
kRecSetPdfTagInfo
RECERR RECAPIKRN kRecSetPdfTagInfo(int sid, INTBOOL bUseTagInfo)
Setting use of PDF tag information.
The specification of this function in Java is:
int kRecSetPdfTagInfo(int sid, int bUseTagInfo)
The specification of this function in Python is:
def kRecSetPdfTagInfo(sid: int, bUseTagInfo: bool) -> int

◆ kRecUpdateImgFilePage()

RECERR RECAPIKRN kRecUpdateImgFilePage | ( | int | sid,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | HIMGFILE | hIFile,
 |  | int | nPage,
 |  | IMF_FORMAT | format )

Replacing a page in a TIFF file.

The kRecUpdateImgFilePage function replaces a page in a multi-page TIFF image file with a different image taken from the image management module.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the image to be inserted.
[in] | iiImg | Index of the image to be inserted.
[in] | hIFile | Handle of the multi-page TIFF image file.
[in] | nPage | Page number of the page in the image file to be deleted and replaced. To replace the first page in the image file, the value zero (0) should be specified.
[in] | format | Image file format (compression) to be applied during the page replacement. Of course, only TIFF formats can be selected.
Return values
RECERR
Note
This function belongs to the Multi-page TIFF File Handling Function Group. To use these functions, the pages in the multi-page TIFF file must be stored in One-strip format and the StripBytesCount TIFF tag must exist in the page header. TIFF image files created by OmniPage CSDK fulfill this requirement.
Deleted or replaced pages can be physically removed from the image file calling kRecPackImgFile.
The specification of this function in C# is:
RECERR kRecUpdateImgFilePage(int sid, IntPtr hPage, IMAGEINDEX iiImg, IntPtr hIFile, int nPage, IMF_FORMAT format);
kRecUpdateImgFilePage
RECERR RECAPIKRN kRecUpdateImgFilePage(int sid, HPAGE hPage, IMAGEINDEX iiImg, HIMGFILE hIFile, int nPage, IMF_FORMAT format)
Replacing a page in a TIFF file.
The specification of this function in Java is:
int kRecUpdateImgFilePage(int sid, HPAGE hPage, IMAGEINDEX iiImg, HIMGFILE hIFile, int nPage, IMF_FORMAT format)
The specification of this function in Python is:
def kRecUpdateImgFilePage(sid: int, hPage: "HPAGE", iiImg: int, hIFile: "HIMGFILE", nPage: int, format: int) -> int


RecAPI: Input/output Stream Handling Module

Classes | Macros | Typedefs | Functions
Input/output Stream Handling Module
KernelAPI

API for handling input and output files through memory or other non-standard I/O devices. Supported on: Windows, Linux, MacOS. More...

Classes

struct _R_IOStreamfuncs
Container structure of the IOStream callback functions. More...

Macros

#define NOT_APPLICATION_STREAM ((size_t)-1)
Return this value if the given name is not handled by your stream callbacks.

Typedefs

typedef int CALLBACK | open_stream_f(const char *streamName, int openMode, size_t *streamID)
callback function for the OPEN operation. See R_IOStreamfuncs::ropen_stream
typedef struct _R_IOStreamfuncs | R_IOStreamfuncs
Container structure of the IOStream callback functions.

Functions

RECERR RECAPIKRN kRecSetIOStreamCB (R_IOStreamfuncs *iosCB)
IOStream.

Detailed Description

API for handling input and output files through memory or other non-standard I/O devices. Supported on: Windows, Linux, MacOS.

Typedef Documentation

◆ R_IOStreamfuncs

typedef struct _R_IOStreamfuncs R_IOStreamfuncs

Container structure of the IOStream callback functions.

Note
See kRecSetIOStreamCB

Function Documentation

◆ kRecSetIOStreamCB()

RECERR RECAPIKRN kRecSetIOStreamCB ( R_IOStreamfuncs * iosCB )

IOStream.

This function sets the application callback API for streaming IO.

Parameters
[in] iosCB Pointer to the R_IOStreamfuncs structure containing callback functions. Must be provided and implemented by the application. Use NULL to turn off the callback mechanism.
Note
After the IOStream API has been set, all CSDK file opens are hooked and the callback R_IOStreamfuncs::ropen_stream is called first. You must invent a naming convention that you use to tell normal files and your streams apart (for example start all your stream names like "mystream:"). If the actual name belongs to the application (i.e. it fits your naming convention), ropen_stream must return a unique ID in streamID. Otherwise you must return NOT_APPLICATION_STREAM in the streamID parameter and the file will be handled normally.
Your generated stream ID will be passed to your other callbacks. You can map these IDs to handler objects inside your application to perform the required operation.
Return errno compatible error code when your stream operation has an error.
See Sample71.cpp for a sample implementation of the usage of the IOStream API on RECAPI.
For .NET application Objects API sample #71 (Samples\CSClassSamples\Sample71.cs) contains a worked out sample solution.
In .NET both FileStream and MemoryStream are directly supported as well as byte[] objects. These standard streams can be set using IOStreamCB.SetStream("userStreamName", Stream or byte[]) Any other non standard IO has to be completely implemented in the callbacks by the application.
The specification of this function in Java is:
int kRecSetIOStreamCB(IOStreamCallbacks iosCB)
kRecSetIOStreamCB
RECERR RECAPIKRN kRecSetIOStreamCB(R_IOStreamfuncs *iosCB)
IOStream.
The specification of this function in Python is:
def kRecSetIOStreamCB(iosCB: "IOStreamCallbacks") -> int


RecAPI: _R_IOStreamfuncs Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
_R_IOStreamfuncs Struct Reference
KernelAPI » Input/output Stream Handling Module

Container structure of the IOStream callback functions. More...

#include <KernelApi.h>

Public Attributes

open_stream_f * ropen_stream
read_stream_f * | rread_stream
write_stream_f * | rwrite_stream
tell_stream_f * | rtell_stream
seek_stream_f * | rseek_stream
close_stream_f * | rclose_stream
access_stream_f * | raccess_stream
commit_stream_f * | rcommit_stream
trim_stream_f * | rtrim_stream
is_stream_f * | ris_stream

Detailed Description

Container structure of the IOStream callback functions.

Note
See kRecSetIOStreamCB

Member Data Documentation

◆ raccess_stream

access_stream_f* _R_IOStreamfuncs::raccess_stream

Check if the stream exists or not.
streamName: UTF-8 name of the stream
accMode: existence only: 0, check if readable: 4, check if writable: 2
(Note: these values are compatible with Unix's F_OK, R_OK and W_OK)
Return 1 if the named stream belongs to the application and is accessible.
Return -1 if the named stream belongs to the application but is not accessible.
Return 0 if the specified stream does not belong to the application.

◆ rclose_stream

close_stream_f* _R_IOStreamfuncs::rclose_stream

Perform the CLOSE operation. Return 0 if no error, otherwise return errno.

◆ rcommit_stream

commit_stream_f* _R_IOStreamfuncs::rcommit_stream

Preform the COMMIT operation: flush any internal buffers.

◆ ris_stream

is_stream_f* _R_IOStreamfuncs::ris_stream

Check if the given name is a stream or not
streamName: UTF-8 name of the stream
Return 1 if this stream belongs to the application otherwise 0.

◆ ropen_stream

open_stream_f* _R_IOStreamfuncs::ropen_stream

Preform the OPEN operation on the specified stream.
Set streamID to NOT_APPLICATION_STREAM when the actual name does not belong to the application.
streamName: UTF-8 name of the stream
openMode: create: 1, read: 2, write: 4, and combinations
Return 0 if no error, otherwise return errno.

◆ rread_stream

read_stream_f* _R_IOStreamfuncs::rread_stream

Perform the READ operation. Read at most size bytes to buf and return the amount read in read
Return 0 if no error, otherwise return errno.

◆ rseek_stream

seek_stream_f* _R_IOStreamfuncs::rseek_stream

Perform the SEEK operation.
offset: set the stream offset to this value relative to origin
origin: absolute offset: SEEK_SET, relative offset from current: SEEK_CUR, relative offset from EOF: SEEK_END
pos: return the final offset in pos
If the stream does not have seek capability use forward read (into memory) technic to emulate the seek that CSDK requires to work properly (specifically at some image inputs).
Return 0 if no error, otherwise return errno.

◆ rtell_stream

tell_stream_f* _R_IOStreamfuncs::rtell_stream

Perform the TELL operation. Store the current stream offset in pos
Return 0 if no error, otherwise return errno.

◆ rtrim_stream

trim_stream_f* _R_IOStreamfuncs::rtrim_stream

Perform the TRIM operation, if possible: set the stream size to newSize

◆ rwrite_stream

write_stream_f* _R_IOStreamfuncs::rwrite_stream

Perform the WRITE operation. Write at most size bytes from buf and return the amount written in written
Return 0 if no error, otherwise return errno.


RecAPI: Scanning Module

Macros | Typedefs | Enumerations | Functions
Scanning Module
KernelAPI

This is the Scanner API of the KernelAPI. The Scanning Module is supported on: Windows. More...

Macros

#define | AUTOBRIGHTNESS SPEC_VAL
Specifies automatic brightness control.
#define | RSDPP_TOLERANCE 120
Tolerance of standard paper sizes.
#define | SPEC_VAL ((UINT)INT_MAX)
Special value (e.g. auto-brightness)
#define | INV_SPECID ((UINT)-1)
Invalid specification ID.
#define | LAST_SPECID ((UINT)-2)
Most recently used specification ID.

Typedefs

typedef enum RSDAF | RSDAF
Application flags.
typedef enum RSDWZ | RSDWZ
Wizard flags.
typedef enum RSDUI | RSDUI
Display the driver's UI (G/S)
typedef enum RSDST | RSDST
Start mode (G/S)
typedef enum RSDPS | RSDPS
Paper source (G/S)
typedef enum RSDDX | RSDDX
Duplex scanning (G/S)
typedef enum RSDDF | RSDDF
Double feed detection.
typedef enum RSDRS | RSDRS
Resolution (appropriate values) (G/S)
typedef enum RSDOR | RSDOR
Orientation (G/S)
typedef enum RSDII | RSDII
Image interpretation (G/S)
typedef enum RSDCI | RSDCI
Color interpretation (G/S)
typedef enum RSDHT | RSDHT
Halftone patterns (G)
typedef enum RSDLC | RSDLC
Lamp or filter color (G/S)
typedef enum RSDCM | RSDCM
Compression (G/S)
typedef enum RSDFS | RSDFS
File types for scanning to/from file (G/S)
typedef enum RSDIN | RSDIN
Indication during scanning (G/S)
typedef enum RSDAD | RSDAD
Adjustable parameters (G)
typedef enum RSDAS | RSDAS
ADF/transparency adapter status (G)
typedef enum RSDPP | RSDPP
Standard paper sizes.
typedef enum RSDPO | RSDPO
Orientation of paper.
typedef enum RERR | RERR
Rsd Errors.

Enumerations

enum RSDAF {
RSDAF_CHECKADF = 0x0001 ,
RSDAF_SETUITOPMOST = 0x0002 ,
RSDAF_PALETTESUPPORT = 0x0004 ,
RSDAF_COMPRESSEDIMAGES = 0x0008 ,
RSDAF_IMAGEFILES = 0x0010
}
Application flags. More...
enum RSDWZ {
RSDWZ_TOPMOST = 0x0001 ,
RSDWZ_SILENT = 0x0002 ,
RSDWZ_SILENT_FORCED = 0x0004 ,
RSDWZ_NOSAFEMODE = 0x0008 ,
RSDWZ_STISELECT = 0x0010 ,
RSDWZ_NOHINTEDITOR = 0x0020 ,
RSDWZ_NOTESTS = 0x0040 ,
RSDWZ_BASICTEST = 0x0080 ,
RSDWZ_ADDITIONALTESTS = 0x0100 ,
RSDWZ_SET_DEFAULT = 0x0200 ,
RSDWZ_DONTSAVE_INIFILE = 0x0400 ,
RSDWZ_SAVE_RSDII = 0x0800 ,
RSDWZ_REMOTE = 0x1000 ,
RSDWZ_OLD_WIZARD = 0x80000000
}
Wizard flags. More...
enum RSDUI {
RSDUI_API = 0x0001 ,
RSDUI_BASIC = 0x0002 ,
RSDUI_ADVANCED = 0x0004 ,
RSDUI_EXTENDED = 0x0008 ,
RSDUI_AREA = 0x0010 ,
RSDUI_CONFIG = 0x0040 ,
RSDUI_ABOUT = 0x0080 ,
RSDUI_KEEP = 0x0100 ,
RSDUI_ONSCREEN = 0x0200 ,
RSDUI_PENDING = 0x0400 ,
RSDUI_CAP = 0x01FF
}
Display the driver's UI (G/S) More...
enum RSDST {
RSDST_IMMEDIATE = 0x0001 ,
RSDST_UI_ALWAYS = 0x0010 ,
RSDST_UI_SHOW = 0x0010 ,
RSDST_UI_NEVER = 0x0020 ,
RSDST_UI_HIDE = 0x0020 ,
RSDST_UI_ONCE = 0x0040 ,
RSDST_UI_KEEP = 0x0080 ,
RSDST_NATIVE = 0x0100 ,
RSDST_MEMORY = 0x0200 ,
RSDST_FILE = 0x0400 ,
RSDST_CAP = 0x0001 ,
RSDST_CAPUI = 0x00F0 ,
RSDST_CAPTR = 0x0700
}
Start mode (G/S) More...
enum RSDPS {
RSDPS_CAMERA = 0x0000 ,
RSDPS_FLATBED = 0x0001 ,
RSDPS_SHEETFEED = 0x0002 ,
RSDPS_ADF_AUTO = 0x0004 ,
RSDPS_TRANSP_AUTO = 0x0008 ,
RSDPS_ADF = 0x0010 ,
RSDPS_TRANSP = 0x0020 ,
RSDPS_FLATBED_SPLIT = 0x20000 ,
RSDPS_ADF_AUTOLOAD = 0x0100 ,
RSDPS_ADF_SCANAHEAD = 0x0200 ,
RSDPS_ADF_SCANAHEAD_PAUSE = 0x10000 ,
RSDPS_ADF_REVERSEORDER = 0x0400 ,
RSDPS_ADF_JOBSEPARATOR = 0x0800 ,
RSDPS_ADFSTAT_AFTERSCAN = 0x1000 ,
RSDPS_ADF_PRELOAD = 0x2000 ,
RSDPS_ADF_UNLOAD = 0x4000 ,
RSDPS_ADF_RELOAD = 0x8000 ,
RSDPS_CAP = 0x003F ,
RSDPS_CAPAD = 0x0014 ,
RSDPS_CAPTR = 0x0028 ,
RSDPS_CAPLD = 0x0300 ,
RSDPS_ACT = 0xE000
}
Paper source (G/S) More...
enum RSDDX {
RSDDX_SINGLE = 0x0001 ,
RSDDX_SIMPLEX = 0x0001 ,
RSDDX_DUPLEX_PAGE = 0x0002 ,
RSDDX_DUPLEX_BOOK = 0x0004 ,
RSDDX_DUPLEX_FLIP_BOOK = 0x0010 ,
RSDDX_DUPLEX_FLIP_TABLET = 0x0020 ,
RSDDX_DUPLEX_MERGE = 0x0100 ,
RSDDX_DUPLEX_MERGE_BOOK = 0x0100 ,
RSDDX_DUPLEX_MERGE_TABLET = 0x0200 ,
RSDDX_CAP = 0x0007 ,
RSDDX_CAPFL = 0x0031 ,
RSDDX_CAPMG = 0x0301 ,
RSDDX_CAPALL = 0x0337 ,
RSDDX_DOUBLE_PAGE = 0x80000000
}
Duplex scanning (G/S) More...
enum RSDDF {
RSDDF_NONE = 0x00000000 ,
RSDDF_LENGTH_LOW = 0x00010000 ,
RSDDF_LENGTH_NORMAL = 0x00020000 ,
RSDDF_LENGTH_HIGH = 0x00040000 ,
RSDDF_LENGTH_VALUE = 0x00080000 ,
RSDDF_THICKNESS_LOW = 0x00100000 ,
RSDDF_THICKNESS_NORMAL = 0x00200000 ,
RSDDF_THICKNESS_HIGH = 0x00400000 ,
RSDDF_THICKNESS_VALUE = 0x00800000 ,
RSDDF_CAP = 0x00FF0000 ,
RSDDF_CAPL = 0x000F0000 ,
RSDDF_CAPT = 0x00F00000 ,
RSDDF_VAL = 0x0000FFFF
}
Double feed detection. More...
enum RSDRS {
RSDRS_75 = 0x00000001 ,
RSDRS_100 = 0x00000002 ,
RSDRS_150 = 0x00000004 ,
RSDRS_200 = 0x00000008 ,
RSDRS_240 = 0x00000010 ,
RSDRS_300 = 0x00000020 ,
RSDRS_400 = 0x00000040 ,
RSDRS_500 = 0x00000080 ,
RSDRS_600 = 0x00000100 ,
RSDRS_800 = 0x00000200 ,
RSDRS_1200 = 0x00000400 ,
RSDRS_1600 = 0x00000800 ,
RSDRS_2400 = 0x00001000 ,
RSDRS_3200 = 0x00002000 ,
RSDRS_4800 = 0x00004000 ,
RSDRS_6400 = 0x00008000 ,
RSDRS_9600 = 0x00010000 ,
RSDRS_CAP = 0x0001FFFF
}
Resolution (appropriate values) (G/S) More...
enum RSDOR {
RSDOR_NORMAL = 0x0001 ,
RSDOR_MIRROR = 0x0002 ,
RSDOR_ROTATE90 = 0x0004 ,
RSDOR_ROTATE180 = 0x0008 ,
RSDOR_ROTATE270 = 0x0010 ,
RSDOR_AUTO = 0x0020 ,
RSDOR_CAPROT = 0x001D ,
RSDOR_CAP = 0x003F
}
Orientation (G/S) More...
enum RSDII {
RSDII_BW = 0x0001 ,
RSDII_HT = 0x0002 ,
RSDII_GRAY4 = 0x0004 ,
RSDII_GRAY8 = 0x0008 ,
RSDII_COLOR1 = 0x0010 ,
RSDII_COLORHT = 0x0020 ,
RSDII_COLOR4 = 0x0040 ,
RSDII_COLOR8 = 0x0080 ,
RSDII_AUTO = 0x0100 ,
RSDII_PACKED = 0x1000 ,
RSDII_BYTES = 0x2000 ,
RSDII_LINES = 0x4000 ,
RSDII_PAGES = 0x8000 ,
RSDII_CAP = 0x01FF ,
RSDII_CAPPIX = 0xF000
}
Image interpretation (G/S) More...
enum RSDCI {
RSDCI_BLACK0 = 0x0001 ,
RSDCI_WHITE0 = 0x0002 ,
RSDCI_MSBFIRST = 0x0004 ,
RSDCI_LSBFIRST = 0x0008 ,
RSDCI_RGB = 0x0010 ,
RSDCI_CMY = 0x0020 ,
RSDCI_CMYK = 0x0040 ,
RSDCI_YUV = 0x0080 ,
RSDCI_YUVK = 0x0100 ,
RSDCI_CIEXYZ = 0x0200 ,
RSDCI_PALETTE = 0x0400 ,
RSDCI_CAPBW = 0x0003 ,
RSDCI_CAPML = 0x000C ,
RSDCI_CAP = 0x07F0
}
Color interpretation (G/S) More...
enum RSDHT {
RSDHT_NONE = 0x0000 ,
RSDHT_SIZE = 0x000F ,
RSDHT_ERRDIFF = 0x0010 ,
RSDHT_BAYER = 0x0020 ,
RSDHT_SPIRAL = 0x0040 ,
RSDHT_FATTING = 0x0080 ,
RSDHT_HORIZONTAL = 0x0100 ,
RSDHT_VERTICAL = 0x0200 ,
RSDHT_DIAGONAL = 0x0400 ,
RSDHT_NETSCREEN = 0x0800
}
Halftone patterns (G) More...
enum RSDLC {
RSDLC_WHITE = 0x0001 ,
RSDLC_RED = 0x0002 ,
RSDLC_GREEN = 0x0004 ,
RSDLC_BLUE = 0x0008 ,
RSDLC_CYAN = 0x0010 ,
RSDLC_MAGENTA = 0x0020 ,
RSDLC_YELLOW = 0x0040 ,
RSDLC_CAP = 0x007F
}
Lamp or filter color (G/S) More...
enum RSDCM {
RSDCM_NO = 0x00000000 ,
RSDCM_RAW = 0x00000001 ,
RSDCM_PACKBITS = 0x00000002 ,
RSDCM_CCITTG31DNE = 0x00000004 ,
RSDCM_CCITTG31D = 0x00000008 ,
RSDCM_CCITTG32D = 0x00000010 ,
RSDCM_CCITTG4 = 0x00000020 ,
RSDCM_LZW = 0x00000040 ,
RSDCM_JPEG = 0x00000080 ,
RSDCM_ZIP = 0x00000100 ,
RSDCM_PCX = 0x00000200 ,
RSDCM_BMP = 0x00000400 ,
RSDCM_RLE4 = 0x00000800 ,
RSDCM_RLE8 = 0x00001000 ,
RSDCM_BITFIELDS = 0x00002000 ,
RSDCM_JBIG = 0x00008000 ,
RSDCM_GIF = 0x00010000 ,
RSDCM_PICT = 0x00020000 ,
RSDCM_PNG = 0x00200000 ,
RSDCM_JPEG2000 = 0x02000000 ,
RSDCM_DECOMP = 0 ,
RSDCM_NOSCAN = 0 ,
RSDCM_FILE = 0x80000000 ,
RSDCM_CAP = 0x0223FFFF ,
RSDCM_BW = 0x0023877F ,
RSDCM_GRAY4 = 0x00238F43 ,
RSDCM_GRAY8 = 0x022317C3 ,
RSDCM_COLOR1 = 0x00000000 ,
RSDCM_COLOR4 = 0x00000000 ,
RSDCM_COLOR8 = 0x022327C3
}
Compression (G/S) More...
enum RSDFS {
RSDFS_NO = 0x00000000 ,
RSDFS_TIFF = 0x00000001 ,
RSDFS_TIFF_PACKBITS = 0x00000002 ,
RSDFS_TIFF_G31DNE = 0x00000004 ,
RSDFS_TIFF_G31D = 0x00000008 ,
RSDFS_TIFF_G32D = 0x00000010 ,
RSDFS_TIFF_G4 = 0x00000020 ,
RSDFS_TIFF_LZW = 0x00000040 ,
RSDFS_TIFF_JPEG = 0x00000080 ,
RSDFS_TIFF_ZIP = 0x00000100 ,
RSDFS_PCX = 0x00000200 ,
RSDFS_BMP = 0x00000400 ,
RSDFS_BMP_RLE4 = 0x00000800 ,
RSDFS_BMP_RLE8 = 0x00001000 ,
RSDFS_JPEG = 0x00002000 ,
RSDFS_WMF = 0x00004000 ,
RSDFS_JBIG = 0x00008000 ,
RSDFS_GIF = 0x00010000 ,
RSDFS_PICT = 0x00020000 ,
RSDFS_XBM = 0x00040000 ,
RSDFS_JFIF = 0x00080000 ,
RSDFS_FPX = 0x00100000 ,
RSDFS_PNG = 0x00200000 ,
RSDFS_SPIFF = 0x00400000 ,
RSDFS_EXIF = 0x00800000 ,
RSDFS_DCX = 0x01000000 ,
RSDFS_JPEG2000 = 0x02000000 ,
RSDFS_PDF = 0x04000000 ,
RSDFS_EMF = 0x08000000 ,
RSDFS_MULTIPAGE = 0x40000000 ,
RSDFS_READ = 0x80000000 ,
RSDFS_CAP = 0xCFFFFFFF ,
RSDFS_CAPMULTI = 0x050001FF ,
RSDFS_BW = 0x4DE7C77F ,
RSDFS_GRAY4 = 0x4DE3CF43 ,
RSDFS_GRAY8 = 0x4FFB77C3 ,
RSDFS_COLOR1 = 0x00000000 ,
RSDFS_COLOR4 = 0x00000000 ,
RSDFS_COLOR8 = 0x4FFB67C3
}
File types for scanning to/from file (G/S) More...
enum RSDIN {
RSDIN_NO = 0x0000 ,
RSDIN_PROGRESS = 0x0001 ,
RSDIN_IMAGE = 0x0002 ,
RSDIN_CAP = 0x0003 ,
RSDIN_MIN_LINE = 0x0000 ,
RSDIN_MIN_64K = 0x0100 ,
RSDIN_MIN_IMG = 0x0200 ,
RSDIN_MIN = 0x0300 ,
RSDIN_OPT_LINE = 0x0000 ,
RSDIN_OPT_64K = 0x0400 ,
RSDIN_OPT_IMG = 0x0800 ,
RSDIN_OPT = 0x0C00 ,
RSDIN_TIMEOUT = 0x1000
}
Indication during scanning (G/S) More...
enum RSDAD {
RSDAD_RESOLUTION = 0x0001 ,
RSDAD_PAPERSIZE = 0x0002 ,
RSDAD_AUTOPAPERSIZE = 0x0004 ,
RSDAD_MARGINS = 0x0008 ,
RSDAD_BRIGHTNESS = 0x0010 ,
RSDAD_AUTOBRIGHTNESS = 0x0020 ,
RSDAD_CONTRAST = 0x0040 ,
RSDAD_AUTOCONTRAST = 0x0080 ,
RSDAD_MIDTONE = 0x0100 ,
RSDAD_SHARPNESS = 0x0200 ,
RSDAD_LAMPCOLOR = 0x0400 ,
RSDAD_SCAN2FILEONLY = 0x0800 ,
RSDAD_UI_SHOW = 0x1000 ,
RSDAD_UI_HIDE = 0x2000 ,
RSDAD_SCANPARAMFILE = 0x4000 ,
RSDAD_IMPRINTER = 0x8000
}
Adjustable parameters (G) More...
enum RSDAS {
}
ADF/transparency adapter status (G) More...
enum RSDPP {
}
Standard paper sizes. More...
enum RSDPO {
RSDPO_PORTRAIT = 1 ,
RSDPO_LANDSCAPE = 2
}
Orientation of paper. More...
enum RERR {
RERR_INTERNAL = _RERR_INTERNAL ,
RERR_OK = _RERR_OK ,
RERR_FAIL = _RERR_FAIL ,
RERR_NA = _RERR_NA ,
RERR_ACCESS = _RERR_ACCESS ,
RERR_CORRUPTED = _RERR_CORRUPTED ,
RERR_NOMEMORY = _RERR_NOMEMORY ,
RERR_MEMORYFAIL = _RERR_MEMORYFAIL ,
RERR_NOFILE = _RERR_NOFILE ,
RERR_CREATEFAIL = _RERR_CREATEFAIL ,
RERR_OPENFAIL = _RERR_OPENFAIL ,
RERR_READONLY = _RERR_READONLY ,
RERR_READFAIL = _RERR_READFAIL ,
RERR_WRITEFAIL = _RERR_WRITEFAIL ,
RERR_CLOSEFAIL = _RERR_CLOSEFAIL ,
RERR_FILECORRUPTED = _RERR_FILECORRUPTED ,
RERR_NOMSGFILE = _RERR_NOMSGFILE ,
RERR_NOMESSAGE = _RERR_NOMESSAGE ,
RERR_DLL_NOFILE = _RERR_DLL_NOFILE ,
RERR_DLL_FORMAT = _RERR_DLL_FORMAT ,
RERR_DLL_GETPROC = _RERR_DLL_GETPROC ,
RERR_NOTOPENED = _RERR_NOTOPENED ,
RERR_NOTLOADED = _RERR_NOTLOADED ,
RERR_NODRIVER = _RERR_NODRIVER ,
RERR_BADVERSION = _RERR_BADVERSION ,
RERR_DRIVERFAIL = _RERR_DRIVERFAIL ,
RERR_NOCARD = _RERR_NOCARD ,
RERR_BADHANDLE = _RERR_BADHANDLE ,
RERR_PARAMID = _RERR_PARAMID ,
RERR_PARAMVALUE = _RERR_PARAMVALUE ,
RERR_BADADFCOMMAND = _RERR_BADADFCOMMAND ,
RERR_BADSTARTMODE = _RERR_BADSTARTMODE ,
RERR_BADTRANSFER = _RERR_BADTRANSFER ,
RERR_BADPAPERSOURCE = _RERR_BADPAPERSOURCE ,
RERR_BADRESOLUTION = _RERR_BADRESOLUTION ,
RERR_BADMARGIN = _RERR_BADMARGIN ,
RERR_BADPAPERSIZE = _RERR_BADPAPERSIZE ,
RERR_BADORIENTATION = _RERR_BADORIENTATION ,
RERR_BADDUPLEX = _RERR_BADDUPLEX ,
RERR_BADIMAGEINTERP = _RERR_BADIMAGEINTERP ,
RERR_BADCOLORINTERP = _RERR_BADCOLORINTERP ,
RERR_BADHALFTONE = _RERR_BADHALFTONE ,
RERR_BADBRIGHTNESS = _RERR_BADBRIGHTNESS ,
RERR_BADCONTRAST = _RERR_BADCONTRAST ,
RERR_BADMIDTONE = _RERR_BADMIDTONE ,
RERR_BADLAMPCOLOR = _RERR_BADLAMPCOLOR ,
RERR_BADCOMPRESSION = _RERR_BADCOMPRESSION ,
RERR_BADFILETYPE = _RERR_BADFILETYPE ,
RERR_BADINDICATION = _RERR_BADINDICATION ,
RERR_CONFIGURATIONID = _RERR_CONFIGURATIONID ,
RERR_HOSTID = _RERR_HOSTID ,
RERR_SCSIID = _RERR_SCSIID ,
RERR_BADPARAMCOMBO = _RERR_BADPARAMCOMBO ,
RERR_LINE_TOO_WIDE = _RERR_LINE_TOO_WIDE ,
RERR_NOIMAGE = _RERR_NOIMAGE ,
RERR_BADIMAGEWIDTH = _RERR_BADIMAGEWIDTH ,
RERR_BADIMAGELENGTH = _RERR_BADIMAGELENGTH ,
RERR_NOAUTOROTATE = _RERR_NOAUTOROTATE ,
RERR_TRUNCATED = _RERR_TRUNCATED ,
RERR_NOTCAPABLE = _RERR_NOTCAPABLE ,
RERR_NOTCONNECTED = _RERR_NOTCONNECTED ,
RERR_NOTREADY = _RERR_NOTREADY ,
RERR_NOPAPER = _RERR_NOPAPER ,
RERR_PAPERJAM = _RERR_PAPERJAM ,
RERR_DOUBLEFEED = _RERR_DOUBLEFEED ,
RERR_COVEROPEN = _RERR_COVEROPEN ,
RERR_BOTHFEEDERSLOADED = _RERR_BOTHFEEDERSLOADED ,
RERR_RESERVED = _RERR_RESERVED ,
RERR_NOTRESERVED = _RERR_NOTRESERVED ,
RERR_SCANNERBUSY = _RERR_SCANNERBUSY ,
RERR_SCANNERSTOP = _RERR_SCANNERSTOP ,
RERR_SCANNERFAIL = _RERR_SCANNERFAIL ,
RERR_TIMEOUT = _RERR_TIMEOUT ,
RERR_USER_CANCELLED = _RERR_USER_CANCELLED ,
RERR_ABORTED = _RERR_ABORTED ,
RERR_NOTPOSSIBLE = _RERR_NOTPOSSIBLE ,
RERR_IMPRINTER_OFFPAPER = _RERR_IMPRINTER_OFFPAPER ,
RERR_IMPRINTER_LOWINK = _RERR_IMPRINTER_LOWINK ,
RERR_IMPRINTER_NOINK = _RERR_IMPRINTER_NOINK ,
RERR_PAPERPICK = _RERR_PAPERPICK ,
RERR_FILEPATH = _RERR_FILEPATH
}
Rsd Errors. More...

Functions

RECERR RECAPIKRN | kRecScanInit (HWND hWnd, LPCTSTR pScanIni, int iIniLoc, LPCTSTR pISISCustID)
Initializing the scanning subsystem.
RECERR RECAPIKRN | kRecScanQuit (void)
Closing the scanning subsystem.
RECERR RECAPIKRN | kRecScannerWizard (HWND hWnd, LPCTSTR pProduct)
Opening Scanner Wizard.
RECERR RECAPIKRN | kRecScannerWizardByName (HWND hWnd, LPCTSTR pScanner, LPCTSTR pProduct, INTBOOL bSilent)
Opening the Scanner Wizard for a given scanner.
RECERR RECAPIKRN | kRecGetAllScanners (int *pNum, LPCTSTR *pScanners)
Getting all available scanners.
RECERR RECAPIKRN | kRecGetScanners (int sid, int *pNum, LPCTSTR *pScanners)
Getting all initialized scanners.
RECERR RECAPIKRN | kRecDeleteScannerNames (LPCTSTR pScanners)
Deleting scanner name buffer.
RECERR RECAPIKRN | kRecSetScannerSelected (int sid, LPCTSTR pScanner, LPINTBOOL pCallWiz)
Selecting a scanner.
RECERR RECAPIKRN | kRecSetScannerUnselected (int sid)
Initializing the scanning subsystem.
RECERR RECAPIKRN | kRecGetScannerSelected (int sid, LPCTSTR *pScanner)
Getting the current scanner.
RECERR RECAPIKRN | kRecGetScanner (int sid, LPCTSTR *pScanner)
Getting the installed scanner.
RECERR RECAPIKRN | kRecGetScannerManufacturer (int sid, LPTSTR pManufacturer, size_t iSize)
Getting scanner manufacturer.
RECERR RECAPIKRN | kRecGetScannerModel (int sid, LPTSTR pModel, size_t iSize)
Getting scanner model.
RECERR RECAPIKRN | kRecGetScannerVersion (int sid, LPTSTR pVersion, size_t buflen)
Getting scanner version.
RECERR RECAPIKRN | kRecReserveScanner (int sid)
Reserving the selected scanner.
RECERR RECAPIKRN | kRecReleaseScanner (int sid)
Releasing a reserved scanner.
RECERR RECAPIKRN | kRecCheckScannerInterface (int sid)
Checking availability of the interface of the selected scanner.
RECERR RECAPIKRN | kRecCheckScannerReady (int sid)
Checking readiness of the selected scanner.
RECERR RECAPIKRN | kRecResetScanner (int sid)
Resetting the selected scanner.
RECERR RECAPIKRN | kRecSetScanDefaults (int sid)
Setting scanner parameters to default.
RECERR RECAPIKRN | kRecSetScanParamsBySettings (int sid)
Sending the setting values to the scanning subsystem.
RECERR RECAPIKRN | kRecGetScanStartModeCapa (int sid, RSDST *pStart)
Getting starting mode capabilities.
RECERR RECAPIKRN | kRecSetScanStartMode (int sid, RSDST Start)
Setting starting mode.
RECERR RECAPIKRN | kRecGetScanStartMode (int sid, RSDST *pStart)
Getting starting mode.
RECERR RECAPIKRN | kRecGetScanPaperSourceCapa (int sid, RSDPS *pSource)
Getting paper source capabilities.
RECERR RECAPIKRN | kRecSetScanPaperSource (int sid, RSDPS PaperSource)
Setting paper source.
RECERR RECAPIKRN | kRecGetScanPaperSource (int sid, RSDPS *pSource)
Getting paper source.
RECERR RECAPIKRN | kRecScanPreloadADF (int sid)
Preloading the ADF.
RECERR RECAPIKRN | kRecScanUnloadADF (int sid)
Unloading the ADF.
RECERR RECAPIKRN | kRecScanReloadADF (int sid)
Reloading the ADF.
RECERR RECAPIKRN | kRecGetScanDuplexCapa (int sid, RSDDX *pDuplex)
Getting duplex scanning capabilities.
RECERR RECAPIKRN | kRecSetScanDuplex (int sid, RSDDX Duplex)
Setting duplex scanning mode.
RECERR RECAPIKRN | kRecGetScanDuplex (int sid, RSDDX *pDuplex)
Getting duplex scanning mode.
RECERR RECAPIKRN | kRecGetScanResolutionCapa (int sid, RSDRS *pResolCapa)
Getting resolution capabilities.
RECERR RECAPIKRN | kRecSetScanResolution (int sid, UINT Resolution)
Setting resolution.
RECERR RECAPIKRN | kRecGetScanResolution (int sid, UINT *pResolution)
Getting resolution.
RECERR RECAPIKRN | kRecGetScanStandardPaperSize (RSDPP Paper, LPSIZE pSize)
Getting standard paper size.
RECERR RECAPIKRN | kRecGetScannerSize (int sid, LPSIZE pSize)
Getting maximum scanning area size.
RECERR RECAPIKRN | kRecGetScannerFlatbedSize (int sid, LPSIZE pSize)
Getting flat-bed size.
RECERR RECAPIKRN | kRecGetScannerADFSize (int sid, LPSIZE pSize)
getting ADF size
RECERR RECAPIKRN | kRecGetScannerTransparencySize (int sid, LPSIZE pSize)
Getting transparency unit size.
RECERR RECAPIKRN | kRecGetPaperSizesSupported (int sid, size_t *pSize, RSDPP *PaperSizes, RSDPO *Orientations, RSDPS PaperSource)
Retrieving a list of standard paper sizes supported by the scanner.
RECERR RECAPIKRN | kRecIsScanPaperSizeSupported (int sid, RSDPP PaperSize, INTBOOL Portrait, RSDPS PaperSource, LPINTBOOL pSupp)
Checking paper size support.
RECERR RECAPIKRN | kRecSetScanPaperSize (int sid, LPCSIZE pPaperSize)
Setting paper size.
RECERR RECAPIKRN | kRecGetScanPaperSize (int sid, LPSIZE pPaperSize)
Getting paper size.
RECERR RECAPIKRN | kRecSetScanArea (int sid, LPCRECT pRect)
Setting scanning area.
RECERR RECAPIKRN | kRecGetScanArea (int sid, LPRECT pRect)
Getting scanning area.
RECERR RECAPIKRN | kRecGetScanOrientationCapa (int sid, RSDOR *pOrientation)
Getting orientation capabilities.
RECERR RECAPIKRN | kRecSetScanOrientation (int sid, RSDOR Orientation)
Setting orientation.
RECERR RECAPIKRN | kRecGetScanOrientation (int sid, RSDOR *pOrientation)
Getting orientation.
RECERR RECAPIKRN | kRecGetScanAutoBrightnessCapa (int sid, LPINTBOOL bAuto)
Getting automatic brightness control capability.
RECERR RECAPIKRN | kRecGetScanBrightnessMaxVal (int sid, UINT *pBrMax)
Getting number of brightness steps.
RECERR RECAPIKRN | kRecGetScanBrightnessDefVal (int sid, UINT *pBrDef)
Getting default brightness.
RECERR RECAPIKRN | kRecSetScanBrightnessVal (int sid, UINT Brightness)
Setting brightness.
RECERR RECAPIKRN | kRecGetScanBrightnessVal (int sid, UINT *pBrightness)
Getting brightness.
RECERR RECAPIKRN | kRecSetScanBrightness (int sid, UINT Brightness)
Setting brightness in %.
RECERR RECAPIKRN | kRecGetScanBrightness (int sid, UINT *pBrightness)
Getting brightness in %.
RECERR RECAPIKRN | kRecGetScanContrastMaxVal (int sid, UINT *pCrMax)
Getting number of contrast steps.
RECERR RECAPIKRN | kRecGetScanContrastDefVal (int sid, UINT *pCrDef)
Getting default of contrast.
RECERR RECAPIKRN | kRecSetScanContrastVal (int sid, UINT Contrast)
Setting contrast.
RECERR RECAPIKRN | kRecGetScanContrastVal (int sid, UINT *pContrast)
Getting contrast.
RECERR RECAPIKRN | kRecSetScanContrast (int sid, UINT Contrast)
Setting contrast in %.
RECERR RECAPIKRN | kRecGetScanContrast (int sid, UINT *pContrast)
Getting contrast in %.
RECERR RECAPIKRN | kRecGetScanBitsPerSampleCapa (int sid, RSDII *pBps)
Getting scanning mode capabilities.
RECERR RECAPIKRN | kRecSetScanBitsPerSample (int sid, RSDII Bps)
Setting scanning mode.
RECERR RECAPIKRN | kRecGetScanBitsPerSample (int sid, RSDII *pBps)
Getting scanning mode.
RECERR RECAPIKRN | kRecGetScanDropoutCapa (int sid, RSDLC *pColor)
Getting dropout color capabilities.
RECERR RECAPIKRN | kRecSetScanDropout (int sid, RSDLC Color)
Setting dropout color.
RECERR RECAPIKRN | kRecGetScanDropout (int sid, RSDLC *pColor)
Getting dropout color.
RECERR RECAPIKRN | kRecGetScanAdjustCapa (int sid, RSDAD *pAdjust)
Getting adjustable capabilities.
RECERR RECAPIKRN | kRecGetScanADF (int sid, RSDAS *pAdf)
Getting ADF status.
RECERR RECAPIKRN | kRecSetScanErrorMode (int sid, INTBOOL Ignore)
Setting error mode.
RECERR RECAPIKRN | kRecGetScanErrorMode (int sid, INTBOOL *pIgnore)
Getting error mode.
RECERR RECAPIKRN | kRecSetScanParamSource (int sid, INTBOOL FromScanner)
Setting the source of parameters.
RECERR RECAPIKRN | kRecGetScanParamSource (int sid, INTBOOL *pFromScanner)
Getting the source of parameters.
RECERR RECAPIKRN | kRecScanPage (int sid, LPCTSTR pImgFile, IMF_FORMAT ImgFileFormat)
Scanning a page.
RECERR RECAPIKRN | kRecScanPages (int sid, LPCTSTR pImgFile, IMF_FORMAT ImgFileFormat, LPONETOUCH_CB pCallBack, void *pContext)
Scanning pages.

Location of the scanner initialization file

See kRecScanInit.

#define | SCINI_APPDATA 0
In the user's data folder of the application.
#define | SCINI_COMMAPPDATA 1
In the common data folder of the application.
#define | SCINI_INSTALL 2
Among executable binaries in the install folder.
#define | SCINI_CURRENT 3
In the current working folder.
#define | SCINI_ROAMINGAPPDATA 4
In the user's roaming data folder of the application.

Detailed Description

This is the Scanner API of the KernelAPI. The Scanning Module is supported on: Windows.

Initialization

When scanning is required, the Engine's scanning subsystem must be initialized separately. The reason for this additional initialization is that the scanning subsystem can work on its own without the recognition or other non-essential modules. It supports a wide selection of scanner models through TWAIN or WIA.

There is no point in initializing the scanning subsystem if there is no working scanner connected to the computer.

Preparing the scanning subsystem for scanning requires the following steps:

  • The scanning subsystem must be initialized for actual scanning by the kRecScanInit function. Any other scanning function can only be called after the successful initialization of the scanning subsystem.
  • The scanner type must be set through the kRecScannerWizard function that will launch the Scanner Setup Wizard.

Note that the Scanner Setup Wizard resides in a DLL, though it can also be launched through the SCANNERWIZARD.EXE executable. For the command-line options of this executable, launch it as follows:

SCANNERWIZARD.EXE /?

The Scanner Setup Wizard supports a wide range of popular scanner models. You can update your scanning system through the Wizard by downloading a hint file from the Internet.

To initiate a scanning session, call the initializing kRecScanInit function, to terminate the running of the scanning subsystem call the kRecScanQuit function. The first parameter of the kRecScanInit function must contain the window handle of the main window of the integrating application. For details, code sample and backward compatibility, see the notes in kRecScanInit.

Both the Scanner Setup Wizard and the entire scanning subsystem can be distributed along with your integrating application. For further information, see the topic Distributing applications in the General Information help system.

Loading images from scanner

After having initialized the scanning subsystem and adjusting particular scanning parameters (if required), the application uses the function kRecLoadImg with the special HIMGFILE value IMGF_SCANNER. Of course, this special handle requires neither opening (kRecOpenImgFile) nor closing (kRecCloseImgFile). The Engine causes the scanner to scan the page (or part of it) and loads the image from the scanner into an HPAGE.

Since scanner models differ in capabilities and in possible parameter values, before you modify a parameter, you can retrieve the settings supported by the given scanner and the range of each of the settings. For example, you can retrieve the supported resolutions, whether the scanner supports color scanning, dropout colors or what the size of the maximum scanning area is (e.g. kRecGetScanBitsPerSampleCapa or kRecGetScanResolutionCapa). Once the application is aware of the scanning capabilities of the installed scanner driver/type, the application can adjust or learn the current scanning parameter settings by accessing the kRecSetScan* and kRecGetScan* functions, respectively.

One of the most important settings specifies what kind of image the scanner must provide, i.e. whether the image output from the scanner should be B/W, grayscale or color. This setting can be specified through the kRecSetScanBitsPerSample function.

The brightness and the contrast parameters can be set either relatively as percentages, or by using the scanner’s native values. To work with native values, the maximum setting values for the given scanner model can be acquired with the functions kRecGetScanBrightnessMaxVal and kRecGetScanContrastMaxVal. Since a few scanners do not support brightness/contrast settings, these two functions can also be used for checking these scanner capabilities.

To set the absolute parameter values, use the kRecSetScanBrightnessVal and kRecSetScanContrastVal functions. To set the percentage values, use kRecSetScanBrightness and kRecSetScanContrast.

Different ways of adjusting scanner settings

The settings of the Scanning Module may be adjusted through the Settings Manager Module as well. All previously selected scanners and the currently selected one have an individual setting subtree under the node Scanners. For example, the scanner XXX has the subtree Scanners.XXX^ (the string XXX^ is created from XXX and may differ from XXX in some special character, below we refer the sign ^ to the name of the node created from the real name of the scanner). These settings can be adjusted directly through the Settings Manager Module or settings for the currently selected scanner can be adjusted indirectly through the functions kRecSetScan*. For example, the brightness can be accessed through Scanners.XXX^.Brightness or kRecSetScanBrightness.

Another way to use the settings of the selected scanner is the symbolic link setting Kernel.Scanner. This setting contains the name of the root node of the selected scanner (see kRecSetScannerSelected). Furthermore, this is the root of the setting subtree made up of reference settings pointing onto the proper settings of the selected scanner. In detail, if the selected scanner is the XXX, the above-mentioned setting Scanners.XXX^.Brightness can be accessed also through Kernel.Scanner.Brightness. Using this reference or the function kRecSetScanBrightness is recommended rather than the direct way, because if the selected scanner is changed say to YYY they will access the setting Scanners.YYY^.Brightness as expected. See also the description of Symbolic links.

Because these reference settings may refer to different real settings at different times, there is no point in saving their values. Instead of this, the values of the real settings should be saved/loaded.

The function kRecSetScannerSelected modifies the value of the settings Kernel.Scanner, Kernel.Scanner.Name, Scanners and builds up the setting subtree of the currently selected scanner (if it does not exist yet), which will be under the Scanners node. The value of Kernel.Scanner will be the name of the node of the selected scanner (e.g. Scanners.XXX^). The value of Kernel.Scanner.Name and Scanners will be the real name (i.e. XXX) of the selected scanner. Thus, it does make sense to save the value of the setting Scanners, and after a load, passing its value to kRecSetScannerSelected for selecting the same scanner that was used at saving.

I.e. the function kRecSetScannerSelected requires the real name of the scanner!

Note
Functions retrieving scan parameters can get their returned values from two different sources: from the scanning system or from the corresponding setting. Normally these values are the same but in special cases (e.g. after loading a setting file) they can be different in which cases the functions return with a warning status. There are two different ways to synchronize the settings and the values stored by the scanning system.
  • kRecSetScanParamsBySettings copies the values from the settings of the current scanner to the scanning system.
  • the appropriate function (kRecSetScan*) sets the same new value both in the setting and in the scanning system.

See also Settings of the Scanner Module.

Example

Simplified scanner interaction (see also Sample 21)

int sid = 0;
RECERR rc;
HWND hwnd;
HPAGE hPage;
RSDAS adf;
RSDLC colorcapa;
RSDII bpscapa;
// Preferred settings for scanning:
RSDLC dropout_color = RSDLC_RED;
RSDII bps = RSDII_GRAY8;
BOOL bNativeUIEnabled = FALSE;
. . .
rc = kRecScanInit(hwnd, NULL, SCINI_APPDATA, NULL);
rc = kRecSetScannerSelected( sid, NULL, NULL );
. . .
rc = kRecGetScanBitsPerSampleCapa(sid, &bpscapa);
if (bpscapa == 0) {
bNativeUIEnabled = TRUE;
// The scanner's native UI is enabled.
// Could not determine the scanner's capability
} else {
bps = (bpscapa & bps) ? RSDII_GRAY8 : RSDII_BW;
}
rc = kRecSetScanBitsPerSample(sid, bps);
if (!bNativeUIEnabled) {
rc = kRecGetScanDropoutCapa(sid, &colorcapa);
if (colorcapa & dropout_color) {
rc = kRecSetScanDropout(sid, dropout_color);
printf("Dropout scanning will be used");
}
}
do {
rc = kRecLoadImg(sid, IMGF_SCANNER, &hPage, 0);
. . .
// the image is processed here
. . .
rc = kRecFreeImg(hPage);
rc = kRecGetScanADF(sid, &adf);
} while (adf == RSDAS_ADF_READY || adf == RSDAS_BACKSIDE_READY);
. . .
rc = kRecScanQuit();
. . .
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecFreeImg
RECERR RECAPIKRN kRecFreeImg(HPAGE hPage)
Removing a page.
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
IMGF_SCANNER
#define IMGF_SCANNER
Image input from scanner. (Use it with kRecLoadImg.)
Definition KernelApi.h:11252
kRecLoadImg
RECERR RECAPIKRN kRecLoadImg(int sid, HIMGFILE hIFile, HPAGE *phPage, int iPage)
Loading a page from an opened image file.
kRecScanQuit
RECERR RECAPIKRN kRecScanQuit(void)
Closing the scanning subsystem.
kRecGetScanBitsPerSampleCapa
RECERR RECAPIKRN kRecGetScanBitsPerSampleCapa(int sid, RSDII *pBps)
Getting scanning mode capabilities.
SCINI_APPDATA
#define SCINI_APPDATA
In the user's data folder of the application.
Definition KrnScanAPI.h:28
RSDAS
RSDAS
ADF/transparency adapter status (G)
Definition KrnScanTypes.h:500
kRecSetScannerSelected
RECERR RECAPIKRN kRecSetScannerSelected(int sid, LPCTSTR pScanner, LPINTBOOL pCallWiz)
Selecting a scanner.
RSDLC
RSDLC
Lamp or filter color (G/S)
Definition KrnScanTypes.h:351
kRecGetScanDropoutCapa
RECERR RECAPIKRN kRecGetScanDropoutCapa(int sid, RSDLC *pColor)
Getting dropout color capabilities.
kRecScanInit
RECERR RECAPIKRN kRecScanInit(HWND hWnd, LPCTSTR pScanIni, int iIniLoc, LPCTSTR pISISCustID)
Initializing the scanning subsystem.
kRecGetScanADF
RECERR RECAPIKRN kRecGetScanADF(int sid, RSDAS *pAdf)
Getting ADF status.
kRecSetScanBitsPerSample
RECERR RECAPIKRN kRecSetScanBitsPerSample(int sid, RSDII Bps)
Setting scanning mode.
kRecSetScanDropout
RECERR RECAPIKRN kRecSetScanDropout(int sid, RSDLC Color)
Setting dropout color.
RSDII
RSDII
Image interpretation (G/S)
Definition KrnScanTypes.h:277
RSDAS_BACKSIDE_READY
@ RSDAS_BACKSIDE_READY
Definition KrnScanTypes.h:505
RSDAS_ADF_READY
@ RSDAS_ADF_READY
Definition KrnScanTypes.h:503
RSDLC_RED
@ RSDLC_RED
Definition KrnScanTypes.h:354
RSDII_BW
@ RSDII_BW
Definition KrnScanTypes.h:279
RSDII_GRAY8
@ RSDII_GRAY8
Definition KrnScanTypes.h:282

The program fragment above retrieves the scanner's scanning mode and dropout color capabilities and, if available, specifies RED as the dropout color. The actual scanning happens during the kRecLoadImg call. The kRecGetScanADF call in the do-while-loop is used to learn whether the Automatic Document Feeder (ADF) contains further pages or is empty.

IMPORTANT: During scanning the integrating application should disable all functionalities that can interfere with the scanning. For example, the application should not allow the user to terminate it by any means.

The whole scanning module is now thread safe, so it is possible to initiate two scanning processes in parallel, using two scanners. Calls from two different threads to a single scanner are queued.

Other scanner related topics

Settings of the Scanning Module
Standard paper sizes

Note
In the enum definitions below, the following notations are used:
  • (G) get only,
  • (G/S) get/set.
Capability masks of the enum types do not cover get only flags.

Typedef Documentation

◆ RSDAF

typedef enum RSDAF RSDAF

Application flags.

Remarks
These flags specify the behavior of RSD in some respects as necessary for the application. These flags can be overridden by the corresponding entries in the [RSD] section of the INI file.

◆ RSDCI

typedef enum RSDCI RSDCI

Color interpretation (G/S)

Remarks
The elements of this enum can be grouped into the following classes:
  • Inversion: RSDCI_BLACK0 and RSDCI_WHITE0,
  • Bit order: RSDCI_MSBFIRST and RSDCI_LSBFIRST,
  • Color mode: from RSDCI_RGB to RSDCI_PALETTE.
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDPS_CAP...

◆ RSDCM

typedef enum RSDCM RSDCM

Compression (G/S)

Remarks
Masks of this enum type show the flags that can be used in different modes.

◆ RSDDF

typedef enum RSDDF RSDDF

Double feed detection.

Some scanners are able to detect if the ADF fed two pages at once. There are two methods to detect this situation: by length and by thickness. The return status of the scanning function may reflect this kind of error.

◆ RSDDX

typedef enum RSDDX RSDDX

Duplex scanning (G/S)

Remarks
The elements of this enum can be grouped into the following classes:
  • One sided: RSDDX_SINGLE or RSDDX_SIMPLEX (these are synonyms),
  • Two sided, margin settings: RSDDX_DUPLEX_PAGE and RSDDX_DUPLEX_BOOK,
  • Two sided, flip settings: RSDDX_DUPLEX_FLIP_BOOK and RSDDX_DUPLEX_FLIP_TABLET,
  • Two sided, merge settings: RSDDX_DUPLEX_MERGE_BOOK and RSDDX_DUPLEX_MERGE_TABLET.
Flags of "two sided" classes can be combined with each other. For any duplex mode at least one flag of "two sided" classes should be set. The flags of each class can be masked with capability masks RSDDX_CAP....

◆ RSDFS

typedef enum RSDFS RSDFS

File types for scanning to/from file (G/S)

Remarks
Masks of this enum type show the flags that can be used in different modes.

◆ RSDII

typedef enum RSDII RSDII

Image interpretation (G/S)

Remarks
The elements of this enum can be grouped into the following classes:
  • Image mode: from RSDII_BW to RSDII_COLOR8,
  • Color arrangement: from RSDII_PACKED to RSDII_PAGES.
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDII_CAP...

◆ RSDPP

typedef enum RSDPP RSDPP

Standard paper sizes.

Remarks
The elements of this enum can be grouped into the following classes:
  • ISO: from RSDPP_A0 to RSDPP_C8,
  • JIS (Japanese): RSDPP_...JIS,
  • ANSI (US engineering): from RSDPP_A to RSDPP_E,
  • North American: from RSDPP_STATEMENT to RSDPP_DLETTER,
  • North American envelopes: from RSDPP_PERSONAL to RSDPP_COM14,
  • Other: from RSDPP_COUPON to RSDPP_BCHECK.

◆ RSDPS

typedef enum RSDPS RSDPS

Paper source (G/S)

Remarks
The elements of this enum can be grouped into the following classes:
  • Image source: from RSDPS_CAMERA to RSDPS_TRANSP,
  • Flatbed property: RSDPS_FLATBED_SPLIT,
  • ADF properties: from RSDPS_ADF_AUTOLOAD to RSDPS_ADFSTAT_AFTERSCAN,
  • Immediate actions: from RSDPS_ADF_PRELOAD to RSDPS_ADF_RELOAD.
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDPS_CAP... and RSDPS_ACT.

◆ RSDST

typedef enum RSDST RSDST

Start mode (G/S)

Remarks
The elements of this enum can be grouped into the following classes:
  • Start event: RSDST_IMMEDIATE,
  • UI mode: RSDST_UI_...
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDST_CAP...

◆ RSDWZ

typedef enum RSDWZ RSDWZ

Wizard flags.

Remarks
These flags specify the behavior of the new Scanner Setup Wizard (SSW)

Enumeration Type Documentation

◆ RERR

enum RERR

Rsd Errors.

Enumerator
RERR_INTERNAL | Internal error
RERR_OK | No error
RERR_FAIL | General failure
RERR_NA | Feature not available
RERR_ACCESS | Access violation
RERR_CORRUPTED | Internal data structures corrupted
RERR_NOMEMORY | No memory available
RERR_MEMORYFAIL | Failed to lock or free memory
RERR_NOFILE | File not found
RERR_CREATEFAIL | File creation error
RERR_OPENFAIL | File open error
RERR_READONLY | Read-only file attribute
RERR_READFAIL | File read error
RERR_WRITEFAIL | File write error
RERR_CLOSEFAIL | File close error
RERR_FILECORRUPTED | Structure of file corrupted
RERR_NOMSGFILE | Message text file not found
RERR_NOMESSAGE | Message not found
RERR_DLL_NOFILE | DLL not found
RERR_DLL_FORMAT | DLL has invalid format
RERR_DLL_GETPROC | Cannot find function in DLL
RERR_NOTOPENED | Scanner driver not opened
RERR_NOTLOADED | Scanner driver not loaded
RERR_NODRIVER | Scanner driver not found
RERR_BADVERSION | Invalid scanner driver version
RERR_DRIVERFAIL | Scanner driver error
RERR_NOCARD | Scanner interface card not found
RERR_BADHANDLE | Invalid spec ID
RERR_PARAMID | Invalid parameter ID specified
RERR_PARAMVALUE | Invalid parameter value specified
RERR_BADADFCOMMAND | Invalid ADF command
RERR_BADSTARTMODE | Invalid scan start mode setting
RERR_BADTRANSFER | Invalid scan image transfer mode setting
RERR_BADPAPERSOURCE | Invalid scan paper source setting
RERR_BADRESOLUTION | Invalid scan resolution setting
RERR_BADMARGIN | Invalid scan margin setting
RERR_BADPAPERSIZE | Invalid scan paper size setting
RERR_BADORIENTATION | Invalid scan orientation setting
RERR_BADDUPLEX | Invalid duplex scan setting
RERR_BADIMAGEINTERP | Invalid image interpretation setting
RERR_BADCOLORINTERP | Invalid color interpretation setting
RERR_BADHALFTONE | Invalid halftone setting
RERR_BADBRIGHTNESS | Invalid scan brightness setting
RERR_BADCONTRAST | Invalid scan contrast setting
RERR_BADMIDTONE | Invalid scan midtone setting
RERR_BADLAMPCOLOR | Invalid scan lamp color setting
RERR_BADCOMPRESSION | Invalid compression setting
RERR_BADFILETYPE | Invalid image file type setting
RERR_BADINDICATION | Invalid scan indication setting
RERR_CONFIGURATIONID | Invalid configuration ID setting
RERR_HOSTID | Invalid host ID setting
RERR_SCSIID | Invalid SCSI ID setting
RERR_BADPARAMCOMBO | Invalid parameter combination
RERR_LINE_TOO_WIDE | Line too wide to handle
RERR_NOIMAGE | Image does not exist
RERR_BADIMAGEWIDTH | Image width too small or too large
RERR_BADIMAGELENGTH | Image length too small or too large
RERR_NOAUTOROTATE | Image too large for autorotate
RERR_TRUNCATED | User buffer too small
RERR_NOTCAPABLE | Scanner not capable
RERR_NOTCONNECTED | Scanner not connected
RERR_NOTREADY | Scanner not ready
RERR_NOPAPER | Scanner ADF empty
RERR_PAPERJAM | Scanner ADF paper jam
RERR_DOUBLEFEED | Scanner ADF double feed
RERR_COVEROPEN | Scanner ADF cover open
RERR_BOTHFEEDERSLOADED | Both feeders are loaded
RERR_RESERVED | Scanner already reserved
RERR_NOTRESERVED | Scanner not reserved
RERR_SCANNERBUSY | Scanner busy
RERR_SCANNERSTOP | Stop button pushed on scanner
RERR_SCANNERFAIL | Unspecified scanner error
RERR_TIMEOUT | Timeout (RSD or scanner)
RERR_USER_CANCELLED | User cancelled operation
RERR_ABORTED | Operation/action aborted
RERR_NOTPOSSIBLE | Operation not possible
RERR_IMPRINTER_OFFPAPER | Bad imprinter position
RERR_IMPRINTER_LOWINK | Low ink level in imprinter
RERR_IMPRINTER_NOINK | No ink cartridge in imprinter
RERR_PAPERPICK | The ADF cannot pick up the paper
RERR_FILEPATH | Invalid file path or file name

◆ RSDAD

enum RSDAD

Adjustable parameters (G)

Enumerator
RSDAD_RESOLUTION | resolution in both directions
RSDAD_PAPERSIZE | paper size
RSDAD_AUTOPAPERSIZE | auto-papersize
RSDAD_MARGINS | margins
RSDAD_BRIGHTNESS | brightness
RSDAD_AUTOBRIGHTNESS | auto-brightness
RSDAD_CONTRAST | contrast
RSDAD_AUTOCONTRAST | auto-contrast
RSDAD_MIDTONE | midtone
RSDAD_SHARPNESS | sharpness
RSDAD_LAMPCOLOR | lamp or filter (dropout) color
RSDAD_SCAN2FILEONLY | scanning is possible to file only (RSDFS_NO is not useful)
RSDAD_UI_SHOW | user interface can be shown
RSDAD_UI_HIDE | user interface can be hidden
RSDAD_SCANPARAMFILE | scan parameters can be stored in a file
RSDAD_IMPRINTER | imprinter/endorser

◆ RSDAF

enum RSDAF

Application flags.

Remarks
These flags specify the behavior of RSD in some respects as necessary for the application. These flags can be overridden by the corresponding entries in the [RSD] section of the INI file.
Enumerator
RSDAF_CHECKADF | "CheckADF": check ADF capabilities anyway
RSDAF_SETUITOPMOST | "SetUITopmost": keep the UI in the topmost position
RSDAF_PALETTESUPPORT | "PaletteSupport": images with palette are acceptable
RSDAF_COMPRESSEDIMAGES | "CompressedImages": compressed images are acceptable
RSDAF_IMAGEFILES | "ImageFiles": file names of prescanned images are acceptable

◆ RSDAS

enum RSDAS

ADF/transparency adapter status (G)

Enumerator
RSDAS_ADF_EMPTY | ADF empty
RSDAS_ADF_READY | ADF ready
RSDAS_ADF_JOBSEPARATOR | job separator sheet detected in ADF
RSDAS_BACKSIDE_READY | second side of duplex scan is available
RSDAS_TRANSP_NOTREADY | transparency adapter not ready
RSDAS_TRANSP_READY | transparency adapter ready
RSDAS_NOTCONNECTED | ADF / transparency adapter not connected
RSDAS_COVEROPEN | ADF / transparency adapter cover open
RSDAS_ADF_PAPERJAM | ADF paper jam
RSDAS_ADF_DOUBLEFEED | ADF double feed
RSDAS_ADF_BOTHLOADED | Both feeders (trays) are loaded
RSDAS_SPLIT_READY | next area from flatbed is ready

◆ RSDCI

enum RSDCI

Color interpretation (G/S)

Remarks
The elements of this enum can be grouped into the following classes:
  • Inversion: RSDCI_BLACK0 and RSDCI_WHITE0,
  • Bit order: RSDCI_MSBFIRST and RSDCI_LSBFIRST,
  • Color mode: from RSDCI_RGB to RSDCI_PALETTE.
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDPS_CAP...
Enumerator
RSDCI_BLACK0 | black is 0
RSDCI_WHITE0 | white is 0
RSDCI_MSBFIRST | MSBit is the leftmost
RSDCI_LSBFIRST | LSBit is the leftmost
RSDCI_RGB | RGB
RSDCI_CMY | CMY
RSDCI_CMYK | CMYK
RSDCI_YUV | YUV or YCbCr
RSDCI_YUVK | YUVK
RSDCI_CIEXYZ | CIE XYZ
RSDCI_PALETTE | palette
RSDCI_CAPBW | inversion capability mask
RSDCI_CAPML | bit order capability mask
RSDCI_CAP | color mode capability mask

◆ RSDCM

enum RSDCM

Compression (G/S)

Remarks
Masks of this enum type show the flags that can be used in different modes.
Enumerator
RSDCM_NO | no compression
RSDCM_RAW | Uncompressed
RSDCM_PACKBITS | PackBits
RSDCM_CCITTG31DNE | CCITT G3/1D w/o EOL
RSDCM_CCITTG31D | CCITT G3/1D w/ EOL
RSDCM_CCITTG32D | CCITT G3/2D
RSDCM_CCITTG4 | CCITT G4/2D
RSDCM_LZW | LZW
RSDCM_JPEG | JPEG
RSDCM_ZIP | ZIP
RSDCM_PCX | PCX
RSDCM_BMP | Windows Bitmap
RSDCM_RLE4 | RLE4
RSDCM_RLE8 | RLE8
RSDCM_BITFIELDS | Bitfields
RSDCM_JBIG | JBIG
RSDCM_GIF | GIF
RSDCM_PICT | Macintosh PICT
RSDCM_PNG | PNG
RSDCM_JPEG2000 | JPEG 2000
RSDCM_DECOMP | not supported anymore
RSDCM_NOSCAN | not supported anymore
RSDCM_FILE | indication of file transfer
RSDCM_CAP | overall capability mask
RSDCM_BW | B/W capability mask
RSDCM_GRAY4 | 4-bit gray capability mask
RSDCM_GRAY8 | 8-bit gray capability mask
RSDCM_COLOR1 | 3*1-bit color capability mask
RSDCM_COLOR4 | 3*4-bit color capability mask
RSDCM_COLOR8 | 3*8-bit color capability mask

◆ RSDDF

enum RSDDF

Double feed detection.

Some scanners are able to detect if the ADF fed two pages at once. There are two methods to detect this situation: by length and by thickness. The return status of the scanning function may reflect this kind of error.

Enumerator
RSDDF_NONE | no detection
RSDDF_LENGTH_LOW | detection by length, low sensitivity
RSDDF_LENGTH_NORMAL | detection by length, normal sensitivity
RSDDF_LENGTH_HIGH | detection by length, high sensitivity
RSDDF_LENGTH_VALUE | detection by length, value on low word
RSDDF_THICKNESS_LOW | detection by thickness, low sensitivity
RSDDF_THICKNESS_NORMAL | detection by thickness, normal sensitivity
RSDDF_THICKNESS_HIGH | detection by thickness, high sensitivity
RSDDF_THICKNESS_VALUE | detection by thickness, value on low word
RSDDF_CAP | capability mask
RSDDF_CAPL | capability mask for length
RSDDF_CAPT | capability mask for thickness
RSDDF_VAL | value mask

◆ RSDDX

enum RSDDX

Duplex scanning (G/S)

Remarks
The elements of this enum can be grouped into the following classes:
  • One sided: RSDDX_SINGLE or RSDDX_SIMPLEX (these are synonyms),
  • Two sided, margin settings: RSDDX_DUPLEX_PAGE and RSDDX_DUPLEX_BOOK,
  • Two sided, flip settings: RSDDX_DUPLEX_FLIP_BOOK and RSDDX_DUPLEX_FLIP_TABLET,
  • Two sided, merge settings: RSDDX_DUPLEX_MERGE_BOOK and RSDDX_DUPLEX_MERGE_TABLET.
Flags of "two sided" classes can be combined with each other. For any duplex mode at least one flag of "two sided" classes should be set. The flags of each class can be masked with capability masks RSDDX_CAP....
Enumerator
RSDDX_SINGLE | single sided
RSDDX_SIMPLEX | simplex mode
RSDDX_DUPLEX_PAGE | duplex mode, same margins (default)
RSDDX_DUPLEX_BOOK | duplex mode, mirrored margins
RSDDX_DUPLEX_FLIP_BOOK | duplex mode, flip along vertical edge (default)
RSDDX_DUPLEX_FLIP_TABLET | duplex mode, flip along horizontal edge
RSDDX_DUPLEX_MERGE | duplex mode, merge front and back images, return one image only
RSDDX_DUPLEX_MERGE_BOOK | duplex mode, merge front and back images along vertical edge, return one image only
RSDDX_DUPLEX_MERGE_TABLET | duplex mode, merge front and back images along horizontal edge, return one image only
RSDDX_CAP | modes by margin settings
RSDDX_CAPFL | modes by flip settings
RSDDX_CAPMG | modes by merge setting
RSDDX_CAPALL | all modes

◆ RSDFS

enum RSDFS

File types for scanning to/from file (G/S)

Remarks
Masks of this enum type show the flags that can be used in different modes.
Enumerator
RSDFS_NO | no file
RSDFS_TIFF | to TIFF #1 uncompressed
RSDFS_TIFF_PACKBITS | to TIFF #32773 compressed PackBits
RSDFS_TIFF_G31DNE | to TIFF #2 compressed CCITT G3/1D w/o EOL
RSDFS_TIFF_G31D | to TIFF #3 compressed CCITT G3/1D w/ EOL
RSDFS_TIFF_G32D | to TIFF #3 compressed CCITT G3/2D
RSDFS_TIFF_G4 | to TIFF #4 compressed CCITT G4/2D
RSDFS_TIFF_LZW | to TIFF #5 compressed LZW
RSDFS_TIFF_JPEG | to TIFF #6 compressed JPEG
RSDFS_TIFF_ZIP | to TIFF compressed ZIP
RSDFS_PCX | to PCX
RSDFS_BMP | to Windows Bitmap
RSDFS_BMP_RLE4 | to BMP compressed RLE4
RSDFS_BMP_RLE8 | to BMP compressed RLE8
RSDFS_JPEG | to JPEG
RSDFS_WMF | to Windows Metafile
RSDFS_JBIG | to JBIG
RSDFS_GIF | to GIF
RSDFS_PICT | to Macintosh PICT
RSDFS_XBM | to X-Windows Bitmap
RSDFS_JFIF | to JPEG File Interchange Format
RSDFS_FPX | to Flash Pix
RSDFS_PNG | to PNG
RSDFS_SPIFF | to SPIFF (JPEG, JBIG)
RSDFS_EXIF | to EXIF (TIFF, JPEG)
RSDFS_DCX | to DCX
RSDFS_JPEG2000 | to JPEG 2000
RSDFS_PDF | to PDF
RSDFS_EMF | to Enhanced Metafile
RSDFS_MULTIPAGE | to Multi-page file (must be ORed with one of RSDFS_*)
RSDFS_READ | from any file above
RSDFS_CAP | overall capability mask
RSDFS_CAPMULTI | multipage file capability mask
RSDFS_BW | B/W capability mask
RSDFS_GRAY4 | 4-bit gray capability mask
RSDFS_GRAY8 | 8-bit gray capability mask
RSDFS_COLOR1 | 3*1-bit color capability mask
RSDFS_COLOR4 | 3*4-bit color capability mask
RSDFS_COLOR8 | 3*8-bit color capability mask

◆ RSDHT

enum RSDHT

Halftone patterns (G)

Enumerator
RSDHT_NONE | unknown type/size
RSDHT_SIZE | pattern size mask
RSDHT_ERRDIFF | error diffused
RSDHT_BAYER | bayer
RSDHT_SPIRAL | spiral
RSDHT_FATTING | fatting
RSDHT_HORIZONTAL | horizontal
RSDHT_VERTICAL | vertical
RSDHT_DIAGONAL | diagonal
RSDHT_NETSCREEN | net screen

◆ RSDII

enum RSDII

Image interpretation (G/S)

Remarks
The elements of this enum can be grouped into the following classes:
  • Image mode: from RSDII_BW to RSDII_COLOR8,
  • Color arrangement: from RSDII_PACKED to RSDII_PAGES.
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDII_CAP...
Enumerator
RSDII_BW | B/W
RSDII_HT | halftone
RSDII_GRAY4 | gray 4 bit
RSDII_GRAY8 | gray 8 bit
RSDII_COLOR1 | color 3*1 bits
RSDII_COLORHT | color halftone
RSDII_COLOR4 | color 3*4 bits
RSDII_COLOR8 | color 3*8 bits
RSDII_AUTO | auto color
RSDII_PACKED | 0RGB0RGB 2 pixels of RSDII_COLOR1 or RSDII_COLORHT
RSDII_BYTES | RRRRRRRR GGGGGGGG BBBBBBBB 8 pixels of RSDII_COLOR1 or RSDII_COLORHT RRRRRRRR GGGGGGGG BBBBBBBB 2 pixels of RSDII_COLOR4 RRRRRRRR GGGGGGGG BBBBBBBB 1 pixel of RSDII_COLOR8
RSDII_LINES | R line, G line, B line of any color mode
RSDII_PAGES | R page, G page, B page of any color mode
RSDII_CAP | image mode capability mask
RSDII_CAPPIX | color arrangement capability mask

◆ RSDIN

enum RSDIN

Indication during scanning (G/S)

Enumerator
RSDIN_NO | (G/S) indication during scanning (RSDS*_wINDICATION) (G/S) no indication
RSDIN_PROGRESS | (G/S) progress indication during scanning
RSDIN_IMAGE | (G) strips of the image are accessible during scanning
RSDIN_CAP | capability mask (G) strip length of scanning (RSDSC_wINDICATION)
RSDIN_MIN_LINE | (G) min length of a strip is 1 line
RSDIN_MIN_64K | (G) min length of a strip is 64k bytes
RSDIN_MIN_IMG | (G) min length of a strip is the whole image
RSDIN_MIN | mask for minimal strip length
RSDIN_OPT_LINE | (G) opt length of a strip is 1 line
RSDIN_OPT_64K | (G) opt length of a strip is 64k bytes
RSDIN_OPT_IMG | (G) opt length of a strip is the whole image
RSDIN_OPT | mask for optimal strip length
RSDIN_TIMEOUT | (G) the scanner has a timeout feature; if waiting time between strips exceeds typically 30..60 secs scanning may be aborted

◆ RSDLC

enum RSDLC

Lamp or filter color (G/S)

Enumerator
RSDLC_WHITE | (G/S) white lamp or no filter
RSDLC_RED | (G/S) red lamp or filter
RSDLC_GREEN | (G/S) green lamp or filter
RSDLC_BLUE | (G/S) blue lamp or filter
RSDLC_CYAN | (G/S) cyan lamp or filter
RSDLC_MAGENTA | (G/S) magenta lamp or filter
RSDLC_YELLOW | (G/S) yellow lamp or filter
RSDLC_CAP | color capability mask

◆ RSDOR

enum RSDOR

Orientation (G/S)

Enumerator
RSDOR_NORMAL | normal
RSDOR_MIRROR | mirror
RSDOR_ROTATE90 | rotate 90 degrees CW
RSDOR_ROTATE180 | rotate 180 degrees
RSDOR_ROTATE270 | rotate 90 degrees CCW
RSDOR_AUTO | rotate automatically
RSDOR_CAPROT | capability mask for rotation
RSDOR_CAP | capability mask

◆ RSDPO

enum RSDPO

Orientation of paper.

Enumerator
RSDPO_PORTRAIT | portrait
RSDPO_LANDSCAPE | landscape

◆ RSDPP

enum RSDPP

Standard paper sizes.

Remarks
The elements of this enum can be grouped into the following classes:
  • ISO: from RSDPP_A0 to RSDPP_C8,
  • JIS (Japanese): RSDPP_...JIS,
  • ANSI (US engineering): from RSDPP_A to RSDPP_E,
  • North American: from RSDPP_STATEMENT to RSDPP_DLETTER,
  • North American envelopes: from RSDPP_PERSONAL to RSDPP_COM14,
  • Other: from RSDPP_COUPON to RSDPP_BCHECK.
Enumerator
RSDPP_MIXED | automatic detection page-by-page
RSDPP_AUTO | automatic detection
RSDPP_CUSTOM | custom size
RSDPP_SCNMAX | scanner's maximum (paper source dependent!)
RSDPP_A0 | A0
RSDPP_A1 | A1
RSDPP_A2 | A2
RSDPP_A3 | A3
RSDPP_A4 | A4
RSDPP_A5 | A5
RSDPP_A6 | A6
RSDPP_A7 | A7
RSDPP_A8 | A8
RSDPP_B0 | B0 (ISO)
RSDPP_B1 | B1 (ISO)
RSDPP_B2 | B2 (ISO)
RSDPP_B3 | B3 (ISO)
RSDPP_B4 | B4 (ISO)
RSDPP_B5 | B5 (ISO)
RSDPP_B6 | B6 (ISO)
RSDPP_B7 | B7 (ISO)
RSDPP_B8 | B8 (ISO)
RSDPP_C0 | C0
RSDPP_C1 | C1
RSDPP_C2 | C2
RSDPP_C3 | C3
RSDPP_C4 | C4
RSDPP_C5 | C5
RSDPP_C6 | C6
RSDPP_C7 | C7
RSDPP_C8 | C8
RSDPP_C65 | Envelope C6/C5
RSDPP_C76 | Envelope C7/C6
RSDPP_DL | Envelope DL
RSDPP_B0JIS | B0 (JIS)
RSDPP_B1JIS | B1 (JIS)
RSDPP_B2JIS | B2 (JIS)
RSDPP_B3JIS | B3 (JIS)
RSDPP_B4JIS | B4 (JIS)
RSDPP_B5JIS | B5 (JIS)
RSDPP_B6JIS | B6 (JIS)
RSDPP_B7JIS | B7 (JIS)
RSDPP_B8JIS | B8 (JIS)
RSDPP_A | A
RSDPP_B | B
RSDPP_C | C
RSDPP_D | D
RSDPP_E | E
RSDPP_STATEMENT | Statement
RSDPP_INVOICE | Invoice
RSDPP_EXECUTIVE | Executive
RSDPP_LETTER | Letter
RSDPP_FOLIO | Folio
RSDPP_LEGAL | Legal
RSDPP_LEDGER | Ledger
RSDPP_TABLOID | Tabloid
RSDPP_DLETTER | Double Letter
RSDPP_PERSONAL | Envelope Personal
RSDPP_MONARCH | Envelope Monarch
RSDPP_COM9 | Envelope #9
RSDPP_COM10 | Envelope #10
RSDPP_COM11 | Envelope #11
RSDPP_COM12 | Envelope #12
RSDPP_COM14 | Envelope #14
RSDPP_COUPON | Coupon
RSDPP_USBCARD | US Business Card
RSDPP_BCARD | Intl. Business Card
RSDPP_JBCARD | Japanese Business Card
RSDPP_USCHECK | US Check
RSDPP_PCHECK | Personal Check
RSDPP_BCHECK | Business Check

◆ RSDPS

enum RSDPS

Paper source (G/S)

Remarks
The elements of this enum can be grouped into the following classes:
  • Image source: from RSDPS_CAMERA to RSDPS_TRANSP,
  • Flatbed property: RSDPS_FLATBED_SPLIT,
  • ADF properties: from RSDPS_ADF_AUTOLOAD to RSDPS_ADFSTAT_AFTERSCAN,
  • Immediate actions: from RSDPS_ADF_PRELOAD to RSDPS_ADF_RELOAD.
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDPS_CAP... and RSDPS_ACT.
Enumerator
RSDPS_CAMERA | (G) photo/video camera
RSDPS_FLATBED | (G/S) flatbed
RSDPS_SHEETFEED | (G/S) roller type or manual feed
RSDPS_ADF_AUTO | (G/S) ADF selected automatically
RSDPS_TRANSP_AUTO | (G/S) transparency adapter selected automatically
RSDPS_ADF | (G/S) ADF
RSDPS_TRANSP | (G/S) transparency adapter
RSDPS_FLATBED_SPLIT | (G/S) split images of multiple documents, produces as many images as many documents are on the flatbed
RSDPS_ADF_AUTOLOAD | (G/S) ADF loads the next page automatically
RSDPS_ADF_SCANAHEAD | (G/S) pages are scanned continuously from ADF
RSDPS_ADF_SCANAHEAD_PAUSE | (G) continuous scanning from ADF can be paused
RSDPS_ADF_REVERSEORDER | (G) ADF gets the last sheet first
RSDPS_ADF_JOBSEPARATOR | (G) ADF can detect job separator sheet
RSDPS_ADFSTAT_AFTERSCAN | (G) ADF detects paper only after scan
RSDPS_ADF_PRELOAD | (G/S) preload page in ADF
RSDPS_ADF_UNLOAD | (G/S) unload page from ADF
RSDPS_ADF_RELOAD | (G/S) reload page in ADF
RSDPS_CAP | image source capability mask
RSDPS_CAPAD | ADF source capability mask
RSDPS_CAPTR | transparency adapter source capability mask
RSDPS_CAPLD | autoload / scan ahead capability mask
RSDPS_ACT | mask of immediate actions

◆ RSDRS

enum RSDRS

Resolution (appropriate values) (G/S)

Enumerator
RSDRS_75 | 75 dpi
RSDRS_100 | 100 dpi
RSDRS_150 | 150 dpi
RSDRS_200 | 200 dpi
RSDRS_240 | 240 dpi
RSDRS_300 | 300 dpi
RSDRS_400 | 400 dpi
RSDRS_500 | 500 dpi
RSDRS_600 | 600 dpi
RSDRS_800 | 800 dpi
RSDRS_1200 | 1200 dpi
RSDRS_1600 | 1600 dpi
RSDRS_2400 | 2400 dpi
RSDRS_3200 | 3200 dpi
RSDRS_4800 | 4800 dpi
RSDRS_6400 | 6400 dpi
RSDRS_9600 | 9600 dpi
RSDRS_CAP | capability mask

◆ RSDST

enum RSDST

Start mode (G/S)

Remarks
The elements of this enum can be grouped into the following classes:
  • Start event: RSDST_IMMEDIATE,
  • UI mode: RSDST_UI_...
Flags of these classes can be combined with each other. The flags of each class can be masked with capability masks RSDST_CAP...
Enumerator
RSDST_IMMEDIATE | immediate
RSDST_UI_ALWAYS | show user interface (for backwards compatibility)
RSDST_UI_SHOW | show user interface
RSDST_UI_NEVER | hide user interface (for backwards compatibility)
RSDST_UI_HIDE | hide user interface
RSDST_UI_ONCE | show user interface once for a stack in the ADF
RSDST_UI_KEEP | keep user interface shown after scan
RSDST_CAP | start capability mask
RSDST_CAPUI | UI capability mask

◆ RSDUI

enum RSDUI

Display the driver's UI (G/S)

Enumerator
RSDUI_API | (G/S) set scan parameters by the API
RSDUI_BASIC | (S) display the driver's basic UI set scan parameters by the UI; immediate action!
RSDUI_ADVANCED | (S) display the driver's advanced UI set advanced scan parameters by the UI; immediate action!
RSDUI_EXTENDED | (S) display the driver's extended UI set extended scan parameters by the UI; immediate action!
RSDUI_AREA | (S) display the driver's scan area UI set scan area parameters by the UI; immediate action!
RSDUI_CONFIG | (S) display the driver's configuration UI set configuration parameters by the UI; immediate action!
RSDUI_ABOUT | (S) display the driver's "about" UI; immediate action!
RSDUI_KEEP | (G/S) keep UI shown
RSDUI_ONSCREEN | (G) is UI on screen
RSDUI_PENDING | (G) API<->UI change is impossible because of pending item(s)
RSDUI_CAP | capability mask

◆ RSDWZ

enum RSDWZ

Wizard flags.

Remarks
These flags specify the behavior of the new Scanner Setup Wizard (SSW)
Enumerator
RSDWZ_TOPMOST | set the Wizard topmost if it has no parent window
RSDWZ_SILENT | silent mode
RSDWZ_SILENT_FORCED | forced silent mode
RSDWZ_NOSAFEMODE | disable safe mode
RSDWZ_STISELECT | enable STI selection
RSDWZ_NOHINTEDITOR | disable Hint Editor and Advanced Settings
RSDWZ_NOTESTS | disable all tests
RSDWZ_BASICTEST | perform basic test separately
RSDWZ_ADDITIONALTESTS | enable additional tests
RSDWZ_SET_DEFAULT | set default scanner by putting it to the first position in the INI file
RSDWZ_DONTSAVE_INIFILE | don't save the INI file
RSDWZ_SAVE_RSDII | save RSDII capability of the default scanner
RSDWZ_REMOTE | enable remote selection
RSDWZ_OLD_WIZARD | use the old SSW in the CSDK (not used in RSD); no other RSDWZ_... flags are valid with this one

Function Documentation

◆ kRecCheckScannerInterface()

RECERR RECAPIKRN kRecCheckScannerInterface ( int sid )

Checking availability of the interface of the selected scanner.

Checks the interface of the currently selected scanner if it is available and ready to communicate with the application.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecCheckScannerInterface(int sid);
kRecCheckScannerInterface
RECERR RECAPIKRN kRecCheckScannerInterface(int sid)
Checking availability of the interface of the selected scanner.

◆ kRecCheckScannerReady()

RECERR RECAPIKRN kRecCheckScannerReady ( int sid )

Checking readiness of the selected scanner.

Checks if the currently selected scanner is ready to scan.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecCheckScannerReady(int sid);
kRecCheckScannerReady
RECERR RECAPIKRN kRecCheckScannerReady(int sid)
Checking readiness of the selected scanner.

◆ kRecDeleteScannerNames()

RECERR RECAPIKRN kRecDeleteScannerNames ( LPCTSTR pScanners )

Deleting scanner name buffer.

Deallocates the buffer retrieved by kRecGetAllScanners and kRecGetScanners.

Parameters
[in] pScanners Pointer retrieved by functions kRecGetAllScanners and kRecGetScanners.
Return values
RECERR

◆ kRecGetAllScanners()

RECERR RECAPIKRN kRecGetAllScanners | ( | int * | pNum,
 |  | LPCTSTR * | pScanners )

Getting all available scanners.

Returns the names of all available scanner models.

Parameters
[out] | pNum | Pointer to an int variable which will receive the number of available scanner models.
[out] | pScanners | Pointer to a LPCSTR variable which will receive the list of names of available scanner models. The returned list of names consists of one or more null-terminated strings, the last string is followed by a second null character. Each string contains the manufacturer and the name of the scanner model separated by a space character.
Return values
RECERR
Note
The retrieved memory buffer can be deallocated by the call of kRecDeleteScannerNames.
The specification of this function in C# is:
RECERR kRecGetAllScanners(out string[] pScanners);
kRecGetAllScanners
RECERR RECAPIKRN kRecGetAllScanners(int *pNum, LPCTSTR *pScanners)
Getting all available scanners.

◆ kRecGetPaperSizesSupported()

RECERR RECAPIKRN kRecGetPaperSizesSupported | ( | int | sid,
 |  | size_t * | pSize,
 |  | RSDPP * | PaperSizes,
 |  | RSDPO * | Orientations,
 |  | RSDPS | PaperSource )

Retrieving a list of standard paper sizes supported by the scanner.

The kRecGetPaperSizesSupported function is used to inquire a list of standard paper sizes supported by the scanner.

Parameters
[in] | sid | Settings Collection ID.
[in,out] | pSize | Maximal number of standard paper sizes. If the pointed value is zero it will be filled with the number of paper sizes supported by the scanner.
[out] | PaperSizes | Array to store standard paper sizes.
[out] | Orientations | Array to store orientation of papers.
[in] | PaperSource | Paper source of interest. Possible values: RSDPS_FLATBED, RSDPS_SHEETFEED, RSDPS_ADF_AUTO, RSDPS_ADF, RSDPS_TRANSP
Return values
RECERR
Note
The arrays pointed by PaperSizes and Orientations must have the same size.
The specification of this function in C# is:
RECERR kRecGetScannerSizesSupported(int sid, ref uint pSize, RSDPP[] PaperSizes, RSDPO[] Orientations, RSDPS PaperSource);
// or when pSize is NULL in C/C++
RECERR kRecGetScannerSizesSupported(int sid, RSDPP[] PaperSizes, RSDPO[] Orientations, RSDPS PaperSource);
// or when the User wants arrays to be created inside
RECERR kRecGetScannerSizesSupported(int sid, out RSDPP[] PaperSizes, out RSDPO[] Orientations, RSDPS PaperSource);
RSDPS
RSDPS
Paper source (G/S)
Definition KrnScanTypes.h:137
RSDPP
RSDPP
Standard paper sizes.
Definition KrnScanTypes.h:526
RSDPO
RSDPO
Orientation of paper.
Definition KrnScanTypes.h:617

◆ kRecGetScanADF()

RECERR RECAPIKRN kRecGetScanADF | ( | int | sid,
 |  | RSDAS * | pAdf )

Getting ADF status.

The kRecGetScanADF function is used to inquire the current status of the Automatic Document Feeder (ADF) and the Transparency Adapter of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pAdf | Pointer to a variable to get the status information
Return values
RECERR
Note
When duplex scanning is set, each scan generates and stores two images. Between the processing of the front and the back sides of each sheet, the status of the hardware is overridden with the value RSDAS_BACKSIDE_READY. The status of the hardware is not available until the image of the second side of the page has been processed by a second PROCESSID.PID_IMGINPUT process or a kRecResetScanner call is issued.
Most important RSDAS definitions: states of the automatic document feeder (ADF) and the transparency adapter.
  • RSDAS_NONE : ADF status is not available
  • RSDAS_ADF_EMPTY : ADF is empty
  • RSDAS_ADF_READY : ADF is ready
  • RSDAS_ADF_JOBSEPARATOR: Job separator sheet is detected in ADF
  • RSDAS_BACKSIDE_READY : Ready to process the second side of a page during duplex scanning
  • RSDAS_TRANSP_NOTREADY : Transparency adapter is not ready
  • RSDAS_TRANSP_READY : Transparency adapter is ready
  • RSDAS_NOTCONNECTED : ADF or transparency adapter is not connected
  • RSDAS_COVEROPEN : ADF or transparency adapter cover is open
  • RSDAS_ADF_PAPERJAM : Paper jam detected in ADF
  • RSDAS_ADF_DOUBLEFEED : Double feed detected in ADF
The specification of this function in C# is:
RECERR kRecGetScanADF(int sid, out RSDAS pAdf);

◆ kRecGetScanAdjustCapa()

RECERR RECAPIKRN kRecGetScanAdjustCapa | ( | int | sid,
 |  | RSDAD * | pAdjust )

Getting adjustable capabilities.

The kRecGetScanAdjustCapa function is used to inquire the adjustable capabilities of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pAdjust | Pointer to a variable to get the adjustable capabilities. The returned value is a binary ORed combination of the values above.
Return values
RECERR
Note
Most important RSDAD definitions: Adjustable capabilities.
  • RSDAD_RESOLUTION: resolution in both directions
  • RSDAD_MARGINS : margins, width, length
  • RSDAD_PAPERSIZE : paper size
  • RSDAD_BRIGHTNESS: brightness
  • RSDAD_AUTOBRIGHTNESS: auto brightness
  • RSDAD_CONTRAST : contrast
  • RSDAD_UI_SHOW : user interface can be shown
  • RSDAD_UI_HIDE : user interface can be hidden
The specification of this function in C# is:
RECERR kRecGetScanAdjustCapa(int sid, out RSDAD pAdjust);
kRecGetScanAdjustCapa
RECERR RECAPIKRN kRecGetScanAdjustCapa(int sid, RSDAD *pAdjust)
Getting adjustable capabilities.
RSDAD
RSDAD
Adjustable parameters (G)
Definition KrnScanTypes.h:478

◆ kRecGetScanArea()

RECERR RECAPIKRN kRecGetScanArea | ( | int | sid,
 |  | LPRECT | pRect )

Getting scanning area.

The kRecGetScanArea function is used to inquire the dimensions of the scanning area of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] sid Settings Collection ID.
[out] pRect Pointer to the structure of the dimensions. The fields of pRect are as follows:
  • left : left margin of the scanning area,
  • top : top margin of the scanning area,
  • right : scanning width (not the right margin!),
  • bottom : scanning length (not the bottom margin!).
Return values
RECERR
Note
All values are measured in 1/1200 inches.
This function gets the settings Kernel.Scanner.Left, Kernel.Scanner.Top, Kernel.Scanner.Length, Kernel.Scanner.Width. These settings can be changed by kRecSetScanArea.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
RECERR kRecGetScanArea(int sid, out RECT pRect);
kRecGetScanArea
RECERR RECAPIKRN kRecGetScanArea(int sid, LPRECT pRect)
Getting scanning area.

◆ kRecGetScanAutoBrightnessCapa()

RECERR RECAPIKRN kRecGetScanAutoBrightnessCapa | ( | int | sid,
 |  | LPINTBOOL | bAuto )

Getting automatic brightness control capability.

The kRecGetScanAutoBrightnessCapa function is used to inquire whether either the currently selected scanner itself or its associated software has a built-in automatic brightness control capability.

Parameters
[in] | sid | Settings Collection ID.
[out] | bAuto | Pointer to a Boolean variable to hold the presence/absence status of the automatic brightness control capability.
Return values
RECERR
Note
If the scanner itself or its associated software does not have built-in automatic brightness control capability, but it supports gray-scale scanning (as most scanners do) the Automatic Adaptive Thresholding mode (CNV_AUTO) can be used.
The specification of this function in C# is:
RECERR kRecGetScanAutoBrightnessCapa(int sid, out bool bAuto);
kRecGetScanAutoBrightnessCapa
RECERR RECAPIKRN kRecGetScanAutoBrightnessCapa(int sid, LPINTBOOL bAuto)
Getting automatic brightness control capability.

◆ kRecGetScanBitsPerSample()

RECERR RECAPIKRN kRecGetScanBitsPerSample | ( | int | sid,
 |  | RSDII * | pBps )

Getting scanning mode.

The kRecGetScanBitsPerSample function is used to inquire the scanning mode of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pBps | Pointer to a variable to get the current scanning mode setting
Return values
RECERR
Note
This function gets the setting Kernel.Scanner.Bps. This setting can be retrieved by kRecSetScanBitsPerSample.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
RECERR kRecGetScanBitsPerSample(int sid, out RSDII pBps);
kRecGetScanBitsPerSample
RECERR RECAPIKRN kRecGetScanBitsPerSample(int sid, RSDII *pBps)
Getting scanning mode.

◆ kRecGetScanBitsPerSampleCapa()

RECERR RECAPIKRN kRecGetScanBitsPerSampleCapa | ( | int | sid,
 |  | RSDII * | pBps )

Getting scanning mode capabilities.

The kRecGetScanBitsPerSampleCapa function is used to inquire the scanning mode capabilities of the currently selected scanner. Most scanners support all four scanning modes below, however, some scanner models cannot support one or more of these scanning modes.

Parameters
[in] | sid | Settings Collection ID.
[out] | pBps | Pointer to a variable to get the scanning mode capabilities. The returned value is a binary ORed combination of the values above.
Return values
RECERR
Note
Most important RSDII definitions: Scanning mode values.
  • RSDII_BW: Scanning in Black-and-white (B/W) mode
  • RSDII_GRAY4: Scanning in 4-bit gray-scale mode
  • RSDII_GRAY8: Scanning in 8-bit gray-scale mode
  • RSDII_COLOR8: Scanning in color mode
The specification of this function in C# is:
RECERR kRecGetScanBitsPerSampleCapa(int sid, out RSDII pBps);

◆ kRecGetScanBrightness()

RECERR RECAPIKRN kRecGetScanBrightness | ( | int | sid,
 |  | UINT * | pBrightness )

Getting brightness in %.

The kRecGetScanBrightness function is used to inquire the brightness of subsequent scanning(s) of the currently selected scanner as a percentage. If the returned value is AUTOBRIGHTNESS it means that the automatic brightness control has been set.

Parameters
[in] | sid | Settings Collection ID.
[out] | pBrightness | Pointer to a variable to get the current brightness setting.
Return values
RECERR
Note
This function and also kRecGetScanBrightnessVal get the settings Kernel.Scanner.Brightness and Kernel.Scanner.BrightnessVal. These settings can be changed by kRecSetScanBrightnessVal and kRecSetScanBrightness.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
RECERR kRecGetScanBrightness(int sid, out uint pBrightness);
kRecGetScanBrightness
RECERR RECAPIKRN kRecGetScanBrightness(int sid, UINT *pBrightness)
Getting brightness in %.

◆ kRecGetScanBrightnessDefVal()

RECERR RECAPIKRN kRecGetScanBrightnessDefVal | ( | int | sid,
 |  | UINT * | pBrDef )

Getting default brightness.

The kRecGetScanBrightnessDefVal function is used to inquire the default brightness value of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pBrDef | Pointer to a variable to get the default brightness value. This is not always the half of the value returned by kRecGetScanBrightnessMaxVal.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetScanBrightnessDefVal(int sid, out uint pBrDef);
kRecGetScanBrightnessDefVal
RECERR RECAPIKRN kRecGetScanBrightnessDefVal(int sid, UINT *pBrDef)
Getting default brightness.

◆ kRecGetScanBrightnessMaxVal()

RECERR RECAPIKRN kRecGetScanBrightnessMaxVal | ( | int | sid,
 |  | UINT * | pBrMax )

Getting number of brightness steps.

The kRecGetScanBrightnessMaxVal function is used to inquire the number of available brightness steps of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pBrMax | Pointer to a variable to get the number of available brightness steps.
Return values
RECERR
Note
The range of the scanning brightness value is from zero (0) to the returned value of this function minus one (1). If the currently selected scanner does not have a brightness setting capability, the function will return zero (0).
The specification of this function in C# is:
RECERR kRecGetScanBrightnessMaxVal(int sid, out uint pBrMax);
kRecGetScanBrightnessMaxVal
RECERR RECAPIKRN kRecGetScanBrightnessMaxVal(int sid, UINT *pBrMax)
Getting number of brightness steps.

◆ kRecGetScanBrightnessVal()

RECERR RECAPIKRN kRecGetScanBrightnessVal | ( | int | sid,
 |  | UINT * | pBrightness )

Getting brightness.

The kRecGetScanBrightnessVal function is used to inquire the brightness of subsequent scanning(s) of the currently selected scanner. If the returned value is AUTOBRIGHTNESS it means that the automatic brightness control has been set.

Parameters
[in] | sid | Settings Collection ID.
[out] | pBrightness | Pointer to a variable to get the current brightness setting
Return values
RECERR
Note
This function and also kRecGetScanBrightness get the settings Kernel.Scanner.Brightness and Kernel.Scanner.BrightnessVal. These settings can be changed by kRecSetScanBrightnessVal and kRecSetScanBrightness.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
RECERR kRecGetScanBrightnessVal(int sid, out uint pBrightness);
kRecGetScanBrightnessVal
RECERR RECAPIKRN kRecGetScanBrightnessVal(int sid, UINT *pBrightness)
Getting brightness.

◆ kRecGetScanContrast()

RECERR RECAPIKRN kRecGetScanContrast | ( | int | sid,
 |  | UINT * | pContrast )

Getting contrast in %.

The kRecGetScanContrast function is used to inquire the contrast of subsequent scanning(s) of the currently selected scanner as a percentage.

Parameters
[in] | sid | Settings Collection ID.
[out] | pContrast | Pointer to a variable to get the current contrast setting.
Return values
RECERR
Note
This function and also kRecGetScanContrastVal get the settings Kernel.Scanner.Contrast and Kernel.Scanner.ContrastVal. These settings can be changed by kRecSetScanContrastVal and kRecSetScanContrast.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
RECERR kRecGetScanContrast(int sid, out uint pContrast);
kRecGetScanContrast
RECERR RECAPIKRN kRecGetScanContrast(int sid, UINT *pContrast)
Getting contrast in %.

◆ kRecGetScanContrastDefVal()

RECERR RECAPIKRN kRecGetScanContrastDefVal | ( | int | sid,
 |  | UINT * | pCrDef )

Getting default of contrast.

The kRecGetScanContrastDefVal function is used to inquire the default contrast value of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pCrDef | Pointer to a variable to get the default contrast value. This is not always the half of the value returned by kRecGetScanContrastMaxVal.
Return values
RECERR \note The specification of this function in C# is:
RECERR kRecGetScanContrastDefVal(int sid, out uint pCrDef);
kRecGetScanContrastDefVal
RECERR RECAPIKRN kRecGetScanContrastDefVal(int sid, UINT *pCrDef)
Getting default of contrast.

◆ kRecGetScanContrastMaxVal()

RECERR RECAPIKRN kRecGetScanContrastMaxVal | ( | int | sid,
 |  | UINT * | pCrMax )

Getting number of contrast steps.

The kRecGetScanContrastMaxVal function is used to inquire the number of available contrast steps of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pCrMax | Pointer to a variable to get the number of available contrast steps.
Return values
RECERR
Note
The range of the scanning contrast value is from zero (0) to the returned value of this function minus one (1). If the currently selected scanner does not have a contrast setting capability, the function will return zero (0).
The specification of this function in C# is:
RECERR kRecGetScanContrastMaxVal(int sid, out uint pCrMax);
kRecGetScanContrastMaxVal
RECERR RECAPIKRN kRecGetScanContrastMaxVal(int sid, UINT *pCrMax)
Getting number of contrast steps.

◆ kRecGetScanContrastVal()

RECERR RECAPIKRN kRecGetScanContrastVal | ( | int | sid,
 |  | UINT * | pContrast )

Getting contrast.

The kRecGetScanContrastVal function is used to inquire the contrast of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pContrast | Pointer to a variable to get the current contrast setting.
Return values
RECERR
Note
This function and also kRecGetScanContrast get the settings Kernel.Scanner.Contrast and Kernel.Scanner.ContrastVal. These settings can be changed by kRecSetScanContrastVal and kRecSetScanContrast.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
RECERR kRecGetScanContrastVal(int sid, out uint pContrast);
kRecGetScanContrastVal
RECERR RECAPIKRN kRecGetScanContrastVal(int sid, UINT *pContrast)
Getting contrast.

◆ kRecGetScanDropout()

RECERR RECAPIKRN kRecGetScanDropout | ( | int | sid,
 |  | RSDLC * | pColor )

Getting dropout color.

The kRecGetScanDropout function is used to inquire the dropout color of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pColor | Pointer to a variable to get the current dropout color setting
Return values
RECERR
Note
This function gets the setting Kernel.Scanner.Dropout. This setting can be changed by kRecSetScanDropout.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
RECERR kRecGetScanDropout(int sid, out RSDLC pColor);
kRecGetScanDropout
RECERR RECAPIKRN kRecGetScanDropout(int sid, RSDLC *pColor)
Getting dropout color.

◆ kRecGetScanDropoutCapa()

RECERR RECAPIKRN kRecGetScanDropoutCapa | ( | int | sid,
 |  | RSDLC * | pColor )

Getting dropout color capabilities.

The kRecGetScanDropoutCapa function is used to inquire the dropout color capabilities of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pColor | Pointer to a variable to get the dropout color capabilities. If the scanner does not support the dropout color feature, this value will be RSDLC_WHITE. Otherwise the returned value will be a binary ORed combination of the values above.
Return values
RECERR
Note
Most important RSDLC definitions: dropout color values.
  • RSDLC_WHITE : White lamp or no filter (Default)
  • RSDLC_RED : Red lamp or red filter
  • RSDLC_GREEN : Green lamp or green filter
  • RSDLC_BLUE : Blue lamp or blue filter
  • RSDLC_CYAN : Cyan lamp or cyan filter
  • RSDLC_MAGENTA: Magenta lamp or magenta filter
  • RSDLC_YELLOW : Yellow lamp or yellow filter
The specification of this function in C# is:
RECERR kRecGetScanDropoutCapa(int sid, out RSDLC pColor);

◆ kRecGetScanDuplex()

RECERR RECAPIKRN kRecGetScanDuplex | ( | int | sid,
 |  | RSDDX * | pDuplex )

Getting duplex scanning mode.

The kRecGetScanDuplex function is used to inquire the duplex scanning mode of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pDuplex | Pointer to a variable to get the current duplex scanning mode setting
Return values
RECERR
Note
This function gets the setting Kernel.Scanner.Duplex. This setting can be changed by kRecSetScanDuplex.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
RECERR kRecGetScanDuplex(int sid, out RSDDX pDuplex);
kRecGetScanDuplex
RECERR RECAPIKRN kRecGetScanDuplex(int sid, RSDDX *pDuplex)
Getting duplex scanning mode.
RSDDX
RSDDX
Duplex scanning (G/S)
Definition KrnScanTypes.h:181

◆ kRecGetScanDuplexCapa()

RECERR RECAPIKRN kRecGetScanDuplexCapa | ( | int | sid,
 |  | RSDDX * | pDuplex )

Getting duplex scanning capabilities.

The kRecGetScanDuplexCapa function is used to inquire the duplex scanning capabilities of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pDuplex | Pointer to a variable to get the duplex scanning capabilities. The returned value is a binary ORed combination of the values above.
Return values
RECERR
Note
Most important RSDDX definitions: duplex scanning capabilities of the scanner.
  • RSDDX_SINGLE: Single sided scanning (default)
  • RSDDX_DUPLEX_PAGE: Double sided scanning with same margins
  • RSDDX_DUPLEX_BOOK: Double sided scanning with mirrored margins
The specification of this function in C# is:
RECERR kRecGetScanDuplexCapa(int sid, out RSDDX pDuplex);
kRecGetScanDuplexCapa
RECERR RECAPIKRN kRecGetScanDuplexCapa(int sid, RSDDX *pDuplex)
Getting duplex scanning capabilities.

◆ kRecGetScanErrorMode()

RECERR RECAPIKRN kRecGetScanErrorMode | ( | int | sid,
 |  | INTBOOL * | pIgnore )

Getting error mode.

The kRecGetScanErrorMode function is used to inquire the error mode of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pIgnore | Pointer to a variable to get the current error mode setting
Return values
RECERR
Note
This function gets the setting Kernel.Scanner.IgnoreErrors. This setting can be changed by kRecSetScanErrorMode.
The specification of this function in C# is:
RECERR kRecGetScanErrorMode(int sid, out bool Ignore);
kRecGetScanErrorMode
RECERR RECAPIKRN kRecGetScanErrorMode(int sid, INTBOOL *pIgnore)
Getting error mode.

◆ kRecGetScanner()

RECERR RECAPIKRN kRecGetScanner | ( | int | sid,
 |  | LPCTSTR * | pScanner )

Getting the installed scanner.

Returns the currently installed scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pScanner | Pointer to a LPCSTR variable which will receive the manufacturer and the name of the scanner model separated by a space character. The returned name is an empty string if the scanner selected by the kRecSetScannerSelected function is not available.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetScanner(int sid, out string pScanner);
kRecGetScanner
RECERR RECAPIKRN kRecGetScanner(int sid, LPCTSTR *pScanner)
Getting the installed scanner.

◆ kRecGetScannerADFSize()

RECERR RECAPIKRN kRecGetScannerADFSize | ( | int | sid,
 |  | LPSIZE | pSize )

getting ADF size

The kRecGetScannerADFSize function is used to inquire the dimensions of the ADF of the currently selected scanner.

Parameters
[in] sid Settings Collection ID.
[out] pSize Pointer to the structure of dimensions. The fields are as follows:
  • cx : width of the ADF,
  • cy : length of the ADF.
Return values
RECERR
Note
All values are measured in 1/1200 inches.
If the scanner has no ADF zeros are returned.
The specification of this function in C# is:
RECERR kRecGetScannerADFSize(int sid, out SIZE pSize);
kRecGetScannerADFSize
RECERR RECAPIKRN kRecGetScannerADFSize(int sid, LPSIZE pSize)
getting ADF size

◆ kRecGetScannerFlatbedSize()

RECERR RECAPIKRN kRecGetScannerFlatbedSize | ( | int | sid,
 |  | LPSIZE | pSize )

Getting flat-bed size.

The kRecGetScannerFlatbedSize function is used to inquire the dimensions of the flat-bed of the currently selected scanner.

Parameters
[in] sid Settings Collection ID.
[out] pSize Pointer to the structure of dimensions. The fields are as follows:
  • cx : width of the flat-bed,
  • cy : length of the flat-bed.
Return values
RECERR
Note
All values are measured in 1/1200 inches.
If the scanner has no flat-bed zeros are returned.
The specification of this function in C# is:
RECERR kRecGetScannerFlatbedSize(int sid, out SIZE pSize);
kRecGetScannerFlatbedSize
RECERR RECAPIKRN kRecGetScannerFlatbedSize(int sid, LPSIZE pSize)
Getting flat-bed size.

◆ kRecGetScannerManufacturer()

RECERR RECAPIKRN kRecGetScannerManufacturer | ( | int | sid,
 |  | LPTSTR | pManufacturer,
 |  | size_t | iSize )

Getting scanner manufacturer.

The kRecGetScannerManufacturer function can be used to get the scanner manufacturer of the currently installed scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pManufacturer | Pointer to a buffer where the scanner manufacturer string will be copied to.
[in] | iSize | Specifies the size of the buffer in bytes. The buffer must be large enough to hold all the characters and a terminating zero (256 bytes).
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetScannerManufacturer(int sid, out string pManufacturer);
kRecGetScannerManufacturer
RECERR RECAPIKRN kRecGetScannerManufacturer(int sid, LPTSTR pManufacturer, size_t iSize)
Getting scanner manufacturer.

◆ kRecGetScannerModel()

RECERR RECAPIKRN kRecGetScannerModel | ( | int | sid,
 |  | LPTSTR | pModel,
 |  | size_t | iSize )

Getting scanner model.

The kRecGetScannerModel function can be used to get the name of the currently installed scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pModel | Pointer to a buffer where the scanner model string will be copied to.
[in] | iSize | Specifies the size of the buffer in bytes. The buffer must be large enough to hold all the characters and a terminating zero (256 bytes).
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetScannerModel(int sid, out string pModel);
kRecGetScannerModel
RECERR RECAPIKRN kRecGetScannerModel(int sid, LPTSTR pModel, size_t iSize)
Getting scanner model.

◆ kRecGetScanners()

RECERR RECAPIKRN kRecGetScanners | ( | int | sid,
 |  | int * | pNum,
 |  | LPCTSTR * | pScanners )

Getting all initialized scanners.

Returns the names of all initialized scanner models from the scanner init file.

Parameters
[in] | sid | Settings Collection ID.
[out] | pNum | Pointer to an int variable which will receive the number of initialized scanner models. This parameter should not be NULL.
[out] | pScanners | Pointer to a LPCSTR variable which will receive the list of names of initialized scanner models. The returned list of names consists of one or more null-terminated strings, the last string is followed by a second null character. Each string contains the manufacturer and the name of the scanner model separated by a space character. This parameter may be NULL in which case only the number of initialized scanners will be retrieved.
Return values
RECERR
Note
The retrieved memory buffer can be deallocated by the call of kRecDeleteScannerNames.
This function builds up the setting subtrees of scanners it retrieves if the pScanners parameter is not NULL. For details, see the description of node Scanners.
The specification of this function in C# is:
RECERR kRecGetScanners(int sid, out string[] pScanners);
kRecGetScanners
RECERR RECAPIKRN kRecGetScanners(int sid, int *pNum, LPCTSTR *pScanners)
Getting all initialized scanners.

◆ kRecGetScannerSelected()

RECERR RECAPIKRN kRecGetScannerSelected | ( | int | sid,
 |  | LPCTSTR * | pScanner )

Getting the current scanner.

Returns the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pScanner | Pointer to a LPCSTR variable which will receive the manufacturer and the name of the selected scanner model separated by a space character The returned name is the same as set by the last call of kRecSetScannerSelected function.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetScannerSelected(int sid, out string pScanner);
kRecGetScannerSelected
RECERR RECAPIKRN kRecGetScannerSelected(int sid, LPCTSTR *pScanner)
Getting the current scanner.

◆ kRecGetScannerSize()

RECERR RECAPIKRN kRecGetScannerSize | ( | int | sid,
 |  | LPSIZE | pSize )

Getting maximum scanning area size.

The kRecGetScannerSize function is used to inquire the dimensions of the maximum scanning area of the currently selected scanner.

Parameters
[in] sid Settings Collection ID.
[out] pSize Pointer to the structure of dimensions. The fields are as follows:
  • cx : width of the scanner,
  • cy : length of the scanner.
Return values
RECERR
Note
All values are measured in 1/1200 inches.
The returned dimensions are typically the maximum width and height of the flat-bed area. In this case the maximum width of the ADF will be the same as that of the flat-bed, the maximum length of the paper the ADF can handle is the height of the flat-bed area or 14 inches, whichever is greater. If the scanner has no flat-bed area then the returned values are the dimensions of the ADF.
The specification of this function in C# is:
RECERR kRecGetScannerSize(int sid, out SIZE pSize);
kRecGetScannerSize
RECERR RECAPIKRN kRecGetScannerSize(int sid, LPSIZE pSize)
Getting maximum scanning area size.

◆ kRecGetScannerTransparencySize()

RECERR RECAPIKRN kRecGetScannerTransparencySize | ( | int | sid,
 |  | LPSIZE | pSize )

Getting transparency unit size.

The kRecGetScannerTransparencySize function is used to inquire the dimensions of the transparency unit of the currently selected scanner.

Parameters
[in] sid Settings Collection ID.
[out] pSize Pointer to the structure of dimensions. The fields are as follows:
  • cx : width of the transparency unit,
  • cy : length of the transparency unit.
Return values
RECERR
Note
All values are measured in 1/1200 inches.
If the scanner has no transparency unit zeros are returned.
The specification of this function in C# is:
RECERR kRecGetScannerTransparencySize(int sid, out SIZE pSize);
kRecGetScannerTransparencySize
RECERR RECAPIKRN kRecGetScannerTransparencySize(int sid, LPSIZE pSize)
Getting transparency unit size.

◆ kRecGetScannerVersion()

RECERR RECAPIKRN kRecGetScannerVersion | ( | int | sid,
 |  | LPTSTR | pVersion,
 |  | size_t | buflen )

Getting scanner version.

Returns the version of the currently selected scanner or whatever is returned from the underlying scanning subsystem.

Parameters
[in] | sid | Settings Collection ID.
[out] | pVersion | Pointer to a buffer where the scanner version string will be copied to.
[in] | buflen | Specifies the size of the buffer in bytes. The buffer must be large enough to hold all the characters and a terminating zero (256 bytes).
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetScannerVersion(int sid, out string pVersion);
kRecGetScannerVersion
RECERR RECAPIKRN kRecGetScannerVersion(int sid, LPTSTR pVersion, size_t buflen)
Getting scanner version.

◆ kRecGetScanOrientation()

RECERR RECAPIKRN kRecGetScanOrientation | ( | int | sid,
 |  | RSDOR * | pOrientation )

Getting orientation.

The kRecGetScanOrientation function is used to inquire the orientation of the subsequently scanned image(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pOrientation | Pointer to a variable to get the current orientation setting.
Return values
RECERR
Note
This function gets the setting Kernel.Scanner.Orientation. This setting can be changed by kRecSetScanOrientation.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
RECERR kRecGetScanOrientation(int sid, out RSDOR pOrientation);
kRecGetScanOrientation
RECERR RECAPIKRN kRecGetScanOrientation(int sid, RSDOR *pOrientation)
Getting orientation.
RSDOR
RSDOR
Orientation (G/S)
Definition KrnScanTypes.h:256

◆ kRecGetScanOrientationCapa()

RECERR RECAPIKRN kRecGetScanOrientationCapa | ( | int | sid,
 |  | RSDOR * | pOrientation )

Getting orientation capabilities.

The kRecGetScanOrientationCapa function is used to inquire the orientation capabilities of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pOrientation | Pointer to a variable to get the orientation capabilities. The returned value is a binary ORed combination of the values above.
Return values
RECERR
Note
Most important RSDOR definitions: orientation capabilities of the scanner. RSDOR_NORMAL: No transformation RSDOR_MIRROR: Mirror horizontally RSDOR_ROTATE90: Rotate 90 degrees CW RSDOR_ROTATE180: Rotate 180 degrees RSDOR_ROTATE270: Rotate 90 degrees CCW
The specification of this function in C# is:
RECERR kRecGetScanOrientationCapa(int sid, out RSDOR pOrientation);
kRecGetScanOrientationCapa
RECERR RECAPIKRN kRecGetScanOrientationCapa(int sid, RSDOR *pOrientation)
Getting orientation capabilities.

◆ kRecGetScanPaperSize()

RECERR RECAPIKRN kRecGetScanPaperSize | ( | int | sid,
 |  | LPSIZE | pPaperSize )

Getting paper size.

The kRecGetScanPaperSize function is used to inquire the paper size setting of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[in] | pPaperSize | Pointer to the structure of the paper size. The fields are as follows: -cx : paper width, -cy : paper length.
Return values
RECERR
Note
All values are measured in 1/1200 inches.
This function gets the settings Kernel.Scanner.PaperLength, Kernel.Scanner.PaperWidth. These settings can be changed by kRecSetScanPaperSize.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
RECERR kRecGetScanPaperSize(int sid, out SIZE pPaperSize);
kRecGetScanPaperSize
RECERR RECAPIKRN kRecGetScanPaperSize(int sid, LPSIZE pPaperSize)
Getting paper size.

◆ kRecGetScanPaperSource()

RECERR RECAPIKRN kRecGetScanPaperSource | ( | int | sid,
 |  | RSDPS * | pSource )

Getting paper source.

The kRecGetScanPaperSource function is used to inquire the paper source of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pSource | Pointer to a variable to get the current paper source setting. Possible values are: RSDPS_FLATBED, RSDPS_SHEETFEED, RSDPS_ADF_AUTO, RSDPS_TRANSP_AUTO, RSDPS_ADF and RSDPS_TRANSP possibly ORed with RSDPS_ADF_AUTOLOAD or RSDPS_ADF_SCANAHEAD.
Return values
RECERR
Note
This function gets the setting Kernel.Scanner.PaperSource. This setting can be changed by kRecSetScanPaperSource.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
RECERR kRecGetScanPaperSource(int sid, out RSDPS pSource);
kRecGetScanPaperSource
RECERR RECAPIKRN kRecGetScanPaperSource(int sid, RSDPS *pSource)
Getting paper source.

◆ kRecGetScanPaperSourceCapa()

RECERR RECAPIKRN kRecGetScanPaperSourceCapa | ( | int | sid,
 |  | RSDPS * | pSource )

Getting paper source capabilities.

The kRecGetScanPaperSourceCapa function is used to inquire the paper source capabilities of the currently selected scanner.

Parameters
[in] sid Settings Collection ID.
[out] pSource Pointer to a variable to get the paper source capabilities. The returned value is a binary ORed combination of the following possible values:
  • RSDPS_FLATBED: The scanner has a flat-bed scanning area
  • RSDPS_SHEETFEED: The scanner is a roller type one or it requires manual feed
  • RSDPS_ADF_AUTO: The scanner is equipped with an ADF and it can be selected automatically
  • RSDPS_TRANSP_AUTO: The scanner is equipped with a transparency adapter and it can be selected automatically
  • RSDPS_ADF: The scanner is equipped with an ADF and it can be selected as the exclusive paper source of the scanner
  • RSDPS_TRANSP: The scanner is equipped with a transparency adapter and it can be selected as the exclusive paper source of the scanner
  • RSDPS_ADF_AUTOLOAD: The ADF can load the the next page automatically to the scanning position
  • RSDPS_ADF_SCANAHEAD: The scanner can scan as many pages from the ADF in advance as fit into its internal buffer
  • RSDPS_ADFSTAT_AFTERSCAN: Identifes a scanner whose ADF detects paper only after scan
  • RSDPS_ADF_PRELOAD: The ADF has a preload capability
  • RSDPS_ADF_UNLOAD: The ADF has an unload capability
  • RSDPS_ADF_RELOAD: The ADF has a reload capability
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetScanPaperSourceCapa(int sid, out RSDPS pSource);
kRecGetScanPaperSourceCapa
RECERR RECAPIKRN kRecGetScanPaperSourceCapa(int sid, RSDPS *pSource)
Getting paper source capabilities.

◆ kRecGetScanParamSource()

RECERR RECAPIKRN kRecGetScanParamSource | ( | int | sid,
 |  | INTBOOL * | pFromScanner )

Getting the source of parameters.

The kRecGetScanParamSource function is used to inquire the source of parameters of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pFromScanner | Pointer to a variable to get the current parameter source setting
Return values
RECERR
Note
Functions retrieving scan parameters can get their returned values from two different sources: from the scanning system or from the corresponding setting. Normally these values are the same but in special cases they can be different in which cases the functions return with a warning status. The returned values will be the corresponding settings if the FromScanner parameter is FALSE otherwise they will be retrieved from the scanning system. See also scanner setting synchronization.
This function gets the setting Kernel.Scanner.GetParamsFromScanner. This setting can be changed by kRecSetScanParamSource.
The specification of this function in C# is:
RECERR kRecGetScanParamSource(int sid, out bool FromScanner);
kRecGetScanParamSource
RECERR RECAPIKRN kRecGetScanParamSource(int sid, INTBOOL *pFromScanner)
Getting the source of parameters.

◆ kRecGetScanResolution()

RECERR RECAPIKRN kRecGetScanResolution | ( | int | sid,
 |  | UINT * | pResolution )

Getting resolution.

The kRecGetScanResolution function is used to inquire the resolution of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pResolution | Pointer to a variable to get the current scanning resolution setting in DPI
Return values
RECERR
Note
This function gets the setting Kernel.Scanner.Resolution. This setting can be changed by kRecSetScanResolution.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
RECERR kRecGetScanResolution(int sid, out uint pResolution);
kRecGetScanResolution
RECERR RECAPIKRN kRecGetScanResolution(int sid, UINT *pResolution)
Getting resolution.

◆ kRecGetScanResolutionCapa()

RECERR RECAPIKRN kRecGetScanResolutionCapa | ( | int | sid,
 |  | RSDRS * | pResolCapa )

Getting resolution capabilities.

The kRecGetScanResolutionCapa function is used to inquire the resolution capabilities of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pResolCapa | Pointer to a variable to get the resolution capabilities. The returned value is a binary ORed combination of the values above.
Return values
RECERR
Note
Most important RSDRS definitions: scanning resolution values.
  • RSDRS_75 : Scanning with 75 dpi
  • RSDRS_100 : Scanning with 100 dpi
  • RSDRS_150 : Scanning with 150 dpi
  • RSDRS_200 : Scanning with 200 dpi
  • RSDRS_240 : Scanning with 240 dpi
  • RSDRS_300 : Scanning with 300 dpi
  • RSDRS_400 : Scanning with 400 dpi
  • RSDRS_600 : Scanning with 600 dpi
  • RSDRS_800 : Scanning with 800 dpi
  • RSDRS_1200: Scanning with 1200 dpi
  • RSDRS_1600: Scanning with 1600 dpi
  • RSDRS_2400: Scanning with 2400 dpi
  • RSDRS_3200: Scanning with 3200 dpi
  • RSDRS_4800: Scanning with 4800 dpi
The specification of this function in C# is:
RECERR kRecGetScanResolutionCapa(int sid, out RSDRS pResolCapa);
RSDRS
RSDRS
Resolution (appropriate values) (G/S)
Definition KrnScanTypes.h:231
kRecGetScanResolutionCapa
RECERR RECAPIKRN kRecGetScanResolutionCapa(int sid, RSDRS *pResolCapa)
Getting resolution capabilities.

◆ kRecGetScanStandardPaperSize()

RECERR RECAPIKRN kRecGetScanStandardPaperSize | ( | RSDPP | Paper,
 |  | LPSIZE | pSize )

Getting standard paper size.

The kRecGetScanStandardPaperSize function is used to inquire the dimensions of standard paper sizes.

Parameters
[in] Paper One of the standard paper sizes (RSDPP_*)
[out] pSize Pointer to the structure of dimensions. The fields are as follows:
  • cx : paper width,
  • cy : paper length.
Return values
RECERR
Note
All values are measured in 1/1200 inches.
See the list of all the possible standard paper sizes.
The specification of this function in C# is:
RECERR kRecGetScanStandardPaperSize(RSDPP Paper, out SIZE pSize);
kRecGetScanStandardPaperSize
RECERR RECAPIKRN kRecGetScanStandardPaperSize(RSDPP Paper, LPSIZE pSize)
Getting standard paper size.

◆ kRecGetScanStartMode()

RECERR RECAPIKRN kRecGetScanStartMode | ( | int | sid,
 |  | RSDST * | pStart )

Getting starting mode.

The kRecGetScanStartMode function is used to inquire the starting mode of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pStart | Pointer to a variable to get the current starting mode setting
Return values
RECERR
Note
This function gets the setting Kernel.Scanner.StartMode. This setting can be changed by kRecSetScanStartMode.
If the functions returns with a warning status, a setting synchronization is recommended.
The specification of this function in C# is:
RECERR kRecGetScanStartMode(int sid, out RSDST pStart);
kRecGetScanStartMode
RECERR RECAPIKRN kRecGetScanStartMode(int sid, RSDST *pStart)
Getting starting mode.
RSDST
RSDST
Start mode (G/S)
Definition KrnScanTypes.h:105

◆ kRecGetScanStartModeCapa()

RECERR RECAPIKRN kRecGetScanStartModeCapa | ( | int | sid,
 |  | RSDST * | pStart )

Getting starting mode capabilities.

The kRecGetScanStartModeCapa function is used to inquire the starting mode capabilities of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[out] | pStart | Pointer to a variable to get the starting mode capabilities. The returned value is a binary ORed combination of the values above.
Return values
RECERR
Note
Most important RSDST definitions: starting modes of the scanner.
  • RSDST_IMMEDIATE: Start immediately (default)
  • RSDST_PAPER: Start when the ADF is loaded
  • RSDST_BUTTON: Start when a button is pressed on the scanner
  • RSDST_UI_SHOW: Show the native UI of the underlying scanning subsystem
  • RSDST_UI_HIDE: Hide the native UI of the underlying scanning subsystem
  • RSDST_UI_ONCE: Show the native UI of the underlying scanning subsystem only once for a stack of paper in the ADF
  • RSDST_UI_KEEP: Keep the native UI of the underlying scanning subsystem shown after scan
The specification of this function in C# is:
RECERR kRecGetScanStartModeCapa(int sid, out RSDST pStart);
kRecGetScanStartModeCapa
RECERR RECAPIKRN kRecGetScanStartModeCapa(int sid, RSDST *pStart)
Getting starting mode capabilities.

◆ kRecIsScanPaperSizeSupported()

RECERR RECAPIKRN kRecIsScanPaperSizeSupported | ( | int | sid,
 |  | RSDPP | PaperSize,
 |  | INTBOOL | Portrait,
 |  | RSDPS | PaperSource,
 |  | LPINTBOOL | pSupp )

Checking paper size support.

The kRecIsScanPaperSizeSupported function returns TRUE if the currently selected scanner supports the standard paper size inquired. You should not assume that all paper sizes not larger than the scanner bed are supported.

Parameters
[in] | sid | Settings Collection ID.
[in] | PaperSize | One of the standard paper sizes (RSDPP_*)
[in] | Portrait | Orientation of the paper: TRUE if portrait, FALSE if landscape
[in] | PaperSource | The following values are valid: RSDPS_FLATBED, RSDPS_SHEETFEED, RSDPS_ADF and RSDPS_TRANSP, whichever is supported by the scanner (see kRecGetScanPaperSourceCapa)
[out] | pSupp | The returned value is TRUE if the scanner supports the papersize. If the returned value is FALSE the scanner will still scan the image but it may be misaligned.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecIsScanPaperSizeSupported(int sid, RSDPP PaperSize, bool Portrait, RSDPS PaperSource, out bool pSupp);
kRecIsScanPaperSizeSupported
RECERR RECAPIKRN kRecIsScanPaperSizeSupported(int sid, RSDPP PaperSize, INTBOOL Portrait, RSDPS PaperSource, LPINTBOOL pSupp)
Checking paper size support.

◆ kRecReleaseScanner()

RECERR RECAPIKRN kRecReleaseScanner ( int sid )

Releasing a reserved scanner.

Releases the currently selected scanner. The scanner should be released as many times as it has been reserved.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecReleaseScanner(int sid);
kRecReleaseScanner
RECERR RECAPIKRN kRecReleaseScanner(int sid)
Releasing a reserved scanner.

◆ kRecReserveScanner()

RECERR RECAPIKRN kRecReserveScanner ( int sid )

Reserving the selected scanner.

Reserves the currently selected scanner for the current application.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
The reserved scanner cannot be used by other CSDK/RSD-based applications until it is released. Reserving a scanner prevents its driver from unloading as a side effect. This may speed up continuous scanning from ADF.
The specification of this function in C# is:
RECERR kRecReserveScanner(int sid);
kRecReserveScanner
RECERR RECAPIKRN kRecReserveScanner(int sid)
Reserving the selected scanner.

◆ kRecResetScanner()

RECERR RECAPIKRN kRecResetScanner ( int sid )

Resetting the selected scanner.

Resets the currently selected scanner.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
As a side effect all prescanned images will be lost. This is how to remove prescanned images, such as the back side images in duplex scanning or to stop scanning from ADF when ScanAhead is on if the scanning process needs to be aborted.
The specification of this function in C# is:
RECERR kRecResetScanner(int sid);
kRecResetScanner
RECERR RECAPIKRN kRecResetScanner(int sid)
Resetting the selected scanner.

◆ kRecScanInit()

RECERR RECAPIKRN kRecScanInit | ( | HWND | hWnd,
 |  | LPCTSTR | pScanIni,
 |  | int | iIniLoc,
 |  | LPCTSTR | pISISCustID )

Initializing the scanning subsystem.

The kRecScanInit function will load and initialize the scanning subsystem.

Parameters
[in] | hWnd | The window handle of the main window of the application
[in] | pScanIni | Name of the scanner init file which is normally created by the Scanner Wizard. A NULL value for this parameter means that the default scanner init file, SCANNER.INI will be applied.
[in] | iIniLoc | This parameter determines the location of the SCANNER.INI file if the previous parameter is NULL or it contains a simple file name without path information. See the possible values for the different locations.
[in] | pISISCustID | Internal use only. Set to NULL.
Return values
RECERR
Note
Within the Capture SDK to create a scanner ini file is when the integrating application is distributed together with the Scanner Wizard (SWIZARD.DLL). The Wizard can be called by the kRecScannerWizard or kRecScannerWizardByName functions. In both cases the application's user can choose a scanner type from a listbox. The list of the available scanners depends on the actual Engine configuration, i.e. the RSD files in the Engine Binaries directories.
The integrator or the user can create more than one Scanner init file and use them at different times.
In the place of the hWnd parameter NULL can also be used. Nevertheless, we recommend to avoid the use of the NULL value in the hWnd parameter since hWnd will be the parent of all windows that will appear during scanning.
Unlike in previous versions of the CSDK, this function does not initialize any specific scanner. Use the kRecSetScannerSelected function for this purpose. A former call of
RECERR rc = RecScanInit( "SCANNER.INI", hWnd );
can exactly be replaced by the following sequence:
RECERR rc = kRecScanInit( hWnd, NULL, SCINI_INSTALL, NULL );
if ( rc == REC_OK )
{
rc = kRecSetScannerSelected( 0, NULL, NULL );
if ( rc != REC_OK )
kRecScanQuit();
}
REC_OK
@ REC_OK
Successful operation, no error.
Definition RECERR_doc.h:20
SCINI_INSTALL
#define SCINI_INSTALL
Among executable binaries in the install folder.
Definition KrnScanAPI.h:30
Any scanning functions can return with the scanner error code (RSD_ERROR). In the case of an error, the calling program can inquire the exact scanner error values from the scanning subsystem with the kRecGetLastError function.
The specification of this function in C# is:
RECERR kRecScanInit(IntPtr hWnd, string pScanIni, SCAN_INI iniLoc, string pISIScustID);
// or when hWnd is NULL in C/C++
RECERR kRecScanInit(string pScanIni, SCAN_INI iniLoc, string pISIScustID);

◆ kRecScannerWizard()

RECERR RECAPIKRN kRecScannerWizard | ( | HWND | hWnd,
 |  | LPCTSTR | pProduct )

Opening Scanner Wizard.

Launches the Scanner Wizard.

Parameters
[in] | hWnd | The window handle of the main window of the application to be used as the parent of the Wizard dialog window.
[in] | pProduct | Name of the calling application to be displayed by the Wizard
Return values
RECERR
Note
In the place of the hWnd parameter NULL can also be used, in this case the hWnd given by the call of kRecScanInit will be used.
The specification of this function in C# is:
RECERR kRecScannerWizard(IntPtr hWnd, string pProduct);
// or when hWnd is NULL in C/C++
RECERR kRecScannerWizard(string pProduct);
kRecScannerWizard
RECERR RECAPIKRN kRecScannerWizard(HWND hWnd, LPCTSTR pProduct)
Opening Scanner Wizard.

◆ kRecScannerWizardByName()

RECERR RECAPIKRN kRecScannerWizardByName | ( | HWND | hWnd,
 |  | LPCTSTR | pScanner,
 |  | LPCTSTR | pProduct,
 |  | INTBOOL | bSilent )

Opening the Scanner Wizard for a given scanner.

Launches the Scanner Wizard to set up a specific scanner.

Parameters
[in] | hWnd | The window handle of the main window of the application to be used as the parent of the Wizard dialog window.
[in] | pScanner | The manufacturer and the name of the model separated by a space character
[in] | pProduct | Name of the calling application to be displayed by the Wizard
[in] | bSilent | Silent setup for the scanners with hints in the hint file.
Return values
RECERR
Note
In the place of the hWnd parameter NULL can also be used, in this case the hWnd given by the call of kRecScanInit will be used.
The specification of this function in C# is:
RECERR kRecScannerWizardByName(IntPtr hWnd, string pScanner, string pProduct, bool bSilent);
// or when hWnd is NULL in C/C++
RECERR kRecScannerWizardByName(string pScanner, string pProduct, bool bSilent);
kRecScannerWizardByName
RECERR RECAPIKRN kRecScannerWizardByName(HWND hWnd, LPCTSTR pScanner, LPCTSTR pProduct, INTBOOL bSilent)
Opening the Scanner Wizard for a given scanner.

◆ kRecScanPage()

RECERR RECAPIKRN kRecScanPage | ( | int | sid,
 |  | LPCTSTR | pImgFile,
 |  | IMF_FORMAT | ImgFileFormat )

Scanning a page.

The kRecScanPage function provides a simplified programming interface for scanning a single page and saving it into an image file. The kRecScanPage function activates the PROCESSID::PID_IMGINPUT and PROCESSID::PID_IMGSAVE processes.

Parameters
[in] | sid | Settings Collection ID.
[in] | pImgFile | Name of the image file to be created.
[in] | ImgFileFormat | Image file format of the output image file.
Return values
RECERR
Note
This function assumes that the scanning subsystem has been initialized properly and the application has set the necessary scanning related settings.
The specification of this function in C# is:
RECERR kRecScanPage(int sid, string pImgFile, IMF_FORMAT ImgFileFormat);
IMF_FORMAT
IMF_FORMAT
Image formats.
Definition KernelApi.h:11179
kRecScanPage
RECERR RECAPIKRN kRecScanPage(int sid, LPCTSTR pImgFile, IMF_FORMAT ImgFileFormat)
Scanning a page.

◆ kRecScanPages()

RECERR RECAPIKRN kRecScanPages | ( | int | sid,
 |  | LPCTSTR | pImgFile,
 |  | IMF_FORMAT | ImgFileFormat,
 |  | LPONETOUCH_CB | pCallBack,
 |  | void * | pContext )

Scanning pages.

The kRecScanPages function provides a simplified programming interface for scanning several pages and saving them into a multi-page image file. The kRecScanPages function activates the PROCESSID::PID_IMGINPUT and PROCESSID::PID_IMGSAVE processes.

Parameters
[in] | sid | Settings Collection ID.
[in] | pImgFile | Name of the output image file.
[in] | ImgFileFormat | Image file format of the output image file.
[in] | pCallBack | Callback function provided by the application or NULL.
[in] | pContext | This pointer is transferred to the pCallBack function when it is called.
Return values
RECERR
Note
This function assumes that the scanning subsystem has been initialized properly and the application has set the necessary scanning related settings.
If the scanner is equipped with an ADF, and a NULL value was specified in the place of the pCallBack parameter the function will read pages one after each other continuously from the scanner until the ADF becomes empty.
The specification of this function in C# is:
RECERR kRecScanPages(int sid, string pImgFile, IMF_FORMAT ImgFileFormat, ONETOUCH_CB callback);
ONETOUCH_CB
INTBOOL RECKRNCALL ONETOUCH_CB(INTBOOL bMore, void *pContext, LPCTSTR *notused)
The user-written "One-touch" callback function.
Definition KernelApi.h:929
kRecScanPages
RECERR RECAPIKRN kRecScanPages(int sid, LPCTSTR pImgFile, IMF_FORMAT ImgFileFormat, LPONETOUCH_CB pCallBack, void *pContext)
Scanning pages.

◆ kRecScanPreloadADF()

RECERR RECAPIKRN kRecScanPreloadADF ( int sid )

Preloading the ADF.

The kRecScanPreloadADF function will preload the ADF of the currently selected scanner if the scanner is capable of this.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecScanPreloadADF(int sid);
kRecScanPreloadADF
RECERR RECAPIKRN kRecScanPreloadADF(int sid)
Preloading the ADF.

◆ kRecScanQuit()

RECERR RECAPIKRN kRecScanQuit ( void )

Closing the scanning subsystem.

The kRecScanQuit function is used to terminate the running of the scanning subsystem. The scanning system will be closed when this function is called as many times as kRecScanInit has been called i.e. all previous kRecScanInit calls should be balanced by the appropriate kRecScanQuit call.

Return values
RECERR
Note
Note that the termination of the engine requires a separate kRecQuit function call.
The specification of this function in C# is:
RECERR kRecScanQuit();

◆ kRecScanReloadADF()

RECERR RECAPIKRN kRecScanReloadADF ( int sid )

Reloading the ADF.

The kRecScanReloadADF function will reload the ADF of the currently selected scanner if the scanner is capable of this.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecScanReloadADF(int sid);
kRecScanReloadADF
RECERR RECAPIKRN kRecScanReloadADF(int sid)
Reloading the ADF.

◆ kRecScanUnloadADF()

RECERR RECAPIKRN kRecScanUnloadADF ( int sid )

Unloading the ADF.

The kRecScanUnloadADF function will unload the ADF of the currently selected scanner if the scanner is capable of this.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecScanUnloadADF(int sid);
kRecScanUnloadADF
RECERR RECAPIKRN kRecScanUnloadADF(int sid)
Unloading the ADF.

◆ kRecSetScanArea()

RECERR RECAPIKRN kRecSetScanArea | ( | int | sid,
 |  | LPCRECT | pRect )

Setting scanning area.

The kRecSetScanArea function is used to specify the dimensions of the scanning area of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] sid Settings Collection ID.
[in] pRect Pointer to the structure of the dimensions. The fields of pRect are as follows:
  • left : left margin of the scanning area,
  • top : top margin of the scanning area,
  • right : scanning width (not the right margin!),
  • bottom : scanning length (not the bottom margin!).
Return values
RECERR
Note
All values are measured in 1/1200 inches.
If this function is not called to specify the paper size, the size of the current paper source will be applied.
This function sets the settings Kernel.Scanner.Left, Kernel.Scanner.Top, Kernel.Scanner.Length, Kernel.Scanner.Width. These settings can be retrieved by kRecGetScanArea.
The specification of this function in C# is:
RECERR kRecSetScanArea(int sid, RECT pRect);
kRecSetScanArea
RECERR RECAPIKRN kRecSetScanArea(int sid, LPCRECT pRect)
Setting scanning area.

◆ kRecSetScanBitsPerSample()

RECERR RECAPIKRN kRecSetScanBitsPerSample | ( | int | sid,
 |  | RSDII | Bps )

Setting scanning mode.

The kRecSetScanBitsPerSample function is used to specify the scanning mode of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[in] | Bps | Scanning mode to be set
Return values
RECERR
Note
If requested, during the PROCESSID::PID_IMGINPUT process an image conversion is also performed, according to the Conversion parameter of a previous kRecSetImgConvMode call. The resulting image type (e.g. B/W, 8-bit gray, etc.) of the new image will be determined by both the Bps and the specified image conversion mode parameters.
If this function is not called to specify the scanning mode, the default value of Black-and-white scanning will be applied.
This function sets the setting Kernel.Scanner.Bps. This setting can be retrieved by kRecGetScanBitsPerSample.
The specification of this function in C# is:
RECERR kRecSetScanBitsPerSample(int sid, RSDII Bps);

◆ kRecSetScanBrightness()

RECERR RECAPIKRN kRecSetScanBrightness | ( | int | sid,
 |  | UINT | Brightness )

Setting brightness in %.

The kRecSetScanBrightness function is used to specify the brightness of subsequent scanning(s) of the currently selected scanner as a percentage. Higher values result in brighter (lighter) images. A special value of AUTOBRIGHTNESS can be used for automatic brightness control if the scanner is capable.

Parameters
[in] | sid | Settings Collection ID.
[in] | Brightness | Brightness value to be set. The value should be in the range of 0-100% or for automatic brightness control the AUTOBRIGHTNESS value can be specified.
Return values
RECERR
Note
Use the kRecGetScanBrightnessMaxVal function to determine whether the brightness can be set for the currently installed scanner.
This function and also kRecSetScanBrightnessVal set the settings Kernel.Scanner.Brightness and Kernel.Scanner.BrightnessVal. These settings can be retrieved by kRecGetScanBrightnessVal and kRecGetScanBrightness.
The specification of this function in C# is:
RECERR kRecSetScanBrightness(int sid, uint Brightness);
kRecSetScanBrightness
RECERR RECAPIKRN kRecSetScanBrightness(int sid, UINT Brightness)
Setting brightness in %.

◆ kRecSetScanBrightnessVal()

RECERR RECAPIKRN kRecSetScanBrightnessVal | ( | int | sid,
 |  | UINT | Brightness )

Setting brightness.

The kRecSetScanBrightnessVal function is used to specify the brightness of subsequent scanning(s) of the currently selected scanner. Higher values result in brighter (lighter) images. A special value of AUTOBRIGHTNESS can be used for automatic brightness control if the scanner is capable of this.

Parameters
[in] | sid | Settings Collection ID.
[in] | Brightness | Brightness value to be set. The minimum value is zero (0), the maximum value is the value returned by kRecGetScanBrightnessMaxVal minus one (1) or for automatic brightness control the AUTOBRIGHTNESS value can be specified.
Return values
RECERR
Note
Use the kRecGetScanBrightnessMaxVal function to determine whether the brightness can be set for the currently selected scanner.
This function and also kRecSetScanBrightness set the settings Kernel.Scanner.Brightness and Kernel.Scanner.BrightnessVal. These settings can be retrieved by kRecGetScanBrightnessVal and kRecGetScanBrightness.
The specification of this function in C# is:
RECERR kRecSetScanBrightnessVal(int sid, uint Brightness);
kRecSetScanBrightnessVal
RECERR RECAPIKRN kRecSetScanBrightnessVal(int sid, UINT Brightness)
Setting brightness.

◆ kRecSetScanContrast()

RECERR RECAPIKRN kRecSetScanContrast | ( | int | sid,
 |  | UINT | Contrast )

Setting contrast in %.

The kRecSetScanContrast function is used to specify the contrast of subsequent scanning(s) of the currently selected scanner as a percentage.

Parameters
[in] | sid | Settings Collection ID.
[in] | Contrast | Contrast value to be set. The value should be in the range of 0-100%.
Return values
RECERR
Note
Use the kRecGetScanContrastMaxVal function to determine whether the contrast can be set for the currently installed scanner.
This function and also kRecSetScanContrastVal set the settings Kernel.Scanner.Contrast and Kernel.Scanner.ContrastVal. These settings can be retrieved by kRecGetScanContrastVal and kRecGetScanContrast.
The specification of this function in C# is:
RECERR kRecSetScanContrast(int sid, uint Contrast);
kRecSetScanContrast
RECERR RECAPIKRN kRecSetScanContrast(int sid, UINT Contrast)
Setting contrast in %.

◆ kRecSetScanContrastVal()

RECERR RECAPIKRN kRecSetScanContrastVal | ( | int | sid,
 |  | UINT | Contrast )

Setting contrast.

The kRecSetScanContrastVal function is used to specify the contrast of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[in] | Contrast | Contrast value to be set. The minimum value is zero (0), the maximum value is the value returned by kRecGetScanContrastMaxVal minus one (1).
Return values
RECERR
Note
Use the kRecGetScanContrastMaxVal function to determine whether the contrast can be set for the currently selected scanner.
This function and also kRecSetScanContrast set the settings Kernel.Scanner.Contrast and Kernel.Scanner.ContrastVal. These settings can be retrieved by kRecGetScanContrastVal and kRecGetScanContrast.
The specification of this function in C# is:
RECERR kRecSetScanContrastVal(int sid, uint Contrast);
kRecSetScanContrastVal
RECERR RECAPIKRN kRecSetScanContrastVal(int sid, UINT Contrast)
Setting contrast.

◆ kRecSetScanDefaults()

RECERR RECAPIKRN kRecSetScanDefaults ( int sid )

Setting scanner parameters to default.

The kRecSetScanDefaults function is used to set the parameters of subsequent scanning(s) of the currently selected scanner to their default values.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
The default scanner settings are as follows:
  • Paper Source = RSDPS_ADF_AUTO;
  • Duplex = RSDDX_SIMPLEX
  • Resolution = 300;
  • ScanArea = 0, 0, 9921, 14031 or 0, 0, 10200, 13200;
  • PaperSize = A4 or Letter;
  • Brightness = default of the scanner;
  • Contrast = default of the scanner;
  • BitsPerSample = RSDII_BW;
  • Dropout = RSDLC_WHITE;
Which means that a forthcoming scanning process will be performed as B/W scanning without dropout color filtering at 300 dpi resolution while the scanner brightness and contrast will be set to their default values. The scanning subsystem will be prepared for an A4-size or Letter-size paper to be scanned depending on the regional settings.
The specification of this function in C# is:
RECERR kRecSetScanDefaults(int sid);
kRecSetScanDefaults
RECERR RECAPIKRN kRecSetScanDefaults(int sid)
Setting scanner parameters to default.

◆ kRecSetScanDropout()

RECERR RECAPIKRN kRecSetScanDropout | ( | int | sid,
 |  | RSDLC | Color )

Setting dropout color.

The kRecSetScanDropout function is used to specify the dropout color of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[in] | Color | Dropout color to be set
Return values
RECERR
Note
The dropout color feature can be used to eliminate color background patterns in documents to be scanned. Scanning with a dropout color may mean that lines, borders, frames etc. visible on the input document become invisible on the scanned image. This can be useful for forms or checkmark processing.
If this function has not been called, the default value of the dropout color setting, RSDLC_WHITE, will be applied.
This function sets the setting Kernel.Scanner.Dropout. This setting can be retrieved by kRecGetScanDropout.
The specification of this function in C# is:
RECERR kRecSetScanDropout(int sid, RSDLC Color);

◆ kRecSetScanDuplex()

RECERR RECAPIKRN kRecSetScanDuplex | ( | int | sid,
 |  | RSDDX | Duplex )

Setting duplex scanning mode.

The kRecSetScanDuplex function is used to specify the duplex scanning mode of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[in] | Duplex | Duplex scanning mode setting to be set.
Return values
RECERR
Note
This function sets the setting Kernel.Scanner.Duplex. This setting can be retrieved by kRecGetScanDuplex.
The specification of this function in C# is:
RECERR kRecSetScanDuplex(int sid, RSDDX Duplex);
kRecSetScanDuplex
RECERR RECAPIKRN kRecSetScanDuplex(int sid, RSDDX Duplex)
Setting duplex scanning mode.

◆ kRecSetScanErrorMode()

RECERR RECAPIKRN kRecSetScanErrorMode | ( | int | sid,
 |  | INTBOOL | Ignore )

Setting error mode.

The kRecSetScanErrorMode function is used to set the error mode of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[in] | Ignore | Ignore errors in kRecSetScanParamsBySettings function if TRUE.
Return values
RECERR
Note
The kRecSetScanParamsBySettings function sets all scanner parameters with the appropriate settings. Any settings with invalid values will be substituted by the appropriate default values if the Ignore parameter is TRUE. Otherwise only valid values will be set, invalid values will be ignored and the return code of kRecSetScanParamsBySettings will indicate the first invalid one.
This function sets the setting Kernel.Scanner.IgnoreErrors. This setting can be retrieved by kRecGetScanErrorMode.
The specification of this function in C# is:
RECERR kRecSetScanErrorMode(int sid, bool Ignore);
kRecSetScanErrorMode
RECERR RECAPIKRN kRecSetScanErrorMode(int sid, INTBOOL Ignore)
Setting error mode.

◆ kRecSetScannerSelected()

RECERR RECAPIKRN kRecSetScannerSelected | ( | int | sid,
 |  | LPCTSTR | pScanner,
 |  | LPINTBOOL | pCallWiz )

Selecting a scanner.

Selects a scanner from the initialized ones. The init file is the same as used by the last kRecGetScanners function or the same as used by the kRecScanInit function if kRecGetScanners has never been called in the current Settings Collection. The selected scanner is the first one in the scanner init file, if this function is called with a NULL pointer. This way it is compatible with the previous version. All of the subsequent function calls use the selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[in] | pScanner | The manufacturer and the name of the scanner model separated by a space character. If this pointer is NULL the first scanner will be selected from the init file.
[out] | pCallWiz | If TRUE is returned in this flag, the application should call the Scanner Wizard to select another scanner because the selected scanner is not available. This pointer may be NULL.
Return values
RECERR
Note
After having called this function, the currently selected scanner model and its manufacturer can be retrieved with the kRecGetScannerModel and kRecGetScannerManufacturer functions, respectively.
In general, this function does not check that the scanner is switched on or ready for use. It requires only the presence of the correct scanner driver. The application may check the scanner by calling an inquiry function which communicates with it, e.g. kRecGetScanADF.
This function sets the value of the settings Kernel.Scanner, Kernel.Scanner.Name, Scanners and builds up the setting subtree of the currently selected scanner (if it does not exist yet), which will be under the Scanners node. For details, see Settings of the Scanner Module, Different ways of adjusting scanner settings and the description of Symbolic links.
The specification of this function in C# is:
RECERR kRecSetScannerSelected(int sid, string pScanner, out bool pCallWiz);
// or when pCallWiz is NULL in C/C++
RECERR kRecSetScannerSelected(int sid, string pScanner);

◆ kRecSetScannerUnselected()

RECERR RECAPIKRN kRecSetScannerUnselected ( int sid )

Initializing the scanning subsystem.

The kRecSetScannerUnselected function will release the previously selected (kRecSetScannerSelected) scanner

Parameters
[in] sid Settings Collection ID.
Return values
RECERR

◆ kRecSetScanOrientation()

RECERR RECAPIKRN kRecSetScanOrientation | ( | int | sid,
 |  | RSDOR | Orientation )

Setting orientation.

The kRecSetScanOrientation function is used to specify the orientation of subsequent scanning(s) of the currently selected scanner if the scanner is capable of rotating or mirroring the image.

Parameters
[in] | sid | Settings Collection ID.
[in] | Orientation | Orientation to be set
Return values
RECERR
Note
This function sets the setting Kernel.Scanner.Orientation. This setting can be retrieved by kRecGetScanOrientation.
The specification of this function in C# is:
RECERR kRecSetScanOrientation(int sid, RSDOR Orientation);
kRecSetScanOrientation
RECERR RECAPIKRN kRecSetScanOrientation(int sid, RSDOR Orientation)
Setting orientation.

◆ kRecSetScanPaperSize()

RECERR RECAPIKRN kRecSetScanPaperSize | ( | int | sid,
 |  | LPCSIZE | pPaperSize )

Setting paper size.

The kRecSetScanPaperSize function is used to specify the paper size of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] sid Settings Collection ID.
[in] pPaperSize Pointer to the structure of the paper size. The fields are as follows:
  • cx : paper width,
  • cy : paper length.
Return values
RECERR
Note
All values are measured in 1/1200 inches.
If this function is not called to specify the paper size, the size of the current paper source will be applied.
Using this function is highly recommended for the proper alignment of the image.
This function sets the settings Kernel.Scanner.PaperLength, Kernel.Scanner.PaperWidth. These settings can be retrieved by kRecGetScanPaperSize.
The specification of this function in C# is:
RECERR kRecSetScanPaperSize(int sid, SIZE pPaperSize);
kRecSetScanPaperSize
RECERR RECAPIKRN kRecSetScanPaperSize(int sid, LPCSIZE pPaperSize)
Setting paper size.

◆ kRecSetScanPaperSource()

RECERR RECAPIKRN kRecSetScanPaperSource | ( | int | sid,
 |  | RSDPS | PaperSource )

Setting paper source.

The kRecSetScanPaperSource function is used to specify the paper source of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[in] | PaperSource | Paper source to be set
Return values
RECERR
Note
The default value is RSDPS_ADF_AUTO, which means that if the scanner has an ADF installed and it is loaded with paper, it will be the paper source, otherwise the scanner will scan from another paper source (typically the flat-bed).
If the scanner has different paper sources for scanning, the application can specify here from which paper source the scanning should be performed.
RSDPS_ADF_AUTOLOAD or RSDPS_ADF_SCANAHEAD can be ORed to RSDPS_ADF_AUTO or RSDPS_ADF to speed up scanning from ADF.
This function sets the setting Kernel.Scanner.PaperSource. This setting can be retrieved by kRecGetScanPaperSource.
The specification of this function in C# is:
RECERR kRecSetScanPaperSource(int sid, RSDPS PaperSource);
kRecSetScanPaperSource
RECERR RECAPIKRN kRecSetScanPaperSource(int sid, RSDPS PaperSource)
Setting paper source.

◆ kRecSetScanParamsBySettings()

RECERR RECAPIKRN kRecSetScanParamsBySettings ( int sid )

Sending the setting values to the scanning subsystem.

The kRecSetScanParamsBySettings function is used to set the parameters of subsequent scanning(s) of the currently selected scanner by the current setting values of the current Settings Collection.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
Functions retrieving scan parameters can get their returned values from two different sources: from the scanning system or from the corresponding setting. Normally these values are the same but in special cases they can be different in which cases the functions return with a warning status. See also scanner setting synchronization.
The specification of this function in C# is:
RECERR kRecSetScanParamsBySettings(int sid);
kRecSetScanParamsBySettings
RECERR RECAPIKRN kRecSetScanParamsBySettings(int sid)
Sending the setting values to the scanning subsystem.

◆ kRecSetScanParamSource()

RECERR RECAPIKRN kRecSetScanParamSource | ( | int | sid,
 |  | INTBOOL | FromScanner )

Setting the source of parameters.

The kRecSetScanParamSource function is used to set the source of parameters of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[in] | FromScanner | Return parameter values from the scanning system by the appropriate functions if TRUE; return the corresponding setting values if FALSE.
Return values
RECERR
Note
Functions retrieving scan parameters can get their returned values from two different sources: from the scanning system or from the corresponding setting. Normally these values are the same but in special cases they can be different in which cases the functions return with a warning status. The returned values will be the corresponding settings if the FromScanner parameter is FALSE otherwise they will be retrieved from the scanning system. See also scanner setting synchronization.
This function sets the setting Kernel.Scanner.GetParamsFromScanner. This setting can be retrieved by kRecGetScanParamSource.
The specification of this function in C# is:
RECERR kRecSetScanParamSource(int sid, bool FromScanner);
kRecSetScanParamSource
RECERR RECAPIKRN kRecSetScanParamSource(int sid, INTBOOL FromScanner)
Setting the source of parameters.

◆ kRecSetScanResolution()

RECERR RECAPIKRN kRecSetScanResolution | ( | int | sid,
 |  | UINT | Resolution )

Setting resolution.

The kRecSetScanResolution function is used to specify the resolution of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[in] | Resolution | Scanning resolution to be set in DPI
Return values
RECERR
Note
If this function is not called to specify the scanning resolution, the default value, 300 DPI will be applied.
This function sets the setting Kernel.Scanner.Resolution. This setting can be retrieved by kRecGetScanResolution.
The specification of this function in C# is:
RECERR kRecSetScanResolution(int sid, uint Resolution);
kRecSetScanResolution
RECERR RECAPIKRN kRecSetScanResolution(int sid, UINT Resolution)
Setting resolution.

◆ kRecSetScanStartMode()

RECERR RECAPIKRN kRecSetScanStartMode | ( | int | sid,
 |  | RSDST | Start )

Setting starting mode.

The kRecSetScanStartMode function is used to specify the starting mode of subsequent scanning(s) of the currently selected scanner.

Parameters
[in] | sid | Settings Collection ID.
[in] | Start | Starting mode to be set
Return values
RECERR
Note
One UI mode may be ORed with the start mode if supported.
The UI mode set here will override the one set by the Wizard.
This function sets the setting Kernel.Scanner.StartMode. This setting can be retrieved by kRecGetScanStartMode.
The specification of this function in C# is:
RECERR kRecSetScanStartMode(int sid, RSDST Start);
kRecSetScanStartMode
RECERR RECAPIKRN kRecSetScanStartMode(int sid, RSDST Start)
Setting starting mode.


RecAPI: Image Handling Module

Classes | Macros | Typedefs | Enumerations | Functions
Image Handling Module
KernelAPI

Image handling tools. More...

Classes

struct | _IMG_INFO
Structure of an image containing basic physical information. More...
struct | _COMPRESSED_IMG_INFO
Basic physical information of a compressed image buffer. More...
struct | CUT_INFO
Structure for book images. More...
struct | PREPROC_INFO
Information about preprocessing. More...
struct | RLINE
Structure of a line. More...

Macros

#define | PHOLE_DETECT 1
Detect punch holes. It is combinable with PHOLE_REMOVE.
#define | PHOLE_REMOVE 2
Remove punch holes. It is combinable with PHOLE_DETECT.
#define | CROP_CLEARMARGIN 1
#define | CONVIMG_PALETTE 1
Create palette image.
#define | CONVIMG_ERRDIFF 2
Use error diffusion to simulate shades.

Typedefs

typedef struct _IMG_INFO | IMG_INFO
Structure of an image containing basic physical information.
typedef IMG_INFO * | LPIMG_INFO
Pointer to a structure IMG_INFO.
typedef const IMG_INFO * | LPCIMG_INFO
Const pointer to a structure IMG_INFO.
typedef struct _COMPRESSED_IMG_INFO | COMPRESSED_IMG_INFO
Basic physical information of a compressed image buffer.
typedef COMPRESSED_IMG_INFO * | LPCOMPRESSED_IMG_INFO
Pointer to a structure COMPRESSED_IMG_INFO.
typedef const COMPRESSED_IMG_INFO * | LPCCOMPRESSED_IMG_INFO
Const pointer to a structure COMPRESSED_IMG_INFO.
typedef struct RECPAGESTRUCT * | HPAGE
Handle of a page in memory.
typedef enum IMG_CONVERSION | IMG_CONVERSION
Image conversion types.
typedef IMG_CONVERSION * | LPIMG_CONVERSION
Pointer to an enum type IMG_CONVERSION.
typedef DWORD | REC_COLOR
Color type.

Enumerations

enum IMG_COMPRESSION {
COMPRESS_TIFHU = 0 ,
COMPRESS_TIFG31 ,
COMPRESS_TIFG32 ,
COMPRESS_TIFG4 ,
COMPRESS_JPEG ,
COMPRESS_JPG2K ,
COMPRESS_SIZE
}
Image compression types. More...
enum JPG_RESOLUTION {
JPG_RES_USEDEFAULTDPI = 0 ,
JPG_RES_USEEXIF
}
Image resolution for JPEG files. More...
enum JPG_ORIENTATION {
JPG_ORIENTATION_IGNOREEXIF = 0 ,
JPG_ORIENTATION_USEEXIF
}
Image orientation for JPEG files. More...
enum IMG_CONVERSION {
CNV_AUTO = 0 ,
CNV_SET ,
CNV_NO ,
CNV_GLOBAL ,
CNV_GRAY
}
Image conversion types. More...
enum IMG_ROTATE {
ROT_AUTO = 0 ,
ROT_NO ,
ROT_RIGHT ,
ROT_DOWN ,
ROT_LEFT ,
ROT_FLIPPED = ROT_NO + 0x80 ,
ROT_RIGHT_FLIPPED ,
ROT_DOWN_FLIPPED ,
ROT_LEFT_FLIPPED
}
Available image transformations (rotation and/or mirroring). More...
enum IMG_LINEORDER {
TOP_DOWN = 0 ,
BOTTOM_UP
}
Image line order. More...
enum IMG_PADDING {
PAD_BYTEBOUNDARY = 1 ,
PAD_WORDBOUNDARY = 2 ,
PAD_DWORDBOUNDARY = 4
}
Image padding. More...
enum IMG_RGBORDER {
COLOR_RGB = 0 ,
COLOR_BGR ,
COLOR_BGRA ,
COLOR_ARGB
}
Image color order. More...
enum IMG_RESENH {
RE_NO ,
RE_YES ,
RE_LEGACY ,
RE_STANDARD ,
RE_AUTO
}
Image resolution enhancement. More...
enum IMG_INVERT {
INV_NO = 0 ,
INV_YES ,
INV_AUTO
}
Image inversion mode. More...
enum IMG_DESKEW {
DSK_2D = 0 ,
DSK_AUTO = DSK_2D ,
DSK_NO ,
DSK_SET ,
DSK_3D ,
DSK_AUTO3D
}
Image deskewing mode. More...
enum IMG_STRETCHMODE {
STRETCH_DELETE = 0 ,
STRETCH_OR ,
STRETCH_AND ,
STRETCH_AVG
}
Image stretching mode. More...
enum IMG_SCREENCAPTURE {
SCR_NO ,
SCR_AUTO ,
SCR_YES
}
Preprocessing of screen captures. More...
enum IMAGEINDEX {
II_UNDEFINED = -1 ,
II_BGLAYER ,
II_ORIGINAL ,
II_CURRENT ,
II_BW ,
II_OCR ,
II_THUMBNAIL ,
II_OUTPUT ,
II_HANDPRINT_BW ,
II_SIZE ,
II_RESERVED1 = 100 ,
II_RESERVED2
}
Index of each image type in HPAGE. More...
enum PREPROC_INFO_FLAGS {
PREPROC_INFO_FAXCORRECTION = 1 ,
PREPROC_INFO_INVERSION = 2 ,
PREPROC_INFO_3DDESKEW = 4 ,
PREPROC_INFO_STRAIGHTENED = 8 ,
PREPROC_INFO_HALFTONE = 16
}
Flags for the structure PREPROC_INFO. More...
enum PROCESSING_MODE {
PROCESSING_NORMAL = 0 ,
PROCESSING_BOOK = 1
}
Switching between processing modes. More...
enum FILLAREA_FLAGS {
FILL_INSIDE = 0 ,
FILL_OUTSIDE = 1 ,
FILL_FLEXIBLEBPS = 2
}
Determining the area to be filled by kRecFillImgArea. More...
enum DESPECKLE_METHOD {
DESPECKLE_AUTO = 0 ,
DESPECKLE_NORMAL ,
DESPECKLE_INVERSE ,
DESPECKLE_HALFTONE ,
DESPECKLE_MEDIAN ,
DESPECKLE_SMOOTHEDGE ,
DESPECKLE_MEDIANEX ,
DESPECKLE_PEPPER = 8 ,
DESPECKLE_SALT = 16 ,
DESPECKLE_PEPPERANDSALT = (DESPECKLE_PEPPER | DESPECKLE_SALT)
}
Despeckle method used by kRecForceDespeckleImg. More...
enum ERO_DIL_TYPE {
ERO_DIL_3 = 0 ,
ERO_DIL_4 ,
ERO_DIL_8
}
Type of neighborhood used by kRecImgErosion and kRecImgDilatation. More...
enum IMG_FLAGS {
IMG_FLAGS_CAMERAIMAGE = 0 ,
IMG_FLAGS_NORESOLUTION
}
Image flags. More...
enum RETAINCOLOR {
RETAINCOLOR_NO ,
RETAINCOLOR_YES ,
RETAINCOLOR_INVERTED
}
Retain color. More...

Functions

RECERR RECAPIKRN | kRecSetImgDownsample (int sid, INTBOOL downsample)
Changing the view downsample setting.
RECERR RECAPIKRN | kRecGetImgDownsample (int sid, INTBOOL *pdownsample)
Getting the value of view downsample setting.
RECERR RECAPIKRN | kRecSetPreserveOriginalImg (int sid, INTBOOL preserve)
Changing the keep original image setting.
RECERR RECAPIKRN | kRecGetPreserveOriginalImg (int sid, INTBOOL *pPreserve)
Getting the value of the keep original image setting.
RECERR RECAPIKRN | kRecSetFaxCorrection (int sid, INTBOOL corr)
Changing the fax correction setting.
RECERR RECAPIKRN | kRecGetFaxCorrection (int sid, INTBOOL *pCorr)
Getting the value of fax correction setting.
RECERR RECAPIKRN | kRecSetThumbnailImgInfo (int sid, const IMG_INFO *pThumbnail, REC_COLOR color)
Changing the thumbnail image info settings.
RECERR RECAPIKRN | kRecGetThumbnailImgInfo (int sid, IMG_INFO *pThumbnail, REC_COLOR *pColor)
Getting the value of thumbnail image info settings.
RECERR RECAPIKRN | kRecSetImgBinarizationMode (int sid, IMG_CONVERSION BWConversion)
Setting secondary image conversion mode.
RECERR RECAPIKRN | kRecGetImgBinarizationMode (int sid, LPIMG_CONVERSION pBWConversion)
Getting secondary image conversion mode.
RECERR RECAPIKRN | kRecSetImgBrightness (int sid, int Brightness)
Setting brightness.
RECERR RECAPIKRN | kRecGetImgBrightness (int sid, int *lpBrightness)
Getting brightness.
RECERR RECAPIKRN | kRecSetImgThreshold (int sid, int Threshold)
Setting the binarization threshold.
RECERR RECAPIKRN | kRecGetImgThreshold (int sid, int *pThreshold)
Getting binarization threshold.
RECERR RECAPIKRN | kRecSetImgInvert (int sid, IMG_INVERT ImgInvert)
Setting inversion mode.
RECERR RECAPIKRN | kRecGetImgInvert (int sid, IMG_INVERT *lpImgInvert)
Getting inversion mode.
RECERR RECAPIKRN | kRecSetImgDeskew (int sid, IMG_DESKEW _ImgDeskew)
Setting deskew mode.
RECERR RECAPIKRN | kRecGetImgDeskew (int sid, IMG_DESKEW *pImgDeskew)
Getting deskew mode.
RECERR RECAPIKRN | kRecSetImgSlope (int sid, int Slope)
Setting the slope.
RECERR RECAPIKRN | kRecGetImgSlope (int sid, int *lpSlope)
Getting the slope.
RECERR RECAPIKRN | kRecSetImgRotation (int sid, IMG_ROTATE imgRotate)
Setting rotation mode.
RECERR RECAPIKRN | kRecGetImgRotation (int sid, IMG_ROTATE *lpImgRotate)
Getting rotation mode.
RECERR RECAPIKRN | kRecSetImgFormat (int sid, IMG_LINEORDER lineord, IMG_PADDING padding, IMG_RGBORDER ord)
Setting image format.
RECERR RECAPIKRN | kRecGetImgFormat (int sid, IMG_LINEORDER *plineord, IMG_PADDING *ppadding, IMG_RGBORDER *pord)
Getting image format.
RECERR RECAPIKRN | kRecSetImgStretchMode (int sid, IMG_STRETCHMODE ImgStretchMode)
Setting stretching mode.
RECERR RECAPIKRN | kRecGetImgStretchMode (int sid, IMG_STRETCHMODE *pImgStretchMode)
Getting stretching mode.
RECERR RECAPIKRN | kRecSetImgResolEnhancement (int sid, IMG_RESENH res)
Setting resolution enhancement mode.
RECERR RECAPIKRN | kRecGetImgResolEnhancement (int sid, IMG_RESENH *res)
Getting resolution enhancement mode.
RECERR RECAPIKRN | kRecSetImgDespeckleMode (int sid, INTBOOL bMode)
Setting despeckle mode.
RECERR RECAPIKRN | kRecGetImgDespeckleMode (int sid, LPINTBOOL lpbMode)
Getting despeckle mode.
RECERR RECAPIKRN | kRecSetImgConvMode (int sid, IMG_CONVERSION Conversion)
Setting the primary image conversion mode.
RECERR RECAPIKRN | kRecGetImgConvMode (int sid, IMG_CONVERSION *pConversion)
Getting primary image conversion mode.
RECERR RECAPIKRN | kRecPreprocessImg (int sid, HPAGE hPage)
Image preprocessing.
RECERR RECAPIKRN | kRecGetPreprocessInfo (HPAGE hPage, PREPROC_INFO *pPreprocInfo)
Returning information about the preprocessing.
RECERR RECAPIKRN | kRecRemovePunchHoles (int sid, HPAGE hPage, LPCRECT ROIs, int nROIs, LPRECT *Holes, int *nHoles, UINT flags, UINT minDiameter, UINT maxDiameter)
Removing punch holes.
RECERR RECAPIKRN | kRecRemoveBorders (int sid, HPAGE hPage, UINT maxWidth)
Removing marginal shadows.
RECERR RECAPIKRN | kRecDetectBook (int sid, HPAGE hPage, CUT_INFO *pInfo)
Detecting facing book pages.
RECERR RECAPIKRN | kRecCreateBookPages (int sid, HPAGE hPage, HPAGE *phPage1, HPAGE *phPage2, const CUT_INFO *pInfo)
Cutting each opened book image into two pages.
RECERR RECAPIKRN | kRecResetBookSize (int sid)
Resetting the stored book page size.
RECERR RECAPIKRN | kRecDetectBlankPage (int sid, HPAGE hPage, INTBOOL *pIsBlank)
Detecting blank pages.
RECERR RECAPIKRN | kRecAutoCropImg (int sid, HPAGE hPage, int lrMargin, int tbMargin, UINT flags)
Cropping white border.
RECERR RECAPIKRN | kRecDetectFillingMethod (int sid, HPAGE hPage, FILLINGMETHOD *pocrType)
Detection of filling method.
RECERR RECAPIKRN | kRecDetectImgSkew (int sid, HPAGE hPage, int *pSlope, IMG_ROTATE *pImgRotate)
Detecting orientation and skew.
RECERR RECAPIKRN | kRecPutImgArea (int sid, LPCIMG_INFO lpImg, const BYTE *lpBitmap, HPAGE hPage, int xDst, int yDst, LPCSIZE pDstSize)
Updating image area.
RECERR RECAPIKRN | kRecGetImgArea (int sid, HPAGE hPageIn, IMAGEINDEX iiImg, LPCRECT pSrcRect, LPCSIZE pDstSize, LPIMG_INFO pImg, BYTE **ppBitmap)
Getting image area.
RECERR RECAPIKRN | kRecGetImgAreaEx (int sid, HPAGE hPageIn, IMAGEINDEX iiImg, LPCRECT pSrcRect, LPCSIZE pDstSize, IMG_STRETCHMODE StretchMode, IMG_LINEORDER LineOrder, IMG_RGBORDER RGBOrder, INTBOOL strict, IMG_PADDING Padding, LPIMG_INFO pImg, BYTE **ppBitmap)
Getting image area.
RECERR RECAPIKRN | kRecStartReadImg (int sid, HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pRect, IMG_ROTATE ImgRotation, LPWORD pBytes)
Starting to read an image line-by-line.
RECERR RECAPIKRN | kRecReadImg (int sid, LPBYTE pBuff)
Reading an image line-by-line.
RECERR RECAPIKRN | kRecStopReadImg (int sid)
Stopping to read an image line-by-line.
RECERR RECAPIKRN | kRecStartWriteImg (int sid, LPCIMG_INFO pImg)
Starting to write an image line-by-line.
RECERR RECAPIKRN | kRecWriteImg (int sid, const LPBYTE pBuff)
Writing an image line-by-line.
RECERR RECAPIKRN | kRecStopWriteImg (int sid, HPAGE *phPage)
Stopping the writing of an image line-by-line.
RECERR RECAPIKRN | kRecRotateImgArea (int sid, HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pSrcRect, IMG_ROTATE Rotation, LPIMG_INFO lpImg, BYTE **lplpBitmap)
Copying image area with rotation.
RECERR RECAPIKRN | kRecInvertImgArea (int sid, HPAGE hPage, LPCRECT lpRect)
Inverting image area.
RECERR RECAPIKRN | kRecClearImgArea (int sid, HPAGE hPage, LPCRECT lpRect)
Clearing image area.
RECERR RECAPIKRN | kRecFillImgArea (int sid, HPAGE hPage, LPCRECT lpRect, REC_COLOR color, FILLAREA_FLAGS flags)
Filling image areas with a specified color.
RECERR RECAPIKRN | kRecDeskewImg (int sid, HPAGE hPage, int ImgSlope)
Deskewing.
RECERR RECAPIKRN | kRec3DDeskewImg (int sid, HPAGE hPage)
3D deskewing
RECERR RECAPIKRN | kRecEnhanceWhiteboardImg (HPAGE hPage)
Enhancing images taken from whiteboards.
RECERR RECAPIKRN | kRecTransformImgByMatrix (int sid, HPAGE hPage, const SIZE *newsize, const double *matrix)
Performing geometrical transformation determined by a matrix.
RECERR RECAPIKRN | kRecTransformImgByPoints (int sid, HPAGE hPage, const SIZE *newsize, const POINT *pOriginal, const POINT *pTransformed, int nPoints)
Performing geometrical transformation determined by points.
RECERR RECAPIKRN | kRecIsImgPalette (int sid, HPAGE hPage, IMAGEINDEX iiImg, LPINTBOOL pbPal)
Inquiring about palette of the image.
RECERR RECAPIKRN | kRecSetImgPalette (HPAGE hPage, const BYTE *pPal)
Setting palette of the image.
RECERR RECAPIKRN | kRecGetImgPalette (int sid, HPAGE hPage, IMAGEINDEX iiImg, LPBYTE pPal)
Getting the palette of the image.
RECERR RECAPIKRN | kRecDespeckleImg (int sid, HPAGE hPage)
Despeckling.
RECERR RECAPIKRN | kRecForceDespeckleImg (int sid, HPAGE hPage, LPCRECT pRect, DESPECKLE_METHOD method, int level)
Forcing despeckle.
RECERR RECAPIKRN | kRecImgErosion (int sid, HPAGE hPage, ERO_DIL_TYPE type)
Erosion.
RECERR RECAPIKRN | kRecImgDilatation (int sid, HPAGE hPage, ERO_DIL_TYPE type)
Dilation.
RECERR RECAPIKRN | kRecConvertImg2BW (int sid, HPAGE hPageIn, IMG_CONVERSION Conversion, int Brightness, int Threshold, IMG_RESENH resolenh, HPAGE *phPageOut)
Converting an image to a B/W image.
RECERR RECAPIKRN | kRecTransformImg (int sid, HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pSrcRect, LPCSIZE pDstSize, WORD BitsPerPixel, HPAGE *phPageOut)
Transforming an image.
RECERR RECAPIKRN | kRecTransformImgPalette (int sid, HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pSrcRect, LPCSIZE pDstSize, HPAGE *phPageOut)
Transforming palette-color images.
RECERR RECAPIKRN | kRecCopyImgArea (int sid, HPAGE hPageDst, LPCRECT pRectDst, HPAGE hPageSrc, LPCRECT pRectSrc)
Copying an image area.
RECERR RECAPIKRN | kRecMergeImgArea (int sid, HPAGE hPageDst, LPCRECT pRectDst, HPAGE hPageSrc, LPCRECT pRectSrc, REC_COLOR tColor)
Merging areas of images.
RECERR RECAPIKRN | kRecConvertImg (int sid, HPAGE hPage, WORD BitsPerPixel, UINT flags)
Changing color depth.
RECERR RECAPIKRN | kRecLineRemoval (int sid, HPAGE hPage, const RECT *pRect)
Removing lines.
RECERR RECAPIKRN | kRecRemoveLines (int sid, HPAGE hPage, IMAGEINDEX iiImg, const RECT *pRect)
Removing lines.
RECERR RECAPIKRN | kRecGetLineCount (HPAGE hPage, int *pnLines)
Getting the number of rule lines.
RECERR RECAPIKRN | kRecGetLineInfo (HPAGE hPage, IMAGEINDEX iiImg, PRLINE pLine, int nLine)
Getting rule line information.
RECERR RECAPIKRN | kRecGetFrameCount (HPAGE hPage, int *pnFrames)
Getting the number of frames.
RECERR RECAPIKRN | kRecGetFrameInfo (HPAGE hPage, IMAGEINDEX iiImg, LPCELL_INFO pFrame, int nFrame)
Getting frame information.
RECERR RECAPIKRN | kRecSetDropoutColorWeights (int sid, int wred, int wgreen, int wblue)
Changing the dropout color weight settings for binarization.
RECERR RECAPIKRN | kRecGetDropoutColorWeights (int sid, int *pwred, int *pwgreen, int *pwblue)
Getting the dropout color weight settings.
RECERR RECAPIKRN | kRecDetectDropoutColorWeights (int sid, HPAGE hPage, IMAGEINDEX iiImg, RECT *pRect, int *pwred, int *pwgreen, int *pwblue)
Detecting dropout color weights.
RECERR RECAPIKRN | kRecDropImg (HPAGE hPage, IMAGEINDEX iiImg)
Removing an image from the page.
RECERR RECAPIKRN | kRecTransformCoordinates (HPAGE hPage, IMAGEINDEX iiDst, IMAGEINDEX iiSrc, int nP, LPPOINT pPoint)
Transforming coordinates between images of a page.
RECERR RECAPIKRN | kRecRotateImg (int sid, HPAGE hPage, IMG_ROTATE Rotation)
Rotating the page.
RECERR RECAPIKRN | kRecCreateImg (int sid, int sizeX, int sizeY, int dpiX, int dpiY, WORD BitsPerPixel, HPAGE *phPage)
Creating an empty image.
RECERR RECAPIKRN | kRecFreeImg (HPAGE hPage)
Removing a page.
RECERR RECAPIKRN | kRecGetImgInfo (int sid, HPAGE hPage, IMAGEINDEX iiImg, LPIMG_INFO pImg)
Getting image information.
RECERR RECAPIKRN | kRecGetImgMetaData (HPAGE hPage, HSETTING *phMetaData)
Getting additional information about the page.
RECERR RECAPIKRN | kRecGetImgFlags (HPAGE hPage, IMG_FLAGS Flag, INTBOOL *pbValue)
Getting the value of image flags.
RECERR RECAPIKRN | kRecSetImgFlags (HPAGE hPage, IMG_FLAGS Flag, INTBOOL bValue)
Setting the image flags.
RECERR RECAPIKRN | kRecSetImgResolution (HPAGE hPage, SIZE DPI)
Changing the resolution of an image.
RECERR RECAPIKRN | kRecSetRetainColor (int sid, RETAINCOLOR RetainColor)
Changing retain color setting.
RECERR RECAPIKRN | kRecGetRetainColor (int sid, RETAINCOLOR *pRetainColor)
Getting retain color setting.
RECERR RECAPIKRN | kRecImgAutoEnhance (HPAGE hPage, BYTE blackPointred, BYTE whitePointred, BYTE blackPointgreen, BYTE whitePointgreen, BYTE blackPointblue, BYTE whitePointblue)
Image auto-enhancement.

REC_COLOR flag values

Possible values of REC_COLOR type.

#define | REC_UNDEF_COLOR 0x01000000
Undefined color.
#define | REC_TRANSPARENT_COLOR 0x02000000
Transparent color (text on graphics)
#define | REC_DEFAULT_COLOR 0x80000000
Default color.
#define | REC_DEFAULT_BGCOLOR 0x81000000
Default background color.
#define | REC_BLACK 0x00000000
Black color.
#define | REC_WHITE 0x00ffffff
White color.

Flags of rule lines

See RLINE::flag.

#define | LF_HVMASK 0x03
Mask of horizontal / vertical flags.
#define | LF_HORZ 0x01
Horizontal rule line.
#define | LF_VERT 0x02
Vertical rule line.

Detailed Description

Image handling tools.

The Capture SDK Engine is page-oriented: the basic unit used in processing is typically the image of the page, Most functions require a page (HPAGE) as an input parameter, but some API calls also operate on rectangular areas of the image (zones).

The Image handling module enables the Engine to handle several pages at the same time. The limit on the number of pages depends on the size of available physical memory and the size of the swap file used as virtual memory. The Engine can only manage and process pages within its own memory space: images must be loaded into the Engine first (by the Image File Handling Module, or the Scanning Module). Possible image sources include files, scanning devices or the memory of the integrating application.

HPAGE may contain different representations of the loaded image. These correspond to processing phases (loading, preprocessing, OCR) or to image use (view, thumbnail). The representations can be identified by IMAGEINDEX.

The best resolution for B/W images is 300 or 400 dpi. For grayscale or color images the optimal recogniton resolution is 150 to 300 dpi.

Before quitting, the application should free all pages created in the Image Handling Module (kRecFreeImg).

NOTE: In both the SDK and its documentation coordinates refer to grid-coordinates - i.e. the top or left borders of pixels. Thus a rectangle does not contain the pixels according to its right and bottom coordinates.

CSDK offers pre-recognition functions to apply image pre-processing procedures to images. These will enhance their quality, and yield more accurate auto-zoning and recognition. Preprocessing can include any or all of the following steps:

  • Inversion: automatic, programmed or none (kRecSetImgInvert)
  • Rotation: automatic, programmed or none (kRecSetImgRotation)
  • Deskewing: automatic, programmed or none (kRecSetImgDeskew)
  • FaxCorrection: automatic or none (kRecSetFaxCorrection)

In addition, image despeckling (kRecSetImgDespeckleMode) and resolution enhancements (kRecSetImgResolEnhancement) are also performed internally so that the above transformations can render better results.

Additional tasks in this module include

  • user modification of the loaded images,
  • detection and cutting of book pages (when the image contains two book pages),
  • line information detection (see RLINE) and
  • frame information detection (see kRecGetFrameInfo).

The working of Image Handling Module can also be adjusted with settings in some points.

Notes on Deskew and Orientation

Operational conditions

The automatic orientation (ROT_AUTO) and automatic deskewing (DSK_AUTO) algorithm supports the following types of textual content (FILLINGMETHOD):

  • Omnifont,
  • Draft 24-pin dot-matrix printouts,
  • OCR-A,
  • OCR-B,
  • MICR (E-13B).

For the expected result of these automatic algorithms the image should be of good quality and it should include at least one text line which includes a machine printed text of at least 25-30 characters (possibly mixed upper and lowercase characters).

Neither handprinted text (FM_HANDPRINT) nor 9-pin draft dot-matrix printouts (FM_DRAFTDOT9) can be used for automatic deskewing or automatic orientation of the image.

Angle limits

Detecting the skew (kRecDetectImgSkew) is effective only on images with lower than 15-degree skew. However, the deskew operation uses different limits.

There are lower limits of performing deskew, because under these limits deskew does not help to improve accuracy, but may result in lower accuracy. These lower limits depend on the setting RMTRADEOFF as the following:

  • TO_ACCURATE and TO_BALANCED:
    • for B/W and palette color images: 0.29 degrees,
    • for grayscale and true color images: 0.17 degrees,
  • TO_FAST:
    • for B/W and palette color images: 0.46 degrees,
    • for grayscale and true color images: 0.29 degrees.

Under these limits, deskew is not run.

In fast mode, the thresholds are higher, because the used OCR engines are more sensitive to noise on the contours. In accurate and balanced mode, the higher layout accuracy requires lower thresholds (e.g. drawing splitters into a large gridded table).

On grayscale and true-color images an interpolation algorithm can be applied, so the deskewed characters contain less noise. On B/W and palette-color images interpolation cannot be applied, so if the slope is small, deskew method damages the character contours and does not help to improve accuracy.

The upper limit may also differ. Performing a programmed (DSK_SET) or an immediate (kRecDeskewImg) deskew, the upper limit is 30 degrees.

Reconstruct algorithm

There is a 'reconstruct' algorithm which is performed only on B/W images during deskew, if the slope of the image is less than the setting Kernel.Img.ReconstructAngle.

Normally, when this algorithm is not applied, deskew performs horizontal and vertical shearings on the image. Therefore shearing creates 'steps' on the contours of the characters.

The reconstruct algorithm restores the shapes of the small characters to their original state. So these small characters remain slanted but their positions will be deskewed. In this case, the OCR accuracy is little bit higher than without this reconstruction.

Arabic cases

The deskew and orientation detection work in a different way with Arabic language than in the case of other languages. The working of both operations can be adjusted through settings (Kernel.Img.Deskew.EnabledForArabic and Kernel.Img.Rotation.EnabledForArabic). If these settings are FALSE (in default), the AUTO methods (DSK_AUTO, ROT_AUTO) of these operations for Arabic OCR equal to the case when they are switched off (DSK_NO, ROT_NO). If the settings are TRUE, or the deskew and orientation are not set to AUTO, the working of these methods are the same for both the Arabic and the Western cases.

Digital camera input

OCR can now be performed on images containing texts that were captured by digital cameras with 2 megapixels and above. This is achieved with new pre-processing algorithms. Automatic digital camera preprocessing has three parts:

  • Resolution enhancement: This is applied if required, interpolating to yield a pixel density 1.5 or 2 times the original.
  • Text line straightening: This removes distortion when capturing book pages that cannot be completely flat.
  • Removing parallax distortion: This results if the camera is not parallel to the page. For best results, the image should contain at least six lines of text, preferably justified.

The following table shows the recommended minimum point size of text for different megapixel values – assuming focus is sharp, contrast is high and images are taken with care, as described below.

 | A4 (8.27” x 11.69”) | A5 (8.27” x 5.85”)
Pixel size in a 300 dpi scan | 2481 x 3507 | 1753 x 2481
2 megapixels (1600 x 1200) | 18 pts | 12 pts
3 megapixels (2048 x 1536) | 14 pts | 10 pts
4 megapixels (2272 x 1704) | 12 pts | 9 pts
5 megapixels (2560 x 1920) | 11 pts | 8 pts

The point sizes given for the European A4 size are also valid for the American Letter sized page (8.5” x 11”). A5 is similar to half a Letter-sized page.

As a general rule, an upper case letter must have at least 18 pixels vertically. Therefore, when capturing just several lines of large text, for instance from a label or notice, even a simple mobile phone camera under 0.5 megapixels can deliver good recognition if the rules given below are followed.

Of course these pre-processing algorithms can be applied to any image containing text distorted as described, irrespective of the capturing device. Conversely, text well captured by digital camera without distortions and good lighting may be successfully processed by the normal algorithms.

Automatic 3D-deskew

The preprocessing function or method IMG_DESKEW has a new parameter: DSK_3D, in addition to DSK_AUTO, DSK_NO, DSK_SET. When you call the preprocess method with DSK_3D, three-dimensional deskewing runs, as detailed above. If an Asian language (either CCJK, Arabic, Thai or Hebrew) is set for recognition before pre-processing, auto-deskew will not be available.

Manual 3D deskew

This feature can be accessed only from the IVC visual control of the CSDK. Please see the CSDK Visual Controls documentation for details.

How to capture good quality images

  1. Lighting: Clear, even lighting with good contrast is important (no shaded parts).
  2. Stable camera position: Use a tripod or other steadying device.
  3. Camera axis: As close to perpendicular to the page as possible.
  4. Correct distance: Minimum: 20-25 cm / 10-20 inches. In macro mode can be less. For fixed focus cameras, macro mode should be used, if available.
  5. Resolution (pixel density): Depends on camera resolution, distance between camera and page, and character size. The higher the resolution, the sharper the image.

Inverse text and color lines

The detection of colored lines and inverse texts in the recognition process is improved in CSDK 16. Line color is detected only if the retain color setting is set to RETAINCOLOR_YES. See also: Kernel.OcrMgr.RetainColor and kRecSetRetainColor. Inverted text is automatically detected; it requires no special zone type, being expressed simply as a font color/background color combination. White letters on a black background will be detected in all cases; to conserve colored inverse text or backgrounds, RETAINCOLOR_YES must be set.

The line color attribute is stored in the color field of the RLINE structure and can be obtained by the function kRecGetLineInfo.

Despeckle for halftone images

Scanners often have the possibility of specifying whether the type of the document is 'text', 'photo' or 'text/photo' (mixed). When text/photo or photo is selected (and black-and-white scanning is chosen) the scanners apply a halftone or dithering algorithm to simulate gray levels. In this case the scanned image contains a lot of noise and a special despeckle algorithm is required to preprocess it before OCR. This special algorithm can be switched on and off with the setting Kernel.Img.Despeckle.Halftone. See also notes of kRecSetImgDespeckleMode.

Macro Definition Documentation

◆ CROP_CLEARMARGIN

#define CROP_CLEARMARGIN 1

Fill the remaining margins white.

Typedef Documentation

◆ COMPRESSED_IMG_INFO

typedef struct _COMPRESSED_IMG_INFO COMPRESSED_IMG_INFO

Basic physical information of a compressed image buffer.

This structure specifies the basic infromation about the image to be loaded from compressed memory buffer (kRecLoadImgMC and kRecLoadImgDataStreamMC).

◆ IMG_CONVERSION

typedef enum IMG_CONVERSION IMG_CONVERSION

Image conversion types.

Image conversion modes to be applied for conversions from grayscale or color image sources. These values specify how different image types will be converted either during primary image conversion ( loading an image into the Engine) or during secondary image conversion, (an image - already in the Engine's memory space - undergoes an image conversion step).

Note
These modes can be set by kRecSetImgConvMode for primary and by kRecSetImgBinarizationMode for secondary image conversion.
Secondary image conversions are performed on an existing hPage page. This step is activated either directly (from within the kRecConvertImg2BW function) or implicitly. This latter case may occur when the application calls a KernelAPI API function whose operation requires a B/W image but the available image is not a B/W one, making an implicit image conversion necessary.
In primary image conversion, the default conversion type is CNV_NO. In secondary image conversion, the default conversion type is CNV_AUTO.
During primary image conversion CNV_SET and CNV_GLOBAL produce the same results as they do during secondary image conversion. However, CNV_AUTO method is faster in primary than in secondary conversion, but the result is less optimal for OCR. In general, it is true that the most optimal result for OCR can be achieved with the default values of these settings.

◆ IMG_INFO

typedef struct _IMG_INFO IMG_INFO

Structure of an image containing basic physical information.

Note
See IMG_LINEORDER, IMG_RGBORDER, and IMG_PADDING for more information.

◆ REC_COLOR

typedef DWORD REC_COLOR

Color type.

This is 24-bit color information. The lower 8 bits are the red component, the next 8 bits are the green one and the third 8 bits the blue one. These components are intensity values from 0 to 255. Black is 0 (REC_BLACK) and white is 0xFFFFFF (REC_WHITE). There are some additional predefined colors: REC_UNDEF_COLOR and REC_DEFAULT_COLOR.

Enumeration Type Documentation

◆ DESPECKLE_METHOD

enum DESPECKLE_METHOD

Despeckle method used by kRecForceDespeckleImg.

Enumerator
DESPECKLE_AUTO | The applied method is determined automatically. kRecForceDespeckleImg performs the same adaptive noise removal, as kRecDespeckleImg. Level is not used.
DESPECKLE_NORMAL | Black noise is removed, contours are smoothed. Level can be set between 1 and 4.
DESPECKLE_INVERSE | White noise is removed, contours are smoothed. Level can be set between 1 and 4.
DESPECKLE_HALFTONE | Despeckle half-tone image. Level can be set between 1 and 4.
DESPECKLE_MEDIAN | 3*3 median filtering. Level is not used. Note that this filter works on grayscale and color images too.
DESPECKLE_SMOOTHEDGE | Remove small noise from contours. Level is not used.
DESPECKLE_MEDIANEX | Median filtering. The level iparameter specifies the size of the window. It must be between 1 and 15, and must be odd. Note that this filter works on grayscale and color images too.
DESPECKLE_PEPPER | Remove black dots whose width and height are less or equal to the given size. The contours of the other objects are not smoothed. The level parameter specifies the size, it must be between 1 and 256.
DESPECKLE_SALT | Remove white dots whose width and height are less or equal to the given size. The contours of the other objects are not smoothed. The level parameter specifies the size, it must be between 1 and 256.
DESPECKLE_PEPPERANDSALT | Remove both black and white dots whose width and height are less or equal to the given size.

◆ ERO_DIL_TYPE

enum ERO_DIL_TYPE

Type of neighborhood used by kRecImgErosion and kRecImgDilatation.

Enumerator
ERO_DIL_3 | Left, upper, and upper-left neighbors are tested.
ERO_DIL_4 | Left, upper, right and lower neighbors are tested.
ERO_DIL_8 | All eight neighbors are tested.

◆ FILLAREA_FLAGS

enum FILLAREA_FLAGS

Determining the area to be filled by kRecFillImgArea.

Enumerator
FILL_INSIDE | Fill the image inside the rectangle.
FILL_OUTSIDE | Fill the image outside the rectangle.
FILL_FLEXIBLEBPS | Increase BitsPerPixel of the image if necessary. E.g.: the current image is gray-scale (BistPerPixel = 8) and the fill-color is red: if this flag is set the image is changed to 24-bit true-color, if this flag is not set the fill-color is converted down to gray. This parameter can be combined with FILL_INSIDE or FILL_OUTSIDE.

◆ IMAGEINDEX

enum IMAGEINDEX

Index of each image type in HPAGE.

HPAGE may contain several images created from the same page source (e.g. scanner, image file, etc). These image types play different roles: distinct page processing phases run on them. You can refer to these image types using their indices.

Each image type of HPAGE may have different coordinate systems. In the page all the coordinates are stored referring to the coordinate system of the black-and-white image. However, coordinates passing to or getting from the functions can refer to the coordinate system of any image.

Due to the conversions between coordinate systems, a coordinate received from a function may differ from the previously set coordinate.

After preprocessing, rotating or deskewing, the difference between the coordinate systems of the current and original images is a geometric rotating transformation. Thus, if there is a rectangle (possibly a zone) specified with the coordinates from the original image its vertices are converted into the BW image and the bounding rectangle of the resulting points are stored. Therefore, the vertices of the stored rectangle can significantly differ from those of the original one.

The coordinate system of the BW image can differ from that of the current image only in a scalar factor viz. if the current one is not binary and resolution enhancement is used at binarization, the resulting image has a higher resolution.

The OCR and the BW images have the same coordinate systems.

Coordinates are specified in pixels. The origin is always in the top-left corner of the image with the coordinates (0,0). The bottom-right pixel has the coordinates (sx-1, sy-1), where sx is the horizontal and sy is the vertical size of the image in pixels.

When a function gets an IMAGEINDEX for specifying the coordinate system, II_THUMBNAIL cannot be passed. The functions accepting this index are as follows: kRecGetImgArea, kRecStartReadImg, kRecRotateImgArea, kRecIsImgPalette, kRecGetImgPalette, kRecTransformImg, kRecTransformImgPalette, kRecDropImg, kRecGetImgInfo, kRecSaveImg, kRecSaveImgForce, kRecSaveImgF, kRecSaveImgForceF, kRecSaveImgArea, kRecSaveImgAreaF, kRecInsertImgFilePage, kRecMatchImgFileFormat, kRecMatchImgFileFormat, kRecUpdateImgFilePage.

Lifetime of different images:

  • II_ORIGINAL: this is created when the image is loaded (on HPAGE creation). It is automatically deleted during the first operation that modifies the image (e.g. kRecPreprocessImg, kRecRotateImg, etc.). It can be kept by calling kRecSetPreserveOriginalImg. It can also be deleted any time by calling kRecDropImg.
  • II_CURRENT: this is created when the image is loaded (on HPAGE creation). It cannot be deleted even by calling kRecDropImg.
  • II_BW: It is created by the first operation that needs it. Preprocessing, page-layout decomposition and recognition processes always create it, but so does any other function that needs it providing that it receives the image index II_BW and they need this image (e.g. kRecGetImgInfo, kRecGetImgArea, etc.). II_BW can be deleted any time by calling kRecDropImg.
  • II_OCR: It is created during the recognition process. Even if there has already been an OCR image at the start of recognition, it is always recreated. It can be deleted any time by calling kRecDropImg or by setting Kernel.OcrMgr.Images.KeepOcrImage to FALSE, but it is not recommended if an MRC PDF is to be created.
  • II_THUMBNAIL: It is created only when the image index II_THUMBNAIL is passed to a function and the function needs this image (e.g. kRecGetImgInfo, kRecGetImgArea, etc.). It can be deleted any time by calling kRecDropImg.
Enumerator
II_UNDEFINED | Undefined type.
II_BGLAYER | Background layer. This image exists only for non-image-only PDF and XPS. It contains the background image without the text layer. Used internally by the PID_DECOMPOSITION process.
II_ORIGINAL | Original image from scanner or from file. Deskew, rotation, and other image manipulation functions do not modify this image. By default this image exists until II_CURRENT is generated from it and then it is deleted from the HPAGE. If you want to preserve this image, call kRecSetPreserveOriginalImg.
II_CURRENT | This is the current image. Most functions work on this image. This image always exists. After loading an image it corresponds with the original image. Deskew, rotation, and other image manipulation functions modify this image. To keep compatibility with the previous version of CSDK, use II_CURRENT.
II_BW | Black-and-white image generated from the current image during pre-processing or implicit secondary image conversion. This image is used e.g. by the PID_DECOMPOSITION process. It can have higher resolution than the current image.
II_OCR | OCR image generated from the BW one by the recognition process. This is a black-and-white image used by the OCR engines. It contains information only inside the zones to be recognized. These zones may be auto-inverted; underlines and graphical elements may be removed from them. The creation method depends on the current page parse, OCR settings and the properties of the zones
II_THUMBNAIL | Thumbnail image (miniature color image) generated from the current one. Its creation preserves aspect ratio, but the resulting image has the user-given size. Therefore empty areas may be generated at the top and bottom, or the left and right sides of that image. These empty areas will be filled with a given color called thumbnail color. See kRecSetThumbnailImgInfo.
II_OUTPUT | Used internally by output converters.
II_HANDPRINT_BW | Used internally at kRecLocateZonesEx.
II_SIZE | Number of image types for verifying index validity and creating the image array.

◆ IMG_COMPRESSION

enum IMG_COMPRESSION

Image compression types.

These types can be used at loading page from compressed memory buffer (kRecLoadImgMC and kRecLoadImgDataStreamMC).

Note
DataStream supports only JPEG and JPEG2000 compression types.
Enumerator
COMPRESS_TIFHU | Group 3 Modified TIFF image format.
COMPRESS_TIFG31 | Standard G3 1D TIFF image format.
COMPRESS_TIFG32 | Standard G3 2D TIFF image format.
COMPRESS_TIFG4 | Standard G4 TIFF image format.
COMPRESS_JPEG | Standard JPEG image (file) format.
COMPRESS_JPG2K | Standard JPEG2000 image (file) format.
COMPRESS_SIZE | Number of compression types.

◆ IMG_CONVERSION

enum IMG_CONVERSION

Image conversion types.

Image conversion modes to be applied for conversions from grayscale or color image sources. These values specify how different image types will be converted either during primary image conversion ( loading an image into the Engine) or during secondary image conversion, (an image - already in the Engine's memory space - undergoes an image conversion step).

Note
These modes can be set by kRecSetImgConvMode for primary and by kRecSetImgBinarizationMode for secondary image conversion.
Secondary image conversions are performed on an existing hPage page. This step is activated either directly (from within the kRecConvertImg2BW function) or implicitly. This latter case may occur when the application calls a KernelAPI API function whose operation requires a B/W image but the available image is not a B/W one, making an implicit image conversion necessary.
In primary image conversion, the default conversion type is CNV_NO. In secondary image conversion, the default conversion type is CNV_AUTO.
During primary image conversion CNV_SET and CNV_GLOBAL produce the same results as they do during secondary image conversion. However, CNV_AUTO method is faster in primary than in secondary conversion, but the result is less optimal for OCR. In general, it is true that the most optimal result for OCR can be achieved with the default values of these settings.
Enumerator
CNV_AUTO | This affects grayscale or 24-bit color images: a B/W image will be created in the Engine's memory. Image binarization applies an automatic adaptive thresholding algorithm. The kRecSetImgBrightness function can be used to tune the threshold calculation.
CNV_SET | This affects grayscale or 24-bit color images: a B/W image will be created in the Engine's memory. Thresholding with a user-defined threshold value, set by the kRecSetImgThreshold function.
CNV_NO | There will be no conversion while image loading. The image will be loaded into the Engine's memory without any conversion (i.e. a color image will retain its color attributes).
CNV_GLOBAL | This affects grayscale or 24-bit color images: a B/W image will be created in the Engine's memory. For image binarization, an automatic thresholding algorithm with a page-level global threshold value is applied.
CNV_GRAY | For a color image: a grayscale image will be created in the Engine's memory. For a B/W or grayscale image: no conversion will be performed while loading the image.

◆ IMG_DESKEW

enum IMG_DESKEW

Image deskewing mode.

This setting determines the deskewing mode during image preprocessing.

Note
For additional information about deskew (e.g limits of page angle, Arabic differences) see Notes on Deskew and Orientation.
Enumerator
DSK_2D | Automatic 2D deskewing (Default).
DSK_AUTO | Deprecated. Use DSK_2D instead.
DSK_NO | No deskewing applied.
DSK_SET | Deskew with a given angle set by the kRecSetImgSlope function.
DSK_3D | Automatic 3D deskewing applied.
DSK_AUTO3D | Automatic 2D or 3D deskewing: 2D deskewing applied on scanned images and 3D deskewing applied on digital camera images. see also: IMG_FLAGS

◆ IMG_FLAGS

enum IMG_FLAGS

Image flags.

These flags can be inquired by kRecGetImgFlags, and used by kRecPreprocessImg

Enumerator
IMG_FLAGS_CAMERAIMAGE | Source image file is captured by digital camera or phone.
IMG_FLAGS_NORESOLUTION | Source image file does not contain resolution info. Default resolution has been set.

◆ IMG_INVERT

enum IMG_INVERT

Image inversion mode.

Possible inversion modes. This setting determines the inversion mode used by kRecPreprocessImg on the whole image. Note that kRecPreprocessImg inverts the II_BW image only. The inversion means that the II_BW image is changed from white-on-black to black-on-white, because this is needed for successful recognition.

Enumerator
INV_NO | No inversion required.
INV_YES | Image inversion should be performed. The II_BW image is inverted.
INV_AUTO | Automatically inverts the II_BW image, if necessary (Default): whether the image is inverse is determined during preprocessing.

◆ IMG_LINEORDER

enum IMG_LINEORDER

Image line order.

Line order setting determines the order of the lines in the passed or received buffer on calling kRecLoadImgM, kRecPutImgArea, kRecGetImgArea and kRecRotateImgArea. To specify this setting use kRecSetImgFormat before invoking any of the above functions.

Enumerator
TOP_DOWN | First line is the top line of the image (Default).
BOTTOM_UP | First line is the bottom line of the image.

◆ IMG_PADDING

enum IMG_PADDING

Image padding.

Padding mode setting for the image in the application's memory space. The Padding mode setting determines how the lines in the image are to be padded on calling kRecGetImgArea and kRecRotateImgArea. To specify this setting use kRecSetImgFormat call before invoking any of these functions.

Enumerator
PAD_BYTEBOUNDARY | Lines of the image are padded to byte boundaries.
PAD_WORDBOUNDARY | Lines of the image are padded to word (double byte) boundaries (Default).
PAD_DWORDBOUNDARY | Lines of the image are padded to double word boundaries.

◆ IMG_RESENH

enum IMG_RESENH

Image resolution enhancement.

Resolution enhancement means that the resolution of the created II_BW image is larger than the resolution of the II_CURRENT image. The ratio of the enhancement currently can be 1.5, 2.0, 3.0, and can be 0.5 on digital camera images when the letters are very large. Resolution enhancement is applied during secondary image conversion step. The actual ratio depends on the Kernel.Img.ResolutionEnhancement and Kernel.Img.ResolutionEnhancement.EnabledforBW settings, the bit-depth and size of the image. Different ratio is applied on camera image and on screen captures. To change the Kernel.Img.ResolutionEnhancement setting, use the kRecSetImgResolEnhancement function.

Enumerator
RE_NO | No resolution enhancement applied.
RE_YES | Apply enhancement, on grayscale and color images the ratio is 2.0, on BW images the ratio is determined by the CSDK.
RE_LEGACY | On non-BW images the ratio of the enhancement depends on the resolution of the image. The ratio is 2.0 if the resolution is less than or equal to 160 DPI, and 1.5 if the resolution is less than or equal to 210 DPI. Otherwise resolution enhancement is not applied. On BW images resolution enhancement is applied if the resolution is less or equal than 210 dpi, the ratio is determined by the CSDK.
RE_STANDARD | On non-BW images the ratio is detected dynamically: it depends on the resolution of the image and on the detected average character size. Resolution enhancement is not applied above 210 DPI. The mentioned character size detection is performed only during image preprocessing, thus without calling kRecPreprocessImg RE_STANDARD is equivalent to RE_LEGACY. On BW images RE_STANDARD is equivalent to RE_LEGACY.
RE_AUTO | Enhancement depends on the current trade-off setting: if trade-off is TO_FAST use RE_LEGACY, otherwise use RE_STANDARD. RE_AUTO is the default setting.

◆ IMG_RGBORDER

enum IMG_RGBORDER

Image color order.

Possible orders of the composite color components of a 24-bit color image. It defines how the image is to be interpreted on calling kRecLoadImgM, kRecPutImgArea, kRecGetImgArea kRecRotateImgArea and kRecGetImgAreaEx. To specify this setting, use the kRecSetImgFormat call before invoking the above functions (except for kRecGetImgAreaEx).

Enumerator
COLOR_RGB | Defines that the order of the composite color components is R-G-B (Default).
COLOR_BGR | Defines that the order of the composite color components is B-G-R (used for Windows DiBitmap).
COLOR_BGRA | Defines that the order of the composite color components is B-G-R-A (blue-green-red-alpha). This value is used only by kRecGetImgAreaEx and kRecLoadImgM.
COLOR_ARGB | Defines that the order of the composite color components is A-R-G-B (alpha-red-green-blue). This value is used only by kRecGetImgAreaEx and kRecLoadImgM.

◆ IMG_ROTATE

enum IMG_ROTATE

Available image transformations (rotation and/or mirroring).

Rotation is always carried out in 90-degree steps. The following table shows the results of the image transformation using different values.

  • Original image:
    123
    456
    789
  • Transformed image:
    ROT_NO: LEFT: RIGHT: DOWN:
    123 | 369 | 741 | 987
    456 | 258 | 852 | 654
    789 | 147 | 963 | 321
    FLIPPED: LEFT_FLIPPED: RIGHT_FLIPPED: DOWN_FLIPPED:
    321 | 147 | 963 | 789
    654 | 258 | 852 | 456
    987 | 369 | 741 | 123
Note
Automatic image rotation settings (ROT_AUTO) can only be used with good quality machine-printed texts, but not with images containing 9-pin dot-matrix text or other non-machine printed text.
Mirroring values (those with the suffix FLIPPED) are ignored during image pre-processing kRecPreprocessImg. They are available only through kRecRotateImg and kRecRotateImgArea.
For additional information about rotation (e.g Arabic differences) see Notes on Deskew and Orientation.
Enumerator
ROT_AUTO | Automatic image rotation (Default).
ROT_NO | Do not transform the image.
ROT_RIGHT | Rotate image to the right (clockwise).
ROT_DOWN | Rotate image down (rotate twice).
ROT_LEFT | Rotate image to the left (anti-clockwise).
ROT_FLIPPED | Mirror image without rotation (mirrored around the Y-axis).
ROT_RIGHT_FLIPPED | Mirror image, then rotate to the right.
ROT_DOWN_FLIPPED | Mirror image, then rotate twice.
ROT_LEFT_FLIPPED | Mirror image, then rotate to the left.

◆ IMG_SCREENCAPTURE

enum IMG_SCREENCAPTURE

Preprocessing of screen captures.

This enumerates the possible content of the Kernel.Img.ScreenCapture setting. CSDK contains special binarization algorithm that is optimized for processing screen captures. If the images to be processed can include screen capture, you need to set Kernel.Img.ScreenCapture to SCR_AUTO or SCR_YES. We suggest to use SCR_AUTO, because in this case the image is analyzed before the secondary image conversion step, and it is decided whether the normal or the screenshot-optimized algorithm is better. This screenshot-optimized algorithm works better if the input is a lossless grayscale or color image. During the analysis CSDK also examines the characteristics of the image to determine whether the screen optimized algorithm should be used. Note that screenshots are neither deskewed nor autorotated.

Enumerator
SCR_NO | Set this if the image is not screenshot (Default).
SCR_AUTO | This is the suggested setting if the set of input images can contain both screenshots and scanned images.
SCR_YES | Force using screenshot algorithm.

◆ IMG_STRETCHMODE

enum IMG_STRETCHMODE

Image stretching mode.

Possible values for the Image stretching mode setting. This setting is used by the kRecGetImgArea function if the destination rectangle size is definitely smaller than the source one. The setting specifies how the pixels of the input image are combined to get the resulting image during the operation of this function.

Enumerator
STRETCH_DELETE | Deletes eliminated pixels. Information in the eliminated pixels is not preserved (Default).
STRETCH_OR | Uses the OR operator to combine eliminated pixels with the remaining ones. This mode preserves black pixels at the expense of white pixels. (Assuming that black is coded as 1.)
STRETCH_AND | Uses the AND operator to combine eliminated pixels with the remaining ones. This mode preserves white pixels at the expense of black pixels.
STRETCH_AVG | If the image is B/W, 4-bit grayscale or 8-bit grayscale use 256-level grayscale to combine eliminated pixels. This results in an output of an 8-bit grayscale bitmap. If the image is palette-color or 24-bit color, use 24-bit color to combine eliminated pixels. This produces an output of a 24-bit color bitmap. Note, that if the destination rectangle size is greater than the source rectangle size, the BitsPerPixel of the output bitmap will be the same as the BitsPerPixel of the input image. Use the returned IMG_INFO from kRecGetImgArea to obtain the correct BitsPerPixel value of the created bitmap.

◆ JPG_ORIENTATION

enum JPG_ORIENTATION

Image orientation for JPEG files.

Possible values of Kernel.Imf.JPG.Orientation setting. This setting specifies the orientation of the image when JPEG file is loaded.

Enumerator
JPG_ORIENTATION_IGNOREEXIF | Do not use the orientation tag of the EXIF info.
JPG_ORIENTATION_USEEXIF | Apply the orientation tag of the EXIF info if exists.

◆ JPG_RESOLUTION

enum JPG_RESOLUTION

Image resolution for JPEG files.

Possible values of Kernel.Imf.JPG.Resolution setting. This setting specifies how to set image resolution if the header of the input JPEG file does not contain DPI information.

Enumerator
JPG_RES_USEDEFAULTDPI | Use the resolution specified by Kernel.IMF.DefaultDPI setting.
JPG_RES_USEEXIF | If JPEG header does not contain resolution info, read the resolution tag of the EXIF info if exists.

◆ PREPROC_INFO_FLAGS

enum PREPROC_INFO_FLAGS

Flags for the structure PREPROC_INFO.

Enumerator
PREPROC_INFO_FAXCORRECTION | Fax-correction applied.
PREPROC_INFO_INVERSION | II_BW image inverted.
PREPROC_INFO_3DDESKEW | 3D deskew applied.
PREPROC_INFO_STRAIGHTENED | Line straightening applied by 3D deskew.
PREPROC_INFO_HALFTONE | Halftone image, see kRecSetImgDespeckleMode

◆ PROCESSING_MODE

enum PROCESSING_MODE

Switching between processing modes.

Generally, a load-prerprocess-zoning-recognition-conversion workflow is built up to do anything it can for the best result of any type of output. However, there are some cases when certain steps can be skipped. E.g. if the required output is an ePub document, it is not important to do any true page formatting. The setting Processing.Mode can switch on such a restricted processing mode.

Enumerator
PROCESSING_NORMAL | This is the normal workflow and the default setting.
PROCESSING_BOOK | This is the e-book mode. If this mode is switched on, the real position of the paragraphs are not important. The whole document is a flowing text with strongly normalized (not exact) linespacing. If a paragraph breaks across pages, their parts are connected. Footnotes and their references are marked. Of course any output format can also be used in this mode, but some of them do not fulfill all their original requirements due to these restrictions. E.g. in a true-page mode Word output the paragraph positions may be different from their original ones.

◆ RETAINCOLOR

enum RETAINCOLOR

Retain color.

The recognition result can contain color information about letters, lines, frames, etc. The retain color setting indicates whether the color information from the image is used or not.

Note
The page layout decomposition and recognition are faster when color is not retained, but the result of zoning may be worse (e.g. an indistinct graphic may vanish or zones with different background colors may be merged)
Enumerator
RETAINCOLOR_NO | All the resulting items contain a white background and a black foreground color.
RETAINCOLOR_YES | The real color of the given item is used in the result. This is the default value.
RETAINCOLOR_INVERTED | The color of the given item is determined in the BW image of the page (II_BW).

Function Documentation

◆ kRec3DDeskewImg()

RECERR RECAPIKRN kRec3DDeskewImg | ( | int | sid,
 |  | HPAGE | hPage )

3D deskewing

The kRec3DDeskewImg function performs 3D deskew on the II_CURRENT image of the given page. The function tries to correct the skew and perspective distortion of an image taken by a digital camera. Parallel text lines are transformed to be horizontal and column edges are transformed to be vertical. The algorithm does not detect that a page is upside down therefore the transformed image may remain upside down. If there are BW (II_BW) and thumbnail (II_THUMBNAIL) images they are deskewed as well.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of page containing the image(s) to be deskewed.
Return values
RECERR
Note
The 3D deskew algorithm requires a certain number of characters, text lines and column edges. Column edges mean that the beginning and/or end of consecutive text lines have identical positions, i.e. the left edge of a column aligned left or both edges of a justified column. The minimal quantities are approximately 10 text lines and the edges of two columns or both edges of one column. The accuracy of the algorithm increases when there are a good number of lines and column edges and when these are not confined to a small area of the image. If the image contains only figures or graphics, no transformation occurs.
The specification of this function in C# is:
RECERR kRec3DDeskewImg(int sid, IntPtr hPage);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRec3DDeskewImg
RECERR RECAPIKRN kRec3DDeskewImg(int sid, HPAGE hPage)
3D deskewing
The specification of this function in Java is:
int kRec3DDeskewImg(int sid, HPAGE hPage)
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
The specification of this function in Python is:
def kRec3DDeskewImg(sid: int, hPage: "HPAGE") -> int

◆ kRecAutoCropImg()

RECERR RECAPIKRN kRecAutoCropImg | ( | int | sid,
 |  | HPAGE | hPage,
 |  | int | lrMargin,
 |  | int | tbMargin,
 |  | UINT | flags )

Cropping white border.

This function detects the excessive border areas, and if they are greater than the given margins, it decreases them to that size. The image is resized to the new rectangle.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page to be processed.
[in] | lrMargin | Left and right margin (pixels).
[in] | tbMargin | Top and bottom margin (pixels).
[in] | flags | Set the CROP_CLEARMARGIN flag to have the margins remaining after cropping filled with the color white.
Return values
RECERR
Note
For a blank page this function gives ZONE_NOTFOUND_WARN.
The specification of this function in C# is:
RECERR kRecAutoCropImg(int sid, IntPtr hPage, int lrMargin, int tbMargin, CROP_FLAGS flags);
kRecAutoCropImg
RECERR RECAPIKRN kRecAutoCropImg(int sid, HPAGE hPage, int lrMargin, int tbMargin, UINT flags)
Cropping white border.
The specification of this function in Java is:
int kRecAutoCropImg(int sid, HPAGE hPage, int lrMargin, int tbMargin, long flags)
The specification of this function in Python is:
def kRecAutoCropImg(sid: int, hPage: "HPAGE", lrMargin: int, tbMargin: int, flags: int) -> int

◆ kRecClearImgArea()

RECERR RECAPIKRN kRecClearImgArea | ( | int | sid,
 |  | HPAGE | hPage,
 |  | LPCRECT | lpRect )

Clearing image area.

The kRecClearImgArea function clears a rectangular area of all the images of a page except II_ORIGINAL. The image with a rectangle cleared replaces its origin and is available to the Engine and the application. The function assumes that the coordinates are given in the coordinate system of the current image (II_CURRENT).

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the image to be modified.
[in] | lpRect | Pointer to a rectangle to be cleared by setting its bits to zero (0). A NULL value means the entire image.
Return values
RECERR
Note
For a B/W image, setting each bit to zero (0) results in an entirely white image. In any other case the resulting image will be entirely black. When a white image area is required in these latter cases, call kRecFillImgArea or kRecInvertImgArea.
The specification of this function in C# is:
RECERR kRecClearImgArea(int sid, IntPtr hPage, RECT pRect);
// or when pRect is NULL in C/C++
RECERR kRecClearImgArea(int sid, IntPtr hPage);
kRecClearImgArea
RECERR RECAPIKRN kRecClearImgArea(int sid, HPAGE hPage, LPCRECT lpRect)
Clearing image area.
The specification of this function in Java is:
int kRecClearImgArea(int sid, HPAGE hPage, RECT lpRect)
The specification of this function in Python is:
def kRecClearImgArea(sid: int, hPage: "HPAGE", lpRect: "RECT") -> int

◆ kRecConvertImg()

RECERR RECAPIKRN kRecConvertImg | ( | int | sid,
 |  | HPAGE | hPage,
 |  | WORD | BitsPerPixel,
 |  | UINT | flags )

Changing color depth.

This function changes the color depth (bits per pixel) of the given image.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page to be processed. The II_CURRENT image of this page will be modified.
[in] | BitsPerPixel | New value of the bits per pixel. Possible values are: 1, 8, 24.
[in] | flags | The following parameters can be specified: CONVIMG_PALETTE, CONVIMG_ERRDIFF.
Return values
RECERR
Note
If BitsPerPixel is not 8, CONVIMG_PALETTE flag is ignored.
CONVIMG_ERRDIFF can be specified only when BitsPerPixel is 1 or when BitsPerPixel is 8 and CONVIMG_PALETTE is set.
The specification of this function in C# is:
RECERR kRecConvertImg(int sid, IntPtr hPage, ushort bitsPerPixel, CONVIMG_FLAGS flags);
kRecConvertImg
RECERR RECAPIKRN kRecConvertImg(int sid, HPAGE hPage, WORD BitsPerPixel, UINT flags)
Changing color depth.
The specification of this function in Java is:
int kRecConvertImg(int sid, HPAGE hPage, int BitsPerPixel, long flags)
The specification of this function in Python is:
def kRecConvertImg(sid: int, hPage: "HPAGE", BitsPerPixel: "WORD", flags: int) -> int

◆ kRecConvertImg2BW()

RECERR RECAPIKRN kRecConvertImg2BW | ( | int | sid,
 |  | HPAGE | hPageIn,
 |  | IMG_CONVERSION | Conversion,
 |  | int | Brightness,
 |  | int | Threshold,
 |  | IMG_RESENH | resolenh,
 |  | HPAGE * | phPageOut )

Converting an image to a B/W image.

The kRecConvertImg2BW function converts color or gray-scale images to Black-and-white (B/W) ones and puts the resulting image into a newly created HPAGE. It converts the current image (II_CURRENT) of the given input page. The resulting image will be the original image (II_ORIGINAL) of the given output page. This function performs a direct secondary image conversion step. If the input image is a B/W one, the function ignores the remaining conversion parameters and produces a copy of the input image.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPageIn | Handle of the source page.
[in] | Conversion | Image conversion mode to be applied during the conversion of the image. Possible values are: CNV_AUTO, CNV_SET, CNV_GLOBAL.
[in] | Brightness | Brightness of the image (range is 0 to 100, where 0 means the darkest and 100 means the lightest resulting image). This parameter has an effect only if the Conversion parameter is CNV_AUTO.
[in] | Threshold | Threshold value to be set. Its range should be between 0 and 255. This parameter has an effect only if the Conversion parameter is CNV_SET.
[in] | resolenh | The resolution enhancement mode to be used during binarization.
[out] | phPageOut | Pointer of a variable to store the handle of the destination page.
Return values
RECERR
Note
If the output page is no longer needed it should be removed from the image management module by invoking the kRecFreeImg function.
The specification of this function in C# is:
RECERR kRecConvertImg2BW(int sid, IntPtr hPageIn, IMG_CONVERSION Conversion, int Brightness, int Threshold, IMG_RESENH resolenh, out IntPtr phPageOut);
IMG_CONVERSION
IMG_CONVERSION
Image conversion types.
Definition KernelApi.h:316
kRecConvertImg2BW
RECERR RECAPIKRN kRecConvertImg2BW(int sid, HPAGE hPageIn, IMG_CONVERSION Conversion, int Brightness, int Threshold, IMG_RESENH resolenh, HPAGE *phPageOut)
Converting an image to a B/W image.
IMG_RESENH
IMG_RESENH
Image resolution enhancement.
Definition KernelApi.h:443

◆ kRecCopyImgArea()

RECERR RECAPIKRN kRecCopyImgArea | ( | int | sid,
 |  | HPAGE | hPageDst,
 |  | LPCRECT | pRectDst,
 |  | HPAGE | hPageSrc,
 |  | LPCRECT | pRectSrc )

Copying an image area.

This function copies a rectangular area of the II_CURRENT image of the given source page into a rectangular area of the II_CURRENT image of the given destination page. The function compresses or stretches the area if necessary to fit the dimensions of the destination size.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPageDst | Handle of the page which contains the destination image.
[in] | pRectDst | Coordinates of the destination rectangular area. NULL means the whole image.
[in] | hPageSrc | Handle of the page which contains the source image.
[in] | pRectSrc | Coordinates of the source rectangular area. NULL means the whole image.
Return values
RECERR
Note
If the destination size is smaller or greater than the original source area, the function compresses or stretches the area into the destination.
The BitsperSample of the source and the destination image must be the same.
The specification of this function in C# is:
RECERR kRecCopyImgArea(int sid, IntPtr hPageDst, RECT rectDst, IntPtr hPageSrc, RECT rectSrc);
// or when pRectDst is NULL in C/C++
RECERR kRecCopyImgArea(int sid, IntPtr hPageDst, IntPtr hPageSrc, RECT rectSrc);
// or when pRectSrc is NULL in C/C++
RECERR kRecCopyImgArea(int sid, IntPtr hPageDst, RECT rectDst, IntPtr hPageSrc);
// or when pRectDst and pRectSrc are NULL in C/C++
RECERR kRecCopyImgArea(int sid, IntPtr hPageDst, IntPtr hPageSrc);
kRecCopyImgArea
RECERR RECAPIKRN kRecCopyImgArea(int sid, HPAGE hPageDst, LPCRECT pRectDst, HPAGE hPageSrc, LPCRECT pRectSrc)
Copying an image area.
The specification of this function in Java is:
int kRecCopyImgArea(int sid, HPAGE hPageDst, RECT pRectDst, HPAGE hPageSrc, RECT pRectSrc)
The specification of this function in Python is:
def kRecCopyImgArea(sid: int, hPageDst: "HPAGE", pRectDst: "RECT", hPageSrc: "HPAGE", pRectSrc: "RECT") -> int

◆ kRecCreateBookPages()

RECERR RECAPIKRN kRecCreateBookPages | ( | int | sid,
 |  | HPAGE | hPage,
 |  | HPAGE * | phPage1,
 |  | HPAGE * | phPage2,
 |  | const CUT_INFO * | pInfo )

Cutting each opened book image into two pages.

This function cuts the two-page opened book images into two pages using the cutting information resulting from kRecDetectBook. It uses the page size stored by the first kRecDetectBook after a kRecInit or a kRecResetBookSize. The resulting HPAGEs should be preprocessed even if the pre-process operation was called before kRecDetectBook, because the skew of one page may differ from that of the other.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the two-part opened book page image.
[out] | phPage1 | Pointer of a variable to store the handle of the left page cut from the book page.
[out] | phPage2 | Pointer of a variable to store the handle of the right page cut from the book page.
[in] | pInfo | The cutting information resulting from kRecDetectBook.
Return values
RECERR
Note
Every call of this function should be preceded by a kRecDetectBook, which creates the cutting information for the given HPAGE.
To reset the stored size of the resulting pages (e.g. before scanning another book), use kRecResetBookSize.
This function uses the settings Kernel.Img.BookSize.X and Kernel.Img.BookSize.Y.
The specification of this function in C# is:
RECERR kRecCreateBookPages(int sid, IntPtr hPage, out IntPtr phPage1, out IntPtr phPage2, [In] CUT_INFO pInfo);
kRecCreateBookPages
RECERR RECAPIKRN kRecCreateBookPages(int sid, HPAGE hPage, HPAGE *phPage1, HPAGE *phPage2, const CUT_INFO *pInfo)
Cutting each opened book image into two pages.
CUT_INFO
Structure for book images.
Definition KernelApi.h:5829
The specification of this function in Java is:
int kRecCreateBookPages(int sid, HPAGE hPage, HPAGE phPage1, HPAGE phPage2, CUT_INFO pInfo)
The specification of this function in Python is:
def kRecCreateBookPages(sid: int, hPage: "HPAGE", pInfo: "CUT_INFO") -> Tuple[int, "HPAGE", "HPAGE"]

◆ kRecCreateImg()

RECERR RECAPIKRN kRecCreateImg | ( | int | sid,
 |  | int | sizeX,
 |  | int | sizeY,
 |  | int | dpiX,
 |  | int | dpiY,
 |  | WORD | BitsPerPixel,
 |  | HPAGE * | phPage )

Creating an empty image.

The kRecCreateImg function creates a new, empty image by filling out a describing structure for the image management module and by allocating the proper amount of memory for the raw image data. This image will be attached to the page as both current and original image (II_CURRENT, II_ORIGINAL).

Parameters
[in] | sid | Settings Collection ID.
[in] | sizeX | Horizontal size of the image to be created, in pixels.
[in] | sizeY | Vertical size of the image to be created, in pixels.
[in] | dpiX | Horizontal resolution of the image (Dots Per Inch).
[in] | dpiY | Vertical resolution of the image.
[in] | BitsPerPixel | Bits per pixel (bit depth). Possible values are: 1, 4, 8, 24 (B/W, 4-bit gray-scale, 8-bit gray-scale and 24-bit color images, respectively).
[out] | phPage | Pointer of the handle of the new page returned by the image management module.
Return values
RECERR
Note
The created image is filled with 0 (0 is white if the image is B/W and black otherwise).
To create a palette-color image, first create an 8-bit gray-scale image. Then call the kRecSetImgPalette function with a pointer to a palette to declare the image as a palette-color one.
The specification of this function in C# is:
RECERR kRecCreateImg(int sid, int sizeX, int sizeY, int dpiX, int dpiY, ushort BitsPerPixel, out IntPtr phPage);
kRecCreateImg
RECERR RECAPIKRN kRecCreateImg(int sid, int sizeX, int sizeY, int dpiX, int dpiY, WORD BitsPerPixel, HPAGE *phPage)
Creating an empty image.
The specification of this function in Java is:
int kRecCreateImg(int sid, int sizeX, int sizeY, int dpiX, int dpiY, int BitsPerPixel, HPAGE phPage)
The specification of this function in Python is:
def kRecCreateImg(sid: int, sizeX: int, sizeY: int, dpiX: int, dpiY: int, BitsPerPixel: int) -> Tuple[int, "HPAGE"]

◆ kRecDeskewImg()

RECERR RECAPIKRN kRecDeskewImg | ( | int | sid,
 |  | HPAGE | hPage,
 |  | int | ImgSlope )

Deskewing.

The kRecDeskewImg function performs immediate deskewing on the original image. The resulting image will be the current one (II_CURRENT). If there are BW (II_BW) and thumbnail (II_THUMBNAIL) images they are deskewed as well.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of a page containing the image(s) to be deskewed.
[in] | ImgSlope | Integer slope value for deskewing. The value given here is the number of pixels of vertical ascent on 1000 horizontal pixels. That is, the tangent of the deskew angle multiplied by 1000.
Return values
RECERR
Note
For information about limits of page angle using deskew operations see Notes on Deskew.
The coordinates of all user zones will be recalculated. The OCR zones will be removed.
The image to be deskewed can be of any type (B/W, grayscale or color).
This function ignores the current Image deskewing mode setting as set by a previous kRecSetImgDeskew call and also the value in kRecSetImgSlope. Those settings relate only to deskewing performed during pre-processing initiated by kRecPreprocessImg, which supports programmed or auto-deskewing.
The specification of this function in C# is:
RECERR kRecDeskewImg(int sid, IntPtr hPage, int ImgSlope);
kRecDeskewImg
RECERR RECAPIKRN kRecDeskewImg(int sid, HPAGE hPage, int ImgSlope)
Deskewing.
The specification of this function in Java is:
int kRecDeskewImg(int sid, HPAGE hPage, int ImgSlope)
The specification of this function in Python is:
def kRecDeskewImg(sid: int, hPage: "HPAGE", ImgSlope: int) -> int

◆ kRecDespeckleImg()

RECERR RECAPIKRN kRecDespeckleImg | ( | int | sid,
 |  | HPAGE | hPage )

Despeckling.

The kRecDespeckleImg function performs an immediate adaptive noise removal on the current (II_CURRENT) image, irrespective of its resolution. If the current image is not black-and-white the function returns IMG_BITSPERPIXEL_ERR.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
Return values
RECERR
Note
This function is useful for images which originally had a grayed or colored background that was not completely removed by preprocessing. It can be useful also for faxed pages or those with a spotted background.
The algorithm runs at any resolution, however, it is optimized for images with at least 180 dpi resolution.
As an alternative, the setting kRecSetImgDespeckleMode is available.
see also kRecForceDespeckleImg.
The specification of this function in C# is:
RECERR kRecDespeckleImg(int sid, IntPtr hPage);
kRecDespeckleImg
RECERR RECAPIKRN kRecDespeckleImg(int sid, HPAGE hPage)
Despeckling.
The specification of this function in Java is:
int kRecDespeckleImg(int sid, HPAGE hPage)
The specification of this function in Python is:
def kRecDespeckleImg(sid: int, hPage: "HPAGE") -> int

◆ kRecDetectBlankPage()

RECERR RECAPIKRN kRecDetectBlankPage | ( | int | sid,
 |  | HPAGE | hPage,
 |  | INTBOOL * | pIsBlank )

Detecting blank pages.

Detects if a given page is a blank page.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[out] | pIsBlank | Pointer to a variable to store the result. It is TRUE, if the image is blank.
Return values
RECERR
Note
This function considers a page as blank if there is only some noise on it. It still returns TRUE if the image contains edge noise as a result of scanning. It returns FALSE if it finds some text or graphics on the page.
The specification of this function in C# is:
RECERR kRecDetectBlankPage(int sid, IntPtr hPage, out bool IsBlank);
kRecDetectBlankPage
RECERR RECAPIKRN kRecDetectBlankPage(int sid, HPAGE hPage, INTBOOL *pIsBlank)
Detecting blank pages.
The specification of this function in Java is:
int kRecDetectBlankPage(int sid, HPAGE hPage, int[] pIsBlank)
The specification of this function in Python is:
def kRecDetectBlankPage(sid: int, hPage: "HPAGE") -> Tuple[int, bool]

◆ kRecDetectBook()

RECERR RECAPIKRN kRecDetectBook | ( | int | sid,
 |  | HPAGE | hPage,
 |  | CUT_INFO * | pInfo )

Detecting facing book pages.

This function detects the place where the page image can be cut into two pages. It is useful when scanning two facing pages of a book simultaneously. First time after kRecInit or kRecResetBookSize, it stores the size of the resulting pages in settings. This size can always include both pages.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[out] | pInfo | Pointer of a variable to store the detected cutting information.
Return values
RECERR
Note
This function should be called before every kRecCreateBookPages, which performs the cutting on the given HPAGE.
The input HPAGE has to contain horizontal text lines, or it has to be rotated to such position (kRecPreprocessImg, kRecRotateImg).
This function sets the settings Kernel.Img.BookSize.X and Kernel.Img.BookSize.Y.
The specification of this function in C# is:
RECERR kRecDetectBook(int sid, IntPtr hPage, out CUT_INFO info);
kRecDetectBook
RECERR RECAPIKRN kRecDetectBook(int sid, HPAGE hPage, CUT_INFO *pInfo)
Detecting facing book pages.
The specification of this function in Java is:
int kRecDetectBook(int sid, HPAGE hPage, CUT_INFO pInfo)
The specification of this function in Python is:
def kRecDetectBook(sid: int, hPage: "HPAGE") -> Tuple[int, "CUT_INFO"]

◆ kRecDetectDropoutColorWeights()

RECERR RECAPIKRN kRecDetectDropoutColorWeights | ( | int | sid,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | RECT * | pRect,
 |  | int * | pwred,
 |  | int * | pwgreen,
 |  | int * | pwblue )

Detecting dropout color weights.

The kRecDetectDropoutColorWeights function calculates the best weights that can be used for drop-out color binarization. This detection operates on the current image (II_CURRENT) of the given HPAGE. Typical filled form documents contain three main colors: background color, preprinted drop-out color, and fill color. The goal of the drop-out color binarization is to create a binary image that does not contain the preprinted texts, lines, etc. You should define a rectangle, as large as possible, that contains the drop-out color and the background color, but should not contain the fill color. The returned weights can be passed to kRecSetDropoutColorWeights function.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the image, on which the detection runs.
[in] | iiImg | The index of the image, in which the coordinates of the input rectangle are to be given. Possible values are II_CURRENT and II_BW.
[in] | pRect | The rectangular area of the image in which the detection runs. This pointer must not be NULL.
[out] | pwred | Pointer of a variable to store the suggested weight of the red component.
[out] | pwgreen | Pointer of a variable to store the suggested weight of the green component.
[out] | pwblue | Pointer of a variable to store the suggested weight of the blue component.
Return values
RECERR
Note
This function only stores the recommended drop-out color weights of the given HPAGE and does not set these values. If you find the recommendations correct, you can set them with kRecSetDropoutColorWeights. Thus the detected values will not be used in primary image conversion and kRecPreprocessImg unless they are set. For more information, see kRecSetDropoutColorWeights.
When processing empty forms using a drop-out color, it is recommended to apply auto-deskewing (if desired) when the original image enters into the Engine's responsibility, or at least before the OCR image is created. Typically with forms, auto-deskew relies on finding printed lines or text lines that are usually form labels. Precisely these elements are removed by applying a drop-out color, so calling auto-deskew when the OCR image is already created is liable to fail. A possible workaround may be the following:
  1. Set drop-out color weights to default (77,150,29).
  2. Detect skew (kRecDetectImgSkew)
  3. Set drop-out color weights
  4. Set slope and rotation (kRecSetImgDeskew, kRecSetImgSlope, kRecSetImgRotation)
  5. Pre-process the image
The specification of this function in C# is:
RECERR kRecDetectDropoutColorWeights(int sid, IntPtr hPage, IMAGEINDEX iiImg, [In, Out] ref RECT pRect, out int pwred, out int pwgreen, out int pwblue);
IMAGEINDEX
IMAGEINDEX
Index of each image type in HPAGE.
Definition KernelApi.h:991
kRecDetectDropoutColorWeights
RECERR RECAPIKRN kRecDetectDropoutColorWeights(int sid, HPAGE hPage, IMAGEINDEX iiImg, RECT *pRect, int *pwred, int *pwgreen, int *pwblue)
Detecting dropout color weights.
The specification of this function in Java is:
int kRecDetectDropoutColorWeights(int sid, HPAGE hPage, IMAGEINDEX iiImg, RECT pRect, int[] pwred, int[] pwgreen, int[] pwblue)
The specification of this function in Python is:
def kRecDetectDropoutColorWeights(sid: int, hPage: "HPAGE", iiImg: int, pRect: "RECT") -> Tuple[int, int, int, int]

◆ kRecDetectFillingMethod()

RECERR RECAPIKRN kRecDetectFillingMethod | ( | int | sid,
 |  | HPAGE | hPage,
 |  | FILLINGMETHOD * | pocrType )

Detection of filling method.

This function tries to determine the type of content in the OCR zones of a page. If there is no OCR zone, the function works on user zones. It can identify handprinted, machine printed or dot-matrix printed text (9 and 24 pin) and barcodes. The function only looks into zones with the FM_DEFAULT value in their ZONE::fm field. If an output parameter address is passed the CSDK fills it with one general filling method based on the examined zones of the page. The integrating application can pass this value to the end-user for evaluation or can use it directly. Another use of this function is when it is called with NULL in its output parameter. In this case, the function performs a zone-by-zone analysis (on zones with FM_DEFAULT) and replaces the filling method of each zone with the determined one.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[out] | pocrType | Address of a variable to get the detected method or NULL.
Return values
RECERR
Note
Important details can be found in the section Detection of filling method.
If the zone contains objects from more than one filling method, it is indeterminate which filling method is selected.
To categorize text zones, there must be preferably more than 50 representative characters in the zone: the more characters are in a zone, the more accurate the detection is.
The specification of this function in C# is:
RECERR kRecDetectFillingMethod(int sid, IntPtr hPage, out FILLINGMETHOD pocrType);
// or when pocrType is NULL in C/C++
RECERR kRecDetectFillingMethod(int sid, IntPtr hPage);
kRecDetectFillingMethod
RECERR RECAPIKRN kRecDetectFillingMethod(int sid, HPAGE hPage, FILLINGMETHOD *pocrType)
Detection of filling method.
FILLINGMETHOD
FILLINGMETHOD
Filling methods.
Definition KernelApi.h:552
The specification of this function in Java is:
int kRecDetectFillingMethod(int sid, HPAGE hPage, FILLINGMETHOD[] pocrType)
The specification of this function in Python is:
def kRecDetectFillingMethod(sid: int, hPage: "HPAGE") -> Tuple[int, int]

◆ kRecDetectImgSkew()

RECERR RECAPIKRN kRecDetectImgSkew | ( | int | sid,
 |  | HPAGE | hPage,
 |  | int * | pSlope,
 |  | IMG_ROTATE * | pImgRotate )

Detecting orientation and skew.

The kRecDetectImgSkew function detects the orientation and the skew of the image.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page which contains the image.
[out] | pSlope | Pointer to a variable to get the slope value.
[out] | pImgRotate | Pointer to a variable to get the orientation of the image.
Return values
RECERR
Note
If the current Image rotation mode (kRecSetImgRotation) is
  • ROT_AUTO : this function really provides the detected orientation of the image,
  • otherwise: the current Image rotation mode setting is retrieved.
If the current Image deskewing mode (kRecSetImgDeskew) is
  • DSK_2D: this function really detects the image skew
  • DSK_SET: the current slope value is retrieved (as it was set by the last kRecSetImgSlope call),
  • DSK_NO: the function provides zero (0).
  • DSK_3D: the function provides zero (0).
For information about limits of page angle using deskew operations see Notes on Deskew.
The retrieved slope value (pSlope) is the number of pixels of vertical ascent on 1000 horizontal pixels. That is, the tangent of the deskew angle multiplied by 1000.
The detected skew value can be placed in kRecDeskewImg to immediately perform the specified amount of deskewing on a single image.
The slope value can also be placed in kRecSetImgSlope, which makes it available to kRecSetImgDeskew when DSK_SET is specified. Then all images are deskewed by the given value whenever kRecPreprocessImg is called.
When detecting the image rotation with Image rotation mode setting ROT_AUTO, one of the following values is returned: ROT_NO, ROT_RIGHT, ROT_DOWN, ROT_LEFT. This is the value by which the image should be rotated to reach the orientation which the program considers correct. This value can be placed in the kRecRotateImg function to explicitly perform the image rotation.
The specification of this function in C# is:
RECERR kRecDetectImgSkew(int sid, IntPtr hPage, out int pSlope, out IMG_ROTATE pImgRotate);
IMG_ROTATE
IMG_ROTATE
Available image transformations (rotation and/or mirroring).
Definition KernelApi.h:373
kRecDetectImgSkew
RECERR RECAPIKRN kRecDetectImgSkew(int sid, HPAGE hPage, int *pSlope, IMG_ROTATE *pImgRotate)
Detecting orientation and skew.
The specification of this function in Java is:
int kRecDetectImgSkew(int sid, HPAGE hPage, int[] pSlope, IMG_ROTATE[] pImgRotate)
The specification of this function in Python is:
def kRecDetectImgSkew(sid: int, hPage: "HPAGE") -> Tuple[int, int, int]

◆ kRecDropImg()

RECERR RECAPIKRN kRecDropImg | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg )

Removing an image from the page.

The kRecDropImg function removes an image from the given page.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image to be removed.
Return values
RECERR
Note
The current image (II_CURRENT) cannot be dropped.
The specification of this function in C# is:
RECERR kRecDropImg(IntPtr hPage, IMAGEINDEX iiImg);
kRecDropImg
RECERR RECAPIKRN kRecDropImg(HPAGE hPage, IMAGEINDEX iiImg)
Removing an image from the page.
The specification of this function in Java is:
int kRecDropImg(HPAGE hPage, IMAGEINDEX iiImg)
The specification of this function in Python is:
def kRecDropImg(hPage: "HPAGE", iiImg: int) -> int

◆ kRecEnhanceWhiteboardImg()

RECERR RECAPIKRN kRecEnhanceWhiteboardImg ( HPAGE hPage )

Enhancing images taken from whiteboards.

Improving the readability of text and diagrams on whiteboards, when captured by digital camera.

Parameters
[in] hPage Handle of the page.
Return values
RECERR
Note
The function returns an error if the II_CURRENT image is not a 24-bit true-color image.
The function uses Kernel.Img.Whiteboard.Strength setting.
The specification of this function in C# is:
RECERR kRecEnhanceWhiteboardImg(IntPtr hPage);
kRecEnhanceWhiteboardImg
RECERR RECAPIKRN kRecEnhanceWhiteboardImg(HPAGE hPage)
Enhancing images taken from whiteboards.
The specification of this function in Java is:
int kRecEnhanceWhiteboardImg(HPAGE hPage)
The specification of this function in Python is:
def kRecEnhanceWhiteboardImg(hPage: "HPAGE") -> int

◆ kRecFillImgArea()

RECERR RECAPIKRN kRecFillImgArea | ( | int | sid,
 |  | HPAGE | hPage,
 |  | LPCRECT | lpRect,
 |  | REC_COLOR | color,
 |  | FILLAREA_FLAGS | flags )

Filling image areas with a specified color.

The kRecFillImgArea function fills the image within (or outside) the given rectangle with the specified color.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the image to be modified.
[in] | lpRect | Pointer to a rectangle to be filled in. A NULL value means the entire image.
[in] | color | The area is filled in with this color. The color contains red, green, blue and alpha components. The red, green and blue components are intensity values from 0 to 255. The alpha component defines the opacity: 0 means that the color is totally transparent. The image is not changed if the alpha component is 0.
[in] | flags | The flags determining how the given rectangle is used.
Return values
RECERR
Note
The color is converted to the nearest possible value.
This function modifies the II_CURRENT image of the page.
The specification of this function in C# is:
RECERR kRecFillImgArea(int sid, IntPtr hPage, RECT lpRect, uint color, FILLAREA_FLAGS flags);
// or when lpRect is NULL in C/C++
RECERR kRecFillImgArea(int sid, IntPtr hPage, uint color, FILLAREA_FLAGS flags);
FILLAREA_FLAGS
FILLAREA_FLAGS
Determining the area to be filled by kRecFillImgArea.
Definition KernelApi.h:7649
kRecFillImgArea
RECERR RECAPIKRN kRecFillImgArea(int sid, HPAGE hPage, LPCRECT lpRect, REC_COLOR color, FILLAREA_FLAGS flags)
Filling image areas with a specified color.
The specification of this function in Java is:
int kRecFillImgArea(int sid, HPAGE hPage, RECT lpRect, long color, FILLAREA_FLAGS flags)
The specification of this function in Python is:
def kRecFillImgArea(sid: int, hPage: "HPAGE", lpRect: "RECT", color: int, flags: int) -> int

◆ kRecForceDespeckleImg()

RECERR RECAPIKRN kRecForceDespeckleImg | ( | int | sid,
 |  | HPAGE | hPage,
 |  | LPCRECT | pRect,
 |  | DESPECKLE_METHOD | method,
 |  | int | level )

Forcing despeckle.

This function performs noise removal on the given area within the current (II_CURRENT) image of a page. The method and the level of the noise removal can be specified.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | pRect | Pointer to the rectangle to be processed. A NULL value means the entire image.
[in] | method | Applied despeckle method.
[in] | level | Despeckle level. The possible values depend on the despeckle method.
Return values
RECERR
Note
If the image is not black-and-white the function returns IMG_BITSPERPIXEL_ERR unless the method is DESPECKLE_MEDIAN or DESPECKLE_MEDIANEX.
The possible despeckle level depends on the despeckle method.
See also kRecDespeckleImg.
The specification of this function in C# is:
RECERR kRecForceDespeckleImg(int sid, IntPtr hPage, RECT pRect, DESPECKLE_METHOD method, int level);
// or when pRect is NULL in C/C++
RECERR kRecForceDespeckleImg(int sid, IntPtr hPage, DESPECKLE_METHOD method, int level);
DESPECKLE_METHOD
DESPECKLE_METHOD
Despeckle method used by kRecForceDespeckleImg.
Definition KernelApi.h:7910
kRecForceDespeckleImg
RECERR RECAPIKRN kRecForceDespeckleImg(int sid, HPAGE hPage, LPCRECT pRect, DESPECKLE_METHOD method, int level)
Forcing despeckle.
The specification of this function in Java is:
int kRecForceDespeckleImg(int sid, HPAGE hPage, RECT pRect, DESPECKLE_METHOD method, int level)
The specification of this function in Python is:
def kRecForceDespeckleImg(sid: int, hPage: "HPAGE", pRect: "RECT", method: int, level: int) -> int

◆ kRecFreeImg()

RECERR RECAPIKRN kRecFreeImg ( HPAGE hPage )

Removing a page.

The kRecFreeImg function removes a page from the image management module. All internal images relating to the page and any recognition results are removed.

Parameters
[in] hPage Handle of the page to be removed.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecFreeImg(IntPtr hPage);
kRecFreeImg
RECERR RECAPIKRN kRecFreeImg(HPAGE hPage)
Removing a page.
The specification of this function in Java is:
int kRecFreeImg(HPAGE hPage)
The specification of this function in Python is:
def kRecFreeImg(hPage: "HPAGE") -> int

◆ kRecGetDropoutColorWeights()

RECERR RECAPIKRN kRecGetDropoutColorWeights | ( | int | sid,
 |  | int * | pwred,
 |  | int * | pwgreen,
 |  | int * | pwblue )

Getting the dropout color weight settings.

The kRecGetDropoutColorWeights function inquires the current value of the drop-out color weights. See kRecSetDropoutColorWeights.

Parameters
[in] | sid | Settings Collection ID.
[in] | pwred | Pointer of a variable to store the weight of the red component.
[in] | pwgreen | Pointer of a variable to store the weight of the green component.
[in] | pwblue | Pointer of a variable to store the weight of the blue component.
Return values
RECERR
Note
The B/W image is created if it does not exist, except with kRecPreprocessImg, which creates it in any case. These settings affect only the primary image conversion (i.e. conversion during loading, see kRecSetImgConvMode) and kRecPreprocessImg. Otherwise, the weights stored in the HPAGE are used for binarization. At loading, these settings are stored in the HPAGE and they can be changed by kRecDetectDropoutColorWeights.
This function gets the settings Kernel.Img.DropoutColor.Blue and ...Green and ...Red. These settings can be changed by kRecSetDropoutColorWeights.
The specification of this function in C# is:
RECERR kRecGetDropoutColorWeights(int sid, out int wred, out int wgreen, out int wblue);
kRecGetDropoutColorWeights
RECERR RECAPIKRN kRecGetDropoutColorWeights(int sid, int *pwred, int *pwgreen, int *pwblue)
Getting the dropout color weight settings.
The specification of this function in Java is:
int kRecGetDropoutColorWeights(int sid, int[] pwred, int[] pwgreen, int[] pwblue)
The specification of this function in Python is:
def kRecGetDropoutColorWeights(sid: int) -> Tuple[int, int, int, int]

◆ kRecGetFaxCorrection()

RECERR RECAPIKRN kRecGetFaxCorrection | ( | int | sid,
 |  | INTBOOL * | pCorr )

Getting the value of fax correction setting.

This function retrieves the setting Kernel.Img.FaxCorrectionEnabled.

Parameters
[in] | sid | Settings Collection ID.
[in] | pCorr | Pointer of a variable to get the value of the setting.
Return values
RECERR
Note
This function gets the setting Kernel.Img.FaxCorrectionEnabled. This setting can be changed by kRecSetFaxCorrection.
The specification of this function in C# is:
RECERR kRecGetFaxCorrection(int sid, out bool pCorr);
kRecGetFaxCorrection
RECERR RECAPIKRN kRecGetFaxCorrection(int sid, INTBOOL *pCorr)
Getting the value of fax correction setting.
The specification of this function in Java is:
int kRecGetFaxCorrection(int sid, int[] pCorr)
The specification of this function in Python is:
def kRecGetFaxCorrection(sid: int) -> Tuple[int, bool]

◆ kRecGetFrameCount()

RECERR RECAPIKRN kRecGetFrameCount | ( | HPAGE | hPage,
 |  | int * | pnFrames )

Getting the number of frames.

This function gets the number of frames detected previously by kRecRecognize functions.

Parameters
[in] | hPage | Handle of the page.
[out] | pnFrames | Address of an integer variable to get the number of frames.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetFrameCount(IntPtr hPage, out int pnFrames);
kRecGetFrameCount
RECERR RECAPIKRN kRecGetFrameCount(HPAGE hPage, int *pnFrames)
Getting the number of frames.
The specification of this function in Java is:
int kRecGetFrameCount(HPAGE hPage, int[] pnFrames)
The specification of this function in Python is:
def kRecGetFrameCount(hPage: "HPAGE") -> Tuple[int, int]

◆ kRecGetFrameInfo()

RECERR RECAPIKRN kRecGetFrameInfo | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPCELL_INFO | pFrame,
 |  | int | nFrame )

Getting frame information.

This function can be used for getting information about any frame detected previously by kRecRecognize functions.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image in the page, whose coordinate system is used to report the frames.
[out] | pFrame | Pointer to a variable for storing the requested frame information.
[in] | nFrame | Index of the frame in the frame list, from which the information is requested.
Return values
RECERR
Note
The frame is a homogeneous color rectangular area with or without border lines. It may contain zones (ZONE). Frames are detected by kRecRecognize, only when the used decomp method is DCM_STANDARD. If the image is colored and the setting Kernel.OcrMgr.RetainColor is RETAINCOLOR_YES (see kRecSetRetainColor) it tries to detect the colored frames in the color image as well. Otherwise, the detection runs on the II_BW image. The structure CELL_INFO is used for describing frames.
The index of the first frame in the frame list is zero (0).
The specification of this function in C# is:
RECERR kRecGetFrameInfo(IntPtr hPage, IMAGEINDEX iiImg, out CELL_INFO pFrame, int nFrame);
kRecGetFrameInfo
RECERR RECAPIKRN kRecGetFrameInfo(HPAGE hPage, IMAGEINDEX iiImg, LPCELL_INFO pFrame, int nFrame)
Getting frame information.
CELL_INFO
Structure of a cell in a table.
Definition KernelApi.h:5250
The specification of this function in Java is:
int kRecGetFrameInfo(HPAGE hPage, IMAGEINDEX iiImg, CELL_INFO pFrame, int nFrame)
The specification of this function in Python is:
def kRecGetFrameInfo(hPage: "HPAGE", iiImg: int, nFrame: int) -> Tuple[int, "CELL_INFO"]

◆ kRecGetImgArea()

RECERR RECAPIKRN kRecGetImgArea | ( | int | sid,
 |  | HPAGE | hPageIn,
 |  | IMAGEINDEX | iiImg,
 |  | LPCRECT | pSrcRect,
 |  | LPCSIZE | pDstSize,
 |  | LPIMG_INFO | pImg,
 |  | BYTE ** | ppBitmap )

Getting image area.

The kRecGetImgArea function copies and exports a rectangular area of the given image of the page stored in the Engine's image management module into a buffer available to the application. It results in a bitmap in the application's memory space. The function compresses or stretches the area if necessary to fit the dimensions of the destination size.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPageIn | Handle of the page which contains the source image.
[in] | iiImg | Index of the source image in the page.
[in] | pSrcRect | Coordinates of the source rectangular area. NULL means: the whole image will be copied.
[in] | pDstSize | Pointer to the dimensions of the destination area. A value of NULL here means that the destination size will be equal to the original one.
[out] | pImg | Address of a structure to get information about the output image area.
[out] | ppBitmap | Address of a pointer to the resulting bitmap.
Return values
RECERR
Note
If the destination size is smaller or greater than the original source area, the function compresses or stretches the area into the destination. During exporting the bitmap will be stretched or compressed according to the current setting of the Image stretching mode. The stretching mode can be set by a previous kRecSetImgStretchMode.
After having called this function, the application should call the kRecFree function to free the memory area containing the bitmap, when it is no longer needed.
The coordinates of the leftmost pixel of the uppermost line of the image are (0,0).
In B/W images created by this function the representation of black pixels is one (1), and white is zero (0). So, for displaying the image, use the NOTSRCCOPY raster operation code.
Instead of using this function, the application may prefer to call kRecStartReadImg, kRecReadImg, kRecStopReadImg, which transfer an image from the Engine to the application line-by-line.
If the image area to be copied also needs to be rotated and/or mirrored, use kRecRotateImgArea as an alternative to this function.
See also kRecGetImgAreaEx.
It is recommended to check the resulting image info, since it is not guaranteed that the type (BitsPerPixel) parameter will be the same as for the image given by the image index. While enlarging the image always results in a bitmap of the same type as the specified one, when image compressing/stretching is necessary, the BitsPerPixel field of the resulting image will depend on the current Image stretching mode setting.
Some attributes of the new image to be created, like the Line order (IMG_LINEORDER), the Padding mode (IMG_PADDING) and - for color images - the RGBorder (IMG_RGBORDER) can be specified by a preceding call of kRecSetImgFormat.
Getting an image area for display:
RECERR rc;
HPAGE hPage;
IMG_INFO img;
RECT rect;
BYTE *pBitmap;
HBITMAP hBitmap;
. . .
rect.left = 0;
rect.top = 0;
rect.right = 200;
rect.bottom = 180;
rc = kRecGetImgArea(sid, hPage, II_ORIGINAL, &rect, NULL, &img, &pBitmap);
hBitmap = CreateBitmap(img.Size.cx, img.Size.cy, 1, img.BitsPerPixel, pBitmap);
rc = kRecFree(pBitmap);
. . .
kRecFree
RECERR RECAPIKRN kRecFree(void *pArray)
Freeing memory objects.
kRecGetImgArea
RECERR RECAPIKRN kRecGetImgArea(int sid, HPAGE hPageIn, IMAGEINDEX iiImg, LPCRECT pSrcRect, LPCSIZE pDstSize, LPIMG_INFO pImg, BYTE **ppBitmap)
Getting image area.
II_ORIGINAL
@ II_ORIGINAL
Definition KernelApi.h:996
_IMG_INFO
Structure of an image containing basic physical information.
Definition KernelApi.h:214
_IMG_INFO::Size
SIZE Size
Definition KernelApi.h:215
_IMG_INFO::BitsPerPixel
WORD BitsPerPixel
Definition KernelApi.h:222
The specification of this function in C# is:
RECERR kRecGetImgArea(int sid, IntPtr hPageIn, IMAGEINDEX iiImg, RECT pSrcRect, SIZE pDstSize, out IMG_INFO pImg,
out byte[] pBitmap);
// or when pSrcRect is NULL in C/C++
RECERR kRecGetImgArea(int sid, IntPtr hPageIn, IMAGEINDEX iiImg, SIZE pDstSize, out IMG_INFO pImg, out byte[] pBitmap);
// or when pDstSize is NULL in C/C++
RECERR kRecGetImgArea(int sid, IntPtr hPageIn, IMAGEINDEX iiImg, RECT pSrcRect, out IMG_INFO pImg, out byte[] pBitmap);
// or when both are NULL
RECERR kRecGetImgArea(int sid, IntPtr hPageIn, IMAGEINDEX iiImg, out IMG_INFO pImg, out byte[] pBitmap);
// or
RECERR kRecGetImgArea(int sid, IntPtr hPageIn, IMAGEINDEX iiImg, RECT pSrcRect, SIZE pDstSize, out IMG_INFO pImg,
out Bitmap bmp);
// or when pSrcRect is NULL in C/C++
RECERR kRecGetImgArea(int sid, IntPtr hPageIn, IMAGEINDEX iiImg, SIZE pDstSize, out IMG_INFO pImg, out Bitmap bmp);
// or when pDstSize is NULL in C/C++
RECERR kRecGetImgArea(int sid, IntPtr hPageIn, IMAGEINDEX iiImg, RECT pSrcRect, out IMG_INFO pImg, out Bitmap bmp);
// or when both are NULL
RECERR kRecGetImgArea(int sid, IntPtr hPageIn, IMAGEINDEX iiImg, out IMG_INFO pImg, out Bitmap bmp);
The specification of this function in Java is:
int kRecGetImgArea(int sid, HPAGE hPageIn, IMAGEINDEX iiImg, RECT pSrcRect, SIZE pDstSize, IMG_INFO pImg, OutputByteBuffer outputByteBuffer)

◆ kRecGetImgAreaEx()

RECERR RECAPIKRN kRecGetImgAreaEx | ( | int | sid,
 |  | HPAGE | hPageIn,
 |  | IMAGEINDEX | iiImg,
 |  | LPCRECT | pSrcRect,
 |  | LPCSIZE | pDstSize,
 |  | IMG_STRETCHMODE | StretchMode,
 |  | IMG_LINEORDER | LineOrder,
 |  | IMG_RGBORDER | RGBOrder,
 |  | INTBOOL | strict,
 |  | IMG_PADDING | Padding,
 |  | LPIMG_INFO | pImg,
 |  | BYTE ** | ppBitmap )

Getting image area.

The kRecGetImgAreaEx function copies and exports a rectangular area of the given image of the page stored in the Engine's image management module into a buffer available to the application. It results in a bitmap in the application's memory space. The function compresses or stretches the area if necessary to fit the dimensions of the destination size.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPageIn | Handle of the page which contains the source image.
[in] | iiImg | Index of the source image in the page.
[in] | pSrcRect | Coordinates of the source rectangular area. NULL means: the whole image will be copied.
[in] | pDstSize | Pointer to the dimensions of the destination area. A value of NULL here means that the destination size will be equal to the original one.
[in] | StretchMode | Stretching mode.
[in] | LineOrder | Order of the lines in the received buffer.
[in] | RGBOrder | Order of the composite color components (COLOR_RGB, COLOR_BGR or COLOR_BGRA).
[in] | strict | If TRUE: the received buffer will contain 24-bit RGB, 24-bit BGR, 32-bit BGRA or 32-bit ARGB bitmap depending on RGBOrder. If FALSE: the received buffer may contain 1-bit or 8-bit bitmap too if the input is 1-bit or 8-bit image (just like kRecGetImgArea)
[in] | Padding | This parameter determines how the lines are to be padded in the received buffer.
[out] | pImg | Address of a structure to get information about the output image area.
[out] | ppBitmap | Address of a pointer to the resulting bitmap.
Return values
RECERR
Note
If the destination size is smaller or greater than the original source area, the function compresses or stretches the area into the destination. During exporting the bitmap will be stretched or compressed according to the StretchMode parameter.
After having called this function, the application should call the kRecFree function to free the memory area containing the bitmap, when it is no longer needed.
The coordinates of the leftmost pixel of the uppermost line of the image are (0,0).
See also kRecGetImgArea.
The specification variations of this function in C# are:
RECERR kRecGetImgAreaEx(int sid, IntPtr hPageIn, IMAGEINDEX iiImg, RECT pSrcRect, SIZE pDstSize,
IMG_STRETCHMODE StretchMode, IMG_LINEORDER LineOrder, IMG_RGBORDER RGBOrder,
[MarshalAs(UnmanagedType.Bool)] bool strict, IMG_PADDING Padding, out IMG_INFO Img, out IntPtr pBitmap);
RECERR kRecGetImgAreaEx(int sid, IntPtr hPageIn, IMAGEINDEX iiImg, RECT pSrcRect, SIZE pDstSize,
IMG_STRETCHMODE StretchMode, IMG_LINEORDER LineOrder, IMG_RGBORDER RGBOrder,
[MarshalAs(UnmanagedType.Bool)] bool strict, IMG_PADDING Padding, out IMG_INFO Img, out byte[] pBitmap);
RECERR kRecGetImgAreaEx(int sid, IntPtr hPageIn, IMAGEINDEX iiImg, SIZE pDstSize,
IMG_STRETCHMODE StretchMode, IMG_LINEORDER LineOrder, IMG_RGBORDER RGBOrder,
[MarshalAs(UnmanagedType.Bool)] bool strict, IMG_PADDING Padding, out IMG_INFO Img, out byte[] pBitmap);
RECERR kRecGetImgAreaEx(int sid, IntPtr hPageIn, IMAGEINDEX iiImg, RECT pSrcRect,
IMG_STRETCHMODE StretchMode, IMG_LINEORDER LineOrder, IMG_RGBORDER RGBOrder,
[MarshalAs(UnmanagedType.Bool)] bool strict, IMG_PADDING Padding, out IMG_INFO Img, out byte[] pBitmap);
RECERR kRecGetImgAreaEx(int sid, IntPtr hPageIn, IMAGEINDEX iiImg,
IMG_STRETCHMODE StretchMode, IMG_LINEORDER LineOrder, IMG_RGBORDER RGBOrder,
[MarshalAs(UnmanagedType.Bool)] bool strict, IMG_PADDING Padding, out IMG_INFO Img, out byte[] pBitmap);
RECERR kRecGetImgAreaEx(int sid, IntPtr hPageIn, IMAGEINDEX iiImg, RECT pSrcRect, SIZE pDstSize,
IMG_STRETCHMODE StretchMode, IMG_LINEORDER LineOrder, IMG_RGBORDER RGBOrder,
[MarshalAs(UnmanagedType.Bool)] bool strict, IMG_PADDING Padding, out IMG_INFO Img, out Bitmap bmp);
RECERR kRecGetImgAreaEx(int sid, IntPtr hPageIn, IMAGEINDEX iiImg, SIZE pDstSize,
IMG_STRETCHMODE StretchMode, IMG_LINEORDER LineOrder, IMG_RGBORDER RGBOrder,
[MarshalAs(UnmanagedType.Bool)] bool strict, IMG_PADDING Padding, out IMG_INFO Img, out Bitmap bmp);
RECERR kRecGetImgAreaEx(int sid, IntPtr hPageIn, IMAGEINDEX iiImg, RECT pSrcRect,
IMG_STRETCHMODE StretchMode, IMG_LINEORDER LineOrder, IMG_RGBORDER RGBOrder,
[MarshalAs(UnmanagedType.Bool)] bool strict, IMG_PADDING Padding, out IMG_INFO Img, out Bitmap bmp);
RECERR kRecGetImgAreaEx(int sid, IntPtr hPageIn, IMAGEINDEX iiImg,
IMG_STRETCHMODE StretchMode, IMG_LINEORDER LineOrder, IMG_RGBORDER RGBOrder,
[MarshalAs(UnmanagedType.Bool)] bool strict, IMG_PADDING Padding, out IMG_INFO Img, out Bitmap bmp);
IMG_RGBORDER
IMG_RGBORDER
Image color order.
Definition KernelApi.h:419
IMG_PADDING
IMG_PADDING
Image padding.
Definition KernelApi.h:404
kRecGetImgAreaEx
RECERR RECAPIKRN kRecGetImgAreaEx(int sid, HPAGE hPageIn, IMAGEINDEX iiImg, LPCRECT pSrcRect, LPCSIZE pDstSize, IMG_STRETCHMODE StretchMode, IMG_LINEORDER LineOrder, IMG_RGBORDER RGBOrder, INTBOOL strict, IMG_PADDING Padding, LPIMG_INFO pImg, BYTE **ppBitmap)
Getting image area.
IMG_STRETCHMODE
IMG_STRETCHMODE
Image stretching mode.
Definition KernelApi.h:500
IMG_LINEORDER
IMG_LINEORDER
Image line order.
Definition KernelApi.h:392
The specification of this function in Java is:
int kRecGetImgAreaEx(int sid, HPAGE hPageIn, IMAGEINDEX iiImg, RECT pSrcRect, SIZE pDstSize, IMG_STRETCHMODE StretchMode, IMG_LINEORDER LineOrder, IMG_RGBORDER RGBOrder, int strict, IMG_PADDING Padding, IMG_INFO pImg, OutputByteBuffer outputByteBuffer)

◆ kRecGetImgBinarizationMode()

RECERR RECAPIKRN kRecGetImgBinarizationMode | ( | int | sid,
 |  | LPIMG_CONVERSION | pBWConversion )

Getting secondary image conversion mode.

The kRecGetImgBinarizationMode function inquires the current secondary image conversion mode setting.

Parameters
[in] | sid | Settings Collection ID.
[out] | pBWConversion | Address of a variable to receive the current secondary image conversion mode setting.
Return values
RECERR
Note
This function gets the setting Kernel.Img.Binarization.SecondaryMode. This setting can be changed by kRecSetImgBinarizationMode.
The specification of this function in C# is:
RECERR kRecGetImgBinarizationMode(int sid, out IMG_CONVERSION pBWConversion);
kRecGetImgBinarizationMode
RECERR RECAPIKRN kRecGetImgBinarizationMode(int sid, LPIMG_CONVERSION pBWConversion)
Getting secondary image conversion mode.
The specification of this function in Java is:
int kRecGetImgBinarizationMode(int sid, IMG_CONVERSION[] pBWConversion)
The specification of this function in Python is:
def kRecGetImgBinarizationMode(sid: int) -> Tuple[int, int]

◆ kRecGetImgBrightness()

RECERR RECAPIKRN kRecGetImgBrightness | ( | int | sid,
 |  | int * | lpBrightness )

Getting brightness.

The kRecGetImgBrightness function inquires the current value of the threshold fine-tuning setting.

Parameters
[in] | sid | Settings Collection ID.
[out] | lpBrightness | Address of the variable to get the current brightness setting.
Return values
RECERR
Note
This function gets the setting Kernel.Img.Binarization.Brightness. This setting can be changed by kRecSetImgBrightness.
The specification of this function in C# is:
RECERR kRecGetImgBrightness(int sid, out int pBrightness);
kRecGetImgBrightness
RECERR RECAPIKRN kRecGetImgBrightness(int sid, int *lpBrightness)
Getting brightness.
The specification of this function in Java is:
int kRecGetImgBrightness(int sid, int[] lpBrightness)
The specification of this function in Python is:
def kRecGetImgBrightness(sid: int) -> Tuple[int, int]

◆ kRecGetImgConvMode()

RECERR RECAPIKRN kRecGetImgConvMode | ( | int | sid,
 |  | IMG_CONVERSION * | pConversion )

Getting primary image conversion mode.

The kRecGetImgConvMode function inquires the current primary image conversion mode setting.

Parameters
[in] | sid | Settings Collection ID.
[out] | pConversion | Address of a variable to receive the current setting of the primary image conversion mode.
Return values
RECERR
Note
This function gets the setting Kernel.Img.Binarization.PrimaryMode. This setting can be changed by kRecSetImgConvMode.
The specification of this function in C# is:
RECERR kRecGetImgConvMode(int sid, out IMG_CONVERSION pConversion);
kRecGetImgConvMode
RECERR RECAPIKRN kRecGetImgConvMode(int sid, IMG_CONVERSION *pConversion)
Getting primary image conversion mode.
The specification of this function in Java is:
int kRecGetImgConvMode(int sid, IMG_CONVERSION[] pConversion)
The specification of this function in Python is:
def kRecGetImgConvMode(sid: int) -> Tuple[int, int]

◆ kRecGetImgDeskew()

RECERR RECAPIKRN kRecGetImgDeskew | ( | int | sid,
 |  | IMG_DESKEW * | pImgDeskew )

Getting deskew mode.

The kRecGetImgDeskew function inquires the current Image deskewing mode setting.

Parameters
[in] | sid | Settings Collection ID.
[out] | pImgDeskew | Pointer to a variable to get the current deskewing mode.
Return values
RECERR
Note
This function gets the setting Kernel.Img.Deskew.Mode. This setting can be changed by kRecSetImgDeskew.
The specification of this function in C# is:
RECERR kRecGetImgDeskew(int sid, out IMG_DESKEW pImgDeskew);
kRecGetImgDeskew
RECERR RECAPIKRN kRecGetImgDeskew(int sid, IMG_DESKEW *pImgDeskew)
Getting deskew mode.
IMG_DESKEW
IMG_DESKEW
Image deskewing mode.
Definition KernelApi.h:482
The specification of this function in Java is:
int kRecGetImgDeskew(int sid, IMG_DESKEW[] pImgDeskew)
The specification of this function in Python is:
def kRecGetImgDeskew(sid: int) -> Tuple[int, int]

◆ kRecGetImgDespeckleMode()

RECERR RECAPIKRN kRecGetImgDespeckleMode | ( | int | sid,
 |  | LPINTBOOL | lpbMode )

Getting despeckle mode.

The kRecGetImgDespeckleMode function inquires the current Image despeckle mode setting of the Engine.

Parameters
[in] | sid | Settings Collection ID.
[out] | lpbMode | Pointer to a variable to get the current setting.
Return values
RECERR
Note
This function gets the setting Kernel.Img.DespeckleMode. This setting can be changed by kRecSetImgDespeckleMode.
The specification of this function in C# is:
RECERR kRecGetImgDespeckleMode(int sid, out bool pbMode);
kRecGetImgDespeckleMode
RECERR RECAPIKRN kRecGetImgDespeckleMode(int sid, LPINTBOOL lpbMode)
Getting despeckle mode.
The specification of this function in Java is:
int kRecGetImgDespeckleMode(int sid, int[] lpbMode)
The specification of this function in Python is:
def kRecGetImgDespeckleMode(sid: int) -> Tuple[int, bool]

◆ kRecGetImgDownsample()

RECERR RECAPIKRN kRecGetImgDownsample | ( | int | sid,
 |  | INTBOOL * | pdownsample )

Getting the value of view downsample setting.

This function retrieves the setting Kernel.Img.ViewDownsample. For more information about this setting see Settings of the Image Handling Module. See kRecSetImgDownsample.

Parameters
[in] | sid | Settings Collection ID.
[in] | pdownsample | Pointer of a variable to get the value of the setting.
Return values
RECERR
Note
This function gets the setting Kernel.Img.ViewDownsample. This setting can be changed by kRecSetImgDownsample.
The specification of this function in C# is:
RECERR kRecGetImgDownsample(int sid, out bool pdownsample);
kRecGetImgDownsample
RECERR RECAPIKRN kRecGetImgDownsample(int sid, INTBOOL *pdownsample)
Getting the value of view downsample setting.
The specification of this function in Java is:
int kRecGetImgDownsample(int sid, int[] pdownsample)
The specification of this function in Python is:
def kRecGetImgDownsample(sid: int) -> Tuple[int, bool]

◆ kRecGetImgFlags()

RECERR RECAPIKRN kRecGetImgFlags | ( | HPAGE | hPage,
 |  | IMG_FLAGS | Flag,
 |  | INTBOOL * | pbValue )

Getting the value of image flags.

The kRecGetImgFlags function retrieves the current value of the specified flag of the given HPAGE.

Parameters
[in] | hPage | Handle of the page.
[in] | Flag | The flag to get. See: IMG_FLAGS.
[in] | pbValue | Address of the pointer to get the flag.
Note
These flags are automatically set during image loading process. The IMG_FLAGS_CAMERAIMAGE flag is set to 1 when the source is JPG file, and the exif info contains tags that suggest that the image is from digital camera or phone. You can change this flag by kRecSetImgFlags.
This function can retrieve the value of a single flag per call, so flag combinations do not work.
The specification of this function in C# is:
RECERR kRecGetImgFlags(IntPtr hPage, IMG_FLAGS Flag, [MarshalAs(UnmanagedType.Bool)] out bool pbValue);
kRecGetImgFlags
RECERR RECAPIKRN kRecGetImgFlags(HPAGE hPage, IMG_FLAGS Flag, INTBOOL *pbValue)
Getting the value of image flags.
IMG_FLAGS
IMG_FLAGS
Image flags.
Definition KernelApi.h:11089
The specification of this function in Java is:
int kRecGetImgFlags(HPAGE hPage, IMG_FLAGS Flag, int[] pbValue)
The specification of this function in Python is:
def kRecGetImgFlags(hPage: "HPAGE", Flag: int) -> Tuple[int, bool]

◆ kRecGetImgFormat()

RECERR RECAPIKRN kRecGetImgFormat | ( | int | sid,
 |  | IMG_LINEORDER * | plineord,
 |  | IMG_PADDING * | ppadding,
 |  | IMG_RGBORDER * | pord )

Getting image format.

The kRecGetImgFormat function inquires the current setting of the line order, the padding mode and the order of the composite color components of the image.

Parameters
[in] | sid | Settings Collection ID.
[out] | plineord | Address to a variable to hold the current line order setting.
[out] | ppadding | Address to a variable to hold the current padding mode setting.
[out] | pord | Address to a variable to hold the current RGB order setting.
Return values
RECERR
Note
This function gets the settings Kernel.Img.LineOrder and ...Padding and ...RGBOrder. These settings can be changed by kRecSetImgFormat.
The specification of this function in C# is:
RECERR kRecGetImgFormat(int sid, out IMG_LINEORDER plineord, out IMG_PADDING ppadding, out IMG_RGBORDER pord);
kRecGetImgFormat
RECERR RECAPIKRN kRecGetImgFormat(int sid, IMG_LINEORDER *plineord, IMG_PADDING *ppadding, IMG_RGBORDER *pord)
Getting image format.
The specification of this function in Java is:
int kRecGetImgFormat(int sid, IMG_LINEORDER[] plineord, IMG_PADDING[] ppadding, IMG_RGBORDER[] pord)
The specification of this function in Python is:
def kRecGetImgFormat(sid: int) -> Tuple[int, int, int, int]

◆ kRecGetImgInfo()

RECERR RECAPIKRN kRecGetImgInfo | ( | int | sid,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPIMG_INFO | pImg )

Getting image information.

The kRecGetImgInfo function retrieves information about any image of the page. This includes e.g. dimensions, resolution, image type (number of bits per pixel), etc. of the specified image.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the requested image.
[in] | iiImg | Index to the requested image in the page.
[in] | pImg | Address of a IMG_INFO structure to get the image information.
Return values
RECERR
Note
For palette-color images, a further call of kRecGetImgPalette provides the palette.
The specification of this function in C# is:
RECERR kRecGetImgInfo(int sid, IntPtr hPage, IMAGEINDEX iiImg, out IMG_INFO pImg);
kRecGetImgInfo
RECERR RECAPIKRN kRecGetImgInfo(int sid, HPAGE hPage, IMAGEINDEX iiImg, LPIMG_INFO pImg)
Getting image information.
The specification of this function in Java is:
int kRecGetImgInfo(int sid, HPAGE hPage, IMAGEINDEX iiImg, IMG_INFO pImg)
The specification of this function in Python is:
def kRecGetImgInfo(sid: int, hPage: "HPAGE", iiImg: int) -> Tuple[int, "IMG_INFO"]

◆ kRecGetImgInvert()

RECERR RECAPIKRN kRecGetImgInvert | ( | int | sid,
 |  | IMG_INVERT * | lpImgInvert )

Getting inversion mode.

The kRecGetImgInvert function inquires the current Image inversion mode setting.

Parameters
[in] | sid | Settings Collection ID.
[out] | lpImgInvert | Pointer to a variable to get the current inversion mode.
Return values
RECERR
Note
This function gets the setting Kernel.Img.Invert. This setting can be changed by kRecSetImgInvert.
The specification of this function in C# is:
RECERR kRecGetImgInvert(int sid, out IMG_INVERT pImgInvert);
IMG_INVERT
IMG_INVERT
Image inversion mode.
Definition KernelApi.h:471
kRecGetImgInvert
RECERR RECAPIKRN kRecGetImgInvert(int sid, IMG_INVERT *lpImgInvert)
Getting inversion mode.
The specification of this function in Java is:
int kRecGetImgInvert(int sid, IMG_INVERT[] lpImgInvert)
The specification of this function in Python is:
def kRecGetImgInvert(sid: int) -> Tuple[int, int]

◆ kRecGetImgMetaData()

RECERR RECAPIKRN kRecGetImgMetaData | ( | HPAGE | hPage,
 |  | HSETTING * | phMetaData )

Getting additional information about the page.

The kRecGetImgMetaData function retrieves additional information attached to the page in the image file. This includes exif info for JPG files, the tags of TIF files and several properties of PDF files.

Parameters
[in] | hPage | Handle of the page.
[out] | phMetaData | The returned handle is the root of the metadata.
Return values
RECERR
Note
If hPage does not contain metadata, the function returns a NULL handle.
Metadata is organized into a tree. This tree corresponds to a tree of settings. The handle returned by this function is a setting handle pointing to the root of the metadata tree. Use the functions of the Settings Manager Module to access information embedded to the tree.
The specification of this function in C# is:
RECERR kRecGetImgMetaData(IntPtr hPage, out IntPtr phMetaData);
kRecGetImgMetaData
RECERR RECAPIKRN kRecGetImgMetaData(HPAGE hPage, HSETTING *phMetaData)
Getting additional information about the page.

◆ kRecGetImgPalette()

RECERR RECAPIKRN kRecGetImgPalette | ( | int | sid,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPBYTE | pPal )

Getting the palette of the image.

This function retrieves the palette of the selected image of the given page.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the inquired image.
[in] | iiImg | Index of the inquired image.
[out] | pPal | Pointer of a buffer to store the palette. It must be large enough to hold 768 bytes. See notes.
Return values
RECERR
Note
Only the 8-bit palette-color images are supported, so the size of the palette is always 3*256 bytes. The order of the composite color objects in the palette is always red, green, blue. If the image does not contain palette the function returns API_PARAMETER_ERR.
The specification of this function in C# is:
RECERR kRecGetImgPalette(int sid, IntPtr hPage, IMAGEINDEX iiImg, out byte[] pPal);
kRecGetImgPalette
RECERR RECAPIKRN kRecGetImgPalette(int sid, HPAGE hPage, IMAGEINDEX iiImg, LPBYTE pPal)
Getting the palette of the image.
The specification of this function in Java is:
int kRecGetImgPalette(int sid, HPAGE hPage, IMAGEINDEX iiImg, java.nio.ByteBuffer pPal)

◆ kRecGetImgResolEnhancement()

RECERR RECAPIKRN kRecGetImgResolEnhancement | ( | int | sid,
 |  | IMG_RESENH * | res )

Getting resolution enhancement mode.

The kRecGetImgResolEnhancement function inquires the current Image resolution enhancement mode setting of the Engine.

Parameters
[in] | sid | Settings Collection ID.
[out] | res | Pointer to a variable to get the current setting.
Return values
RECERR.
Note
This function gets the setting Kernel.Img.ResolutionEnhancement. This setting can be changed by kRecSetImgResolEnhancement.
The specification of this function in C# is:
RECERR kRecGetImgResolEnhancement(int sid, out IMG_RESENH res);
kRecGetImgResolEnhancement
RECERR RECAPIKRN kRecGetImgResolEnhancement(int sid, IMG_RESENH *res)
Getting resolution enhancement mode.
The specification of this function in Java is:
int kRecGetImgResolEnhancement(int sid, IMG_RESENH[] res)
The specification of this function in Python is:
def kRecGetImgResolEnhancement(sid: int) -> Tuple[int, int]

◆ kRecGetImgRotation()

RECERR RECAPIKRN kRecGetImgRotation | ( | int | sid,
 |  | IMG_ROTATE * | lpImgRotate )

Getting rotation mode.

The kRecGetImgRotation function inquires the current Image rotation mode setting.

Parameters
[in] | sid | Settings Collection ID.
[out] | lpImgRotate | Pointer to a variable to get the current Image rotation mode setting.
Return values
RECERR
Note
This function gets the setting Kernel.Img.Rotation. This setting can be changed by kRecSetImgRotation.
The specification of this function in C# is:
RECERR kRecGetImgRotation(int sid, out IMG_ROTATE pImgRotate);
kRecGetImgRotation
RECERR RECAPIKRN kRecGetImgRotation(int sid, IMG_ROTATE *lpImgRotate)
Getting rotation mode.
The specification of this function in Java is:
int kRecGetImgRotation(int sid, IMG_ROTATE[] lpImgRotate)
The specification of this function in Python is:
def kRecGetImgRotation(sid: int) -> Tuple[int, int]

◆ kRecGetImgSlope()

RECERR RECAPIKRN kRecGetImgSlope | ( | int | sid,
 |  | int * | lpSlope )

Getting the slope.

The kRecGetImgSlope function returns the current slope value setting set by a previous kRecSetImgSlope function call.

Parameters
[in] | sid | Settings Collection ID.
[out] | lpSlope | Pointer to a variable to get current slope value.
Return values
RECERR
Note
Call kRecDetectImgSkew to detect the skew of an image containing machine printed text.
This function gets the setting Kernel.Img.Deskew.Slope. This setting can be changed by kRecSetImgSlope.
The specification of this function in C# is:
RECERR kRecGetImgSlope(int sid, out int pSlope);
kRecGetImgSlope
RECERR RECAPIKRN kRecGetImgSlope(int sid, int *lpSlope)
Getting the slope.
The specification of this function in Java is:
int kRecGetImgSlope(int sid, int[] lpSlope)
The specification of this function in Python is:
def kRecGetImgSlope(sid: int) -> Tuple[int, int]

◆ kRecGetImgStretchMode()

RECERR RECAPIKRN kRecGetImgStretchMode | ( | int | sid,
 |  | IMG_STRETCHMODE * | pImgStretchMode )

Getting stretching mode.

The kRecGetImgStretchMode function gets the current Image stretching mode setting.

Parameters
[in] | sid | Settings Collection ID.
[out] | pImgStretchMode | Pointer to a variable to get the current Image stretching mode setting.
Return values
RECERR
Note
This function gets the setting Kernel.Img.StretchMode. This setting can be changed by kRecSetImgStretchMode.
The specification of this function in C# is:
RECERR kRecGetImgStretchMode(int sid, out IMG_STRETCHMODE pImgStretchMode);
kRecGetImgStretchMode
RECERR RECAPIKRN kRecGetImgStretchMode(int sid, IMG_STRETCHMODE *pImgStretchMode)
Getting stretching mode.
The specification of this function in Java is:
int kRecGetImgStretchMode(int sid, IMG_STRETCHMODE[] pImgStretchMode)
The specification of this function in Python is:
def kRecGetImgStretchMode(sid: int) -> Tuple[int, int]

◆ kRecGetImgThreshold()

RECERR RECAPIKRN kRecGetImgThreshold | ( | int | sid,
 |  | int * | pThreshold )

Getting binarization threshold.

The kRecGetImgThreshold function inquires the current value of the image conversion threshold setting.

Parameters
[in] | sid | Settings Collection ID.
[out] | pThreshold | Address of the variable that holds the current threshold value.
Return values
RECERR
Note
This function gets the setting Kernel.Img.Binarization.Threshold. This setting can be changed by kRecSetImgThreshold.
The specification of this function in C# is:
RECERR kRecGetImgThreshold(int sid, out int pThreshold);
kRecGetImgThreshold
RECERR RECAPIKRN kRecGetImgThreshold(int sid, int *pThreshold)
Getting binarization threshold.
The specification of this function in Java is:
int kRecGetImgThreshold(int sid, int[] pThreshold)
The specification of this function in Python is:
def kRecGetImgThreshold(sid: int) -> Tuple[int, int]

◆ kRecGetLineCount()

RECERR RECAPIKRN kRecGetLineCount | ( | HPAGE | hPage,
 |  | int * | pnLines )

Getting the number of rule lines.

This function gets the number of rule lines detected previously by kRecLineRemoval, kRecLocateZones or kRecRecognize functions.

Parameters
[in] | hPage | Handle of the page.
[out] | pnLines | Address of an integer variable to get the number of rule lines.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetLineCount(IntPtr hPage, out int pnLines);
kRecGetLineCount
RECERR RECAPIKRN kRecGetLineCount(HPAGE hPage, int *pnLines)
Getting the number of rule lines.
The specification of this function in Java is:
int kRecGetLineCount(HPAGE hPage, int[] pnLines)
The specification of this function in Python is:
def kRecGetLineCount(hPage: "HPAGE") -> Tuple[int, int]

◆ kRecGetLineInfo()

RECERR RECAPIKRN kRecGetLineInfo | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | PRLINE | pLine,
 |  | int | nLine )

Getting rule line information.

This function can be used for getting information about any rule line detected previously by kRecLineRemoval, kRecLocateZones or kRecRecognize functions.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image in the page, whose coordinate system is to be used to report the lines.
[out] | pLine | Pointer to a variable for storing the requested line information.
[in] | nLine | Index of the line in the line list, from which the information is requested.
Return values
RECERR
Note
The index of the first line in the line list is zero (0).
The specification of this function in C# is:
RECERR kRecGetLineInfo(IntPtr hPage, IMAGEINDEX iiImg, out RLINE pLine, int nLine);
kRecGetLineInfo
RECERR RECAPIKRN kRecGetLineInfo(HPAGE hPage, IMAGEINDEX iiImg, PRLINE pLine, int nLine)
Getting rule line information.
RLINE
Structure of a line.
Definition KernelApi.h:8348
The specification of this function in Java is:
int kRecGetLineInfo(HPAGE hPage, IMAGEINDEX iiImg, RLINE pLine, int nLine)
The specification of this function in Python is:
def kRecGetLineInfo(hPage: "HPAGE", iiImg: int, nLine: int) -> Tuple[int, "PRLINE"]

◆ kRecGetPreprocessInfo()

RECERR RECAPIKRN kRecGetPreprocessInfo | ( | HPAGE | hPage,
 |  | PREPROC_INFO * | pPreprocInfo )

Returning information about the preprocessing.

After preprocessing the image, you can ask information about the applied operations.

Parameters
[in] | hPage | Handle of the page.
[out] | pPreprocInfo | Pointer to a variable to get the information.
Return values
RECERR
Note
HPAGE keeps a record about the operations applied by kRecPreprocessImg. This function returns the current state of this record, see PREPROC_INFO.
kRecDespeckleImg, kRecRotateImg, kRecDeskewImg, kRec3DDeskewImg and kRecApplyFormTemplate functions also modify this record.
The specification of this function in C# is:
RECERR kRecGetPreprocessInfo(IntPtr hPage, out PREPROC_INFO pPreprocInfo);
kRecGetPreprocessInfo
RECERR RECAPIKRN kRecGetPreprocessInfo(HPAGE hPage, PREPROC_INFO *pPreprocInfo)
Returning information about the preprocessing.
PREPROC_INFO
Information about preprocessing.
Definition KernelApi.h:6887
The specification of this function in Java is:
int kRecGetPreprocessInfo(HPAGE hPage, PREPROC_INFO pPreprocInfo)
The specification of this function in Python is:
def kRecGetPreprocessInfo(hPage: "HPAGE") -> Tuple[int, "PREPROC_INFO"]

◆ kRecGetPreserveOriginalImg()

RECERR RECAPIKRN kRecGetPreserveOriginalImg | ( | int | sid,
 |  | INTBOOL * | pPreserve )

Getting the value of the keep original image setting.

This function retrieves the setting Kernel.Img.KeepOriginalImage. For more information about this setting see Settings of the Image Handling Module. See kRecSetPreserveOriginalImg.

Parameters
[in] | sid | Settings Collection ID.
[in] | pPreserve | Pointer of a variable to get the value of the setting.
Return values
RECERR
Note
This function gets the setting Kernel.Img.KeepOriginalImage. This setting can be changed by kRecSetPreserveOriginalImg.
The specification of this function in C# is:
RECERR kRecGetPreserveOriginalImg(int sid, out bool pPreserve);
kRecGetPreserveOriginalImg
RECERR RECAPIKRN kRecGetPreserveOriginalImg(int sid, INTBOOL *pPreserve)
Getting the value of the keep original image setting.
The specification of this function in Java is:
int kRecGetPreserveOriginalImg(int sid, int[] pPreserve)
The specification of this function in Python is:
def kRecGetPreserveOriginalImg(sid: int) -> Tuple[int, bool]

◆ kRecGetRetainColor()

RECERR RECAPIKRN kRecGetRetainColor | ( | int | sid,
 |  | RETAINCOLOR * | pRetainColor )

Getting retain color setting.

This function gets the retain color setting.

Parameters
[in] | sid | Settings Collection ID.
[out] | pRetainColor | Pointer of a variable to store the retain color value.
Return values
RECERR
Note
This function gets the setting Kernel.OcrMgr.RetainColor. This setting can be changed by kRecSetRetainColor.
The specification of this function in C# is:
RECERR kRecGetRetainColor(int sid, out RETAINCOLOR pRetainColor);
kRecGetRetainColor
RECERR RECAPIKRN kRecGetRetainColor(int sid, RETAINCOLOR *pRetainColor)
Getting retain color setting.
RETAINCOLOR
RETAINCOLOR
Retain color.
Definition KernelApi.h:12749
The specification of this function in Java is:
int kRecGetRetainColor(int sid, RETAINCOLOR[] pRetainColor)
The specification of this function in Python is:
def kRecGetRetainColor(sid: int) -> Tuple[int, int]

◆ kRecGetThumbnailImgInfo()

RECERR RECAPIKRN kRecGetThumbnailImgInfo | ( | int | sid,
 |  | IMG_INFO * | pThumbnail,
 |  | REC_COLOR * | pColor )

Getting the value of thumbnail image info settings.

This function retrieves the value of settings under the node Kernel.Img.Thumbnail. For more information about this setting see Settings of the Image Handling Module. See kRecSetThumbnailImgInfo.

Parameters
[in] | sid | Settings Collection ID.
[out] | pThumbnail | This is the size and the bits per pixel information of the thumbnail image. Only these fields will be filled.
[out] | pColor | This is the thumbnail color. See II_THUMBNAIL.
Return values
RECERR
Note
This function gets the settings Kernel.Img.Thumbnail.BitsPerPixel, ...Color, ...Size.X and ...Size.Y. These settings can be changed by kRecSetThumbnailImgInfo.
The specification of this function in C# is:
RECERR kRecGetThumbnailImgInfo(int sid, out IMG_INFO pThumbnail, out uint color);
kRecGetThumbnailImgInfo
RECERR RECAPIKRN kRecGetThumbnailImgInfo(int sid, IMG_INFO *pThumbnail, REC_COLOR *pColor)
Getting the value of thumbnail image info settings.
The specification of this function in Java is:
int kRecGetThumbnailImgInfo(int sid, IMG_INFO pThumbnail, long[] pColor)
The specification of this function in Python is:
def kRecGetThumbnailImgInfo(sid: int) -> Tuple[int, "IMG_INFO", int]

◆ kRecImgAutoEnhance()

RECERR RECAPIKRN kRecImgAutoEnhance | ( | HPAGE | hPage,
 |  | BYTE | blackPointred,
 |  | BYTE | whitePointred,
 |  | BYTE | blackPointgreen,
 |  | BYTE | whitePointgreen,
 |  | BYTE | blackPointblue,
 |  | BYTE | whitePointblue )

Image auto-enhancement.

This function performs a gray-level enhancement transformation on the current image (II_CURRENT) of the given page. It works for both color and gray-scale images. It sets all the input gray-levels under the lower (black point) threshold to black and all of them over the higher (white point) threshold to white output level. The remaining interval of the input levels is expanded into the interval of the remaining output levels (between 1 and 254). If the input image is colored, the output image is also colored.

Parameters
[in] | hPage | Handle of the page.
[in] | blackPointred | The lower (black point) threshold of the red component.
[in] | whitePointred | The higher (white point) threshold of the red component.
[in] | blackPointgreen | The lower (black point) threshold of the green component.
[in] | whitePointgreen | The higher (white point) threshold of the green component.
[in] | blackPointblue | The lower (black point) threshold of the blue component.
[in] | whitePointblue | The higher (white point) threshold of the blue component.
Return values
RECERR
Note
Only blackPointred and whitePointred are used on gray-scale images.
The specification of this function in C# is:
RECERR kRecImgAutoEnhance(IntPtr hPage, byte blackPointRed, byte whitePointRed, byte blackPointGreen, byte whitePointGreen, byte blackPointBlue, byte whitePointBlue);
kRecImgAutoEnhance
RECERR RECAPIKRN kRecImgAutoEnhance(HPAGE hPage, BYTE blackPointred, BYTE whitePointred, BYTE blackPointgreen, BYTE whitePointgreen, BYTE blackPointblue, BYTE whitePointblue)
Image auto-enhancement.
The specification of this function in Java is:
int kRecImgAutoEnhance(HPAGE hPage, short blackPointred, short whitePointred, short blackPointgreen, short whitePointgreen, short blackPointblue, short whitePointblue)
The specification of this function in Python is:
def kRecImgAutoEnhance(hPage: "HPAGE", blackPointred: int, whitePointred: int, blackPointgreen: int, whitePointgreen: int, blackPointblue: int, whitePointblue: int) -> int

◆ kRecImgDilatation()

RECERR RECAPIKRN kRecImgDilatation | ( | int | sid,
 |  | HPAGE | hPage,
 |  | ERO_DIL_TYPE | type )

Dilation.

This function performs dilation on binary images. Dilation changes a white pixel to black if at least one of its neighbors is black. Black pixels remain unchanged. This tends to thicken character shapes, thus it can be used for visual enhancement of some images. However, this operation is typically not useful for images to be OCR-ed. The opposite process is erosion.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page to be processed.
[in] | type | This parameter determines which neighbours are tested during the operation.
Return values
RECERR
Note
If the II_CURRENT image is not black-and-white the function returns IMG_BITSPERPIXEL_ERR.
The specification of this function in C# is:
RECERR kRecImgDilatation(int sid, IntPtr hPage, ERO_DIL_TYPE typeint);
ERO_DIL_TYPE
ERO_DIL_TYPE
Type of neighborhood used by kRecImgErosion and kRecImgDilatation.
Definition KernelApi.h:7975
kRecImgDilatation
RECERR RECAPIKRN kRecImgDilatation(int sid, HPAGE hPage, ERO_DIL_TYPE type)
Dilation.
The specification of this function in Java is:
int kRecImgDilatation(int sid, HPAGE hPage, ERO_DIL_TYPE type)
The specification of this function in Python is:
def kRecImgDilatation(sid: int, hPage: "HPAGE", type: int) -> int

◆ kRecImgErosion()

RECERR RECAPIKRN kRecImgErosion | ( | int | sid,
 |  | HPAGE | hPage,
 |  | ERO_DIL_TYPE | type )

Erosion.

This function performs erosion on binary images. Erosion changes a black pixel to white if at least one of its neighbors is white. White pixels remain unchanged. This tends to make character shapes thinner, thus it can be used for visual enhancement of some images. This operation is typically not useful for images to be OCR-ed. The opposite process is dilation.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page to be processed.
[in] | type | This parameter determines which neighbours are tested during the operation.
Return values
RECERR
Note
If the II_CURRENT image is not black-and-white the function returns IMG_BITSPERPIXEL_ERR.
The specification of this function in C# is:
RECERR kRecImgErosion(int sid, IntPtr hPage, ERO_DIL_TYPE typeint);
kRecImgErosion
RECERR RECAPIKRN kRecImgErosion(int sid, HPAGE hPage, ERO_DIL_TYPE type)
Erosion.
The specification of this function in Java is:
int kRecImgErosion(int sid, HPAGE hPage, ERO_DIL_TYPE type)
The specification of this function in Python is:
def kRecImgErosion(sid: int, hPage: "HPAGE", type: int) -> int

◆ kRecInvertImgArea()

RECERR RECAPIKRN kRecInvertImgArea | ( | int | sid,
 |  | HPAGE | hPage,
 |  | LPCRECT | lpRect )

Inverting image area.

The kRecInvertImgArea function performs immediate image inversion of all the images of the page except II_ORIGINAL or a rectangular area inside them. This function ignores the image inversion mode setting. The inverted image (or the image with a rectangle inverted) replaces its origin and is available to the Engine and the application. The function assumes that the coordinates are given in the coordinate system of the current image (II_CURRENT).

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the image to be modified.
[in] | lpRect | Pointer to the rectangular area to be inverted. If it is NULL the entire image is inverted.
Return values
RECERR
Note
For B/W images, the most usual inversion is from white-on-black to black-on-white, because the latter is needed for successful recognition.
For grayscale images, each pixel value is transformed to its complementary value. E.g. for a 4-bit image, a value of 11 is inverted to 4.
For color images, each color component is inverted to its complementary value. For instance:
  • R was 000 becomes 255
  • G was 253 becomes 002
  • B was 120 becomes 135.
The specification of this function in C# is:
RECERR kRecInvertImgArea(int sid, IntPtr hPage, RECT pRect);
// or when pRect is NULL in C/C++
RECERR kRecInvertImgArea(int sid, IntPtr hPage);
kRecInvertImgArea
RECERR RECAPIKRN kRecInvertImgArea(int sid, HPAGE hPage, LPCRECT lpRect)
Inverting image area.
The specification of this function in Java is:
int kRecInvertImgArea(int sid, HPAGE hPage, RECT lpRect)
The specification of this function in Python is:
def kRecInvertImgArea(sid: int, hPage: "HPAGE", lpRect: "RECT") -> int

◆ kRecIsImgPalette()

RECERR RECAPIKRN kRecIsImgPalette | ( | int | sid,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPINTBOOL | pbPal )

Inquiring about palette of the image.

This function retrieves whether the selected image of the given page has a palette or not.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the inquired image.
[in] | iiImg | Index of the inquired image.
[out] | pbPal | Pointer of a variable to store the retrieved value. TRUE when the image has a palette.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecIsImgPalette(int sid, IntPtr hPage, IMAGEINDEX iiImg, out bool pbPal);
kRecIsImgPalette
RECERR RECAPIKRN kRecIsImgPalette(int sid, HPAGE hPage, IMAGEINDEX iiImg, LPINTBOOL pbPal)
Inquiring about palette of the image.
The specification of this function in Java is:
int kRecIsImgPalette(int sid, HPAGE hPage, IMAGEINDEX iiImg, int[] pbPal)
The specification of this function in Python is:
def kRecIsImgPalette(sid: int, hPage: "HPAGE", iiImg: int) -> Tuple[int, bool]

◆ kRecLineRemoval()

RECERR RECAPIKRN kRecLineRemoval | ( | int | sid,
 |  | HPAGE | hPage,
 |  | const RECT * | pRect )

Removing lines.

The kRecLineRemoval function removes horizontal and vertical rule lines from the II_BW image of the page inside the given rectangle. The detected rule lines are stored in the line list of HPAGE, and can be obtained by kRecGetLineCount and kRecGetLineInfo functions.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | pRect | The rectangular area inside which lines are removed from the image. The function assumes that the coordinates are given in the coordinate system of the II_BW image. NULL means the whole image.
Return values
RECERR
Note
Not all line occurrences are handled in the same way. See RLINE for more information.
See also: kRecRemoveLines.
The specification of this function in C# is:
RECERR kRecLineRemoval(int sid, IntPtr hPage, RECT pRect);
// or
RECERR kRecLineRemoval(int sid, IntPtr hPage);
kRecLineRemoval
RECERR RECAPIKRN kRecLineRemoval(int sid, HPAGE hPage, const RECT *pRect)
Removing lines.
The specification of this function in Java is:
int kRecLineRemoval(int sid, HPAGE hPage, RECT pRect)
The specification of this function in Python is:
def kRecLineRemoval(sid: int, hPage: "HPAGE", pRect: "RECT") -> int

◆ kRecMergeImgArea()

RECERR RECAPIKRN kRecMergeImgArea | ( | int | sid,
 |  | HPAGE | hPageDst,
 |  | LPCRECT | pRectDst,
 |  | HPAGE | hPageSrc,
 |  | LPCRECT | pRectSrc,
 |  | REC_COLOR | tColor )

Merging areas of images.

This function merges a rectangular area of the II_CURRENT image of the given source page and a rectangular area of the II_CURRENT image of the given destination page. One color can be designated as being transparent (see also notes). Where the color of the source pixel corresponds to the transparent color the destination pixel is not changed. The function compresses or stretches the area if necessary to fit the dimensions of the destination size.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPageDst | Handle of the page which contains the destination image.
[in] | pRectDst | Coordinates of the destination rectangular area. NULL means the whole image.
[in] | hPageSrc | Handle of the page which contains the source image.
[in] | pRectSrc | Coordinates of the source rectangular area. NULL means the whole image.
[in] | tColor | The color designated as being transparent.
Return values
RECERR
Note
If the destination size is smaller or greater than the original source area, the function compresses or stretches the area into the destination.
This function accepts 32 bit image (BGRA format) as source image and REC_TRANSPARENT_COLOR as tColor. In this case the function uses the alpha channel of the source image.
The specification of this function in C# is:
RECERR kRecMergeImgArea(int sid, IntPtr hPageDst, RECT rectDst, IntPtr hPageSrc, RECT rectSrc, uint color);
// or when pRectDst is NULL in C/C++
RECERR kRecMergeImgArea(int sid, IntPtr hPageDst, IntPtr hPageSrc, RECT rectSrc, uint color);
// or when pRectSrc is NULL in C/C++
RECERR kRecMergeImgArea(int sid, IntPtr hPageDst, RECT rectDst, IntPtr hPageSrc, uint color);
// or when pRectDst and pRectSrc are NULL in C/C++
RECERR kRecMergeImgArea(int sid, IntPtr hPageDst, IntPtr hPageSrc, uint color);
kRecMergeImgArea
RECERR RECAPIKRN kRecMergeImgArea(int sid, HPAGE hPageDst, LPCRECT pRectDst, HPAGE hPageSrc, LPCRECT pRectSrc, REC_COLOR tColor)
Merging areas of images.
The specification of this function in Java is:
int kRecMergeImgArea(int sid, HPAGE hPageDst, RECT pRectDst, HPAGE hPageSrc, RECT pRectSrc, long tColor)
The specification of this function in Python is:
def kRecMergeImgArea(sid: int, hPageDst: "HPAGE", pRectDst: "RECT", hPageSrc: "HPAGE", pRectSrc: "RECT", tColor: int) -> int

◆ kRecPreprocessImg()

RECERR RECAPIKRN kRecPreprocessImg | ( | int | sid,
 |  | HPAGE | hPage )

Image preprocessing.

The function kRecPreprocessImg performs a series of image pre-processing steps by activating the PID_IMGPREPROCESS process. Performing these image pre-processing steps may improve the quality of the image from an OCR point of view, which may have an impact on the overall page recognition accuracy. If pre-processing is desired, it should be done before performing auto-zoning and recognition. The available pre-processing steps are despeckle, fax correction, image inversion, deskewing, and rotation. (Using the Visual Toolbox, further preprocessing can be done by SET tools. For more information, see the Visual Toolbox help system.)

The preprocessing performs fax correction, rotation and deskew operations on II_CURRENT image, creates the image II_BW (implicit secondary image conversion) and does the image inversion and the despeckle operations on the latter image. (Despeckle runs only when the current image is a B/W one.) After these steps, it deletes the II_ORIGINAL image except when kRecSetPreserveOriginalImg has been called with TRUE parameter. The executing mode of these steps depends on the settings that can be changed by kRecSetImgInvert, kRecSetImgDeskew, kRecSetImgRotation, kRecSetImgDownsample, kRecSetFaxCorrection, kRecSetImgBinarizationMode, kRecSetImgDespeckleMode, kRecSetImgBinarizationMode, kRecSetImgBrightness, kRecSetImgThreshold, kRecSetImgResolEnhancement, kRecSetRMTradeoff, kRecSetLanguages and kRecSetDefaultFillingMethod. The value needed for programmed deskewing (DSK_SET) can be detected by kRecDetectImgSkew and defined in kRecSetImgSlope. Under certain circumstances, image despeckling and resolution enhancement are also performed internally. These depend on the settings that can be changed by kRecSetImgDespeckleMode, kRecSetImgResolEnhancement.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
Return values
RECERR
Note
If the original image is grayscale or color, an implicit secondary image conversion step is performed to generate a hidden, clean B/W image on which the pre-processing tasks will operate. The parameters for this conversion can be specified through the functions kRecSetImgBinarizationMode and kRecSetImgResolEnhancement.
If the original image is B/W over 180 dpi and the Engine's Image despeckle mode setting is enabled, an implicit secondary image conversion step is also performed, to specifically despeckle the image. This is enabled through the function kRecSetImgDespeckleMode. By default despeckle detects if the image has been scanned in halftone mode and applies halftone removal if so. The halftone detection and removal can be switched off by Kernel.Img.Despeckle.Halftone setting.
As an alternative to this function, image modifications can be performed separately and immediately on a single defined image, by the functions kRecInvertImgArea, kRecDeskewImg, kRecRotateImg, kRecDespeckleImg. The first three functions can be used with any image type (B/W, grayscale or color). All these functions ignore the image mode settings, e.g. kRecDeskewImg will deskew a given image, even if kRecSetImgDeskew is set to DSK_NO. The modified images created by these functions are available to the application.
This function may change the resolution of the image:
  • if the resolution of the image is less than 50 DPI or greater than 19200 DPI,
  • if the resolution of the image is 72 DPI or 96 DPI,
  • if the image is captured by digital camera and it does not contain resolution (see: IMG_FLAGS),
  • if the ALLSTS_KERNEL_IMG_SCREENCAPTURE Kernel.Img.ScreenCapture setting is SCR_AUTO or SCR_YES (see: IMG_SCREENCAPTURE). In these cases kRecPreprocessImg estimates the resolution: determines the average character size and supposes that the text contains 12 point fonts. The estimated resolution is rounded to 100, 150, 200, 300, 450 or 600. The resolution of the image will be restored to the original value at the end of kRecRecognize if the Kernel.Img.Resolution.Restore setting is TRUE.
The coordinates of all user zones are recalculated. The OCR zones are removed.
If applicable, please set the required recognition language(s) before calling the kRecPreprocessImg function. This increases the efficiency of automatic image rotation.
Trade-off (RMTRADEOFF) specific notes:
  • If resolution enhancement is set to RE_AUTO the enhancement depends on the current trade-off setting according to the following: if trade-off is TO_FAST the resolution enhancement is RE_LEGACY, otherwise it is RE_STANDARD.
  • If trade-off is TO_FAST, pre-process uses a faster, but less accurate deskew, binarization and despeckle algorithm than otherwise.
  • The trade-off used by preprocessing can be set by setting the general trade-off (kRecSetRMTradeoff) or by setting the specific Settings of the Recognition Module Kernel.OcrMgr.TradeOff.Preproc setting.
This function uses the default filling method (kRecSetDefaultFillingMethod).
At processing dot matrix text, this function may give better result if the default filling method is set to FM_DRAFTDOT9.
Preprocessing digital camera images: HPAGE contains a flag (IMG_FLAGS_CAMERAIMAGE, see: IMG_FLAGS) which indicates whether the image is captured by digital camera (phone) or not. This flag is set when loading the image. If this flag is set deskew, binarization and resolution enhancement is done differently:
  • binarization: pre-process makes shading correction before binarization,
  • deskew: if the current deskewing mode is DSK_AUTO3D the function performs 3D deskew,
  • resolution enhancement: if the average height of the characters is large, the ratio of resolution enhancement will be 0.5.
After calling this function you can get information about the applied operations by the kRecGetPreprocessInfo function.
The specification of this function in C# is:
RECERR kRecPreprocessImg(int sid, IntPtr hPage);
kRecPreprocessImg
RECERR RECAPIKRN kRecPreprocessImg(int sid, HPAGE hPage)
Image preprocessing.
The specification of this function in Java is:
int kRecPreprocessImg(int sid, HPAGE hPage)
The specification of this function in Python is:
def kRecPreprocessImg(sid: int, hPage: "HPAGE") -> int

◆ kRecPutImgArea()

RECERR RECAPIKRN kRecPutImgArea | ( | int | sid,
 |  | LPCIMG_INFO | lpImg,
 |  | const BYTE * | lpBitmap,
 |  | HPAGE | hPage,
 |  | int | xDst,
 |  | int | yDst,
 |  | LPCSIZE | pDstSize )

Updating image area.

The kRecPutImgArea function is used for updating a rectangular area of the current image of the page with a bitmap from the application. During downloading, the function compresses or stretches the original bitmap, if requested. The function assumes that the coordinates are given in the coordinate system of the current image (II_CURRENT).

Parameters
[in] | sid | Settings Collection ID.
[in] | lpImg | Pointer to an IMG_INFO structure which describes the source bitmap you want to download into the Engine.
[in] | lpBitmap | Pointer to the source bitmap.
[in] | hPage | Handle of the page of the destination image to be modified.
[in] | xDst | X position of the destination area in pixels (upper left corner).
[in] | yDst | Y position of the destination area in pixels (upper left corner).
[in] | pDstSize | Size of the destination area. If this is not the same as the source area, the function compresses or stretches the area into the destination. NULL means that the size of the destination area will be the same as the size of the original bitmap.
Return values
RECERR
Note
If there is II_BW image in the page before using this function a secondary image conversion runs again after updating the current image.
If there is II_THUMBNAIL image in the page before using this function it is recreated after updating the current image.
A typical use of this function is in conjunction with the kRecGetImgArea function. Since an image is not directly accessible to the application, the kRecGetImgArea can be used to get a copy of the image in the application's authority. After having modified this copied image, the application can call the kRecPutImgArea function to pass back the modified image to the engine.
This function can also be used for passing the application's image to the engine. In this case before downloading the image, a new and empty image should be created with the kRecCreateImg function. The attributes of this empty image (size, resolution, Bits per pixel value) should be the same as for the application's bitmap. The xDst and yDst parameters must be set to zero (0) and the pDstSize should be NULL.
The kRecLoadImgM function or the kRecPutImgArea function should be used when it is easy to place an entire image into the engine's memory. However, you may instead prefer the kRecStartWriteImg, kRecWriteImg and kRecStopWriteImg set of functions, which transfer an image in successive lines.
This function takes into account the Engine settings Line order (IMG_LINEORDER) and - for color images - the RGBorder (IMG_RGBORDER), but ignores the Padding mode setting. These settings should be consistent with the appropriate attributes of the source bitmap. A preceding call to the kRecSetImgFormat API function can be used to change these settings.
The function always operates with the image stretching mode STRETCH_DELETE.
The specification of this function in C# is:
RECERR kRecPutImgArea(int sid, IMG_INFO pImg, byte[] pBitmap, IntPtr hPage, int xDst, int yDst, SIZE pDstSize);
// or when pDstSize is NULL in C/C++
RECERR kRecPutImgArea(int sid, IMG_INFO pImg, byte[] pBitmap, IntPtr hPage, int xDst, int yDst);
// or
RECERR kRecPutImgArea(int sid, Bitmap pBitmap, IntPtr hPage, int xDst, int yDst, SIZE pDstSize);
// or when pDstSize is NULL in C/C++
RECERR kRecPutImgArea(int sid, Bitmap pBitmap, IntPtr hPage, int xDst, int yDst);
kRecPutImgArea
RECERR RECAPIKRN kRecPutImgArea(int sid, LPCIMG_INFO lpImg, const BYTE *lpBitmap, HPAGE hPage, int xDst, int yDst, LPCSIZE pDstSize)
Updating image area.
The specification of this function in Java is:
int kRecPutImgArea(int sid, IMG_INFO lpImg, java.nio.ByteBuffer lpBitmap, HPAGE hPage, int xDst, int yDst, SIZE pDstSize)

◆ kRecReadImg()

RECERR RECAPIKRN kRecReadImg | ( | int | sid,
 |  | LPBYTE | pBuff )

Reading an image line-by-line.

The kRecReadImg function exports one line from the specified image.

Parameters
[in] | sid | Settings Collection ID.
[out] | pBuff | Pointer of a buffer to store the next line.
Return values
RECERR
Note
This function is the second part in the three-part series for line-by-line reading an image. Before calling this function, the application should call the kRecStartReadImg function. Repeated calls of this function get a sequence of the lines of the image and generate a return code REC_OK each time. As soon as the function finds no further line to get, it returns with IMG_NOMORE_WARN, signaling the need for calling the kRecStopReadImg function.
This function is insecure for managed code. In C# use the more advanced kRecGetImgArea function.

◆ kRecRemoveBorders()

RECERR RECAPIKRN kRecRemoveBorders | ( | int | sid,
 |  | HPAGE | hPage,
 |  | UINT | maxWidth )

Removing marginal shadows.

This function cleans marginal shadows that may result from scanning. The borders are filled in with the color white.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page to be processed.
[in] | maxWidth | Maximum width of the borders (in pixels).
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecRemoveBorders(int sid, IntPtr hPage, uint maxWidth);
kRecRemoveBorders
RECERR RECAPIKRN kRecRemoveBorders(int sid, HPAGE hPage, UINT maxWidth)
Removing marginal shadows.
The specification of this function in Java is:
int kRecRemoveBorders(int sid, HPAGE hPage, long maxWidth)
The specification of this function in Python is:
def kRecRemoveBorders(sid: int, hPage: "HPAGE", maxWidth: int) -> int

◆ kRecRemoveLines()

RECERR RECAPIKRN kRecRemoveLines | ( | int | sid,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | const RECT * | pRect )

Removing lines.

The kRecRemoveLines function removes horizontal and vertical rule lines from the II_CURRENT or II_BW image of the page inside the given rectangle. The detected rule lines are stored in the line list of HPAGE, and can be obtained by kRecGetLineCount and kRecGetLineInfo functions.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image in the page to be processed. If the specified image is not black-and-white the function returns IMG_BITSPERPIXEL_ERR.
[in] | pRect | The rectangular area inside which lines are removed from the image. The function assumes that the coordinates are given in the coordinate system of the iiImg image. NULL means the whole image.
Return values
RECERR
Note
Not all line occurrences are handled in the same way. See RLINE for more information.
See also: kRecLineRemoval.
The specification of this function in C# is:
RECERR kRecRemoveLines(int sid, IntPtr hPage, IMAGEINDEX iiImg, RECT pRect);
// or
RECERR kRecRemoveLines(int sid, IntPtr hPage);
kRecRemoveLines
RECERR RECAPIKRN kRecRemoveLines(int sid, HPAGE hPage, IMAGEINDEX iiImg, const RECT *pRect)
Removing lines.
The specification of this function in Java is:
int kRecRemoveLines(int sid, HPAGE hPage, IMAGEINDEX iiImg, RECT pRect)
The specification of this function in Python is:
def kRecRemoveLines(sid: int, hPage: "HPAGE", iiImg: int, pRect: "RECT") -> int

◆ kRecRemovePunchHoles()

RECERR RECAPIKRN kRecRemovePunchHoles | ( | int | sid,
 |  | HPAGE | hPage,
 |  | LPCRECT | ROIs,
 |  | int | nROIs,
 |  | LPRECT * | Holes,
 |  | int * | nHoles,
 |  | UINT | flags,
 |  | UINT | minDiameter,
 |  | UINT | maxDiameter )

Removing punch holes.

Detecting punch hole image defects and transforming them to the background color.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page to be processed.
[in] | ROIs | Array of rectangles inside which the punch holes should be detected. If it is NULL then the whole image is processed.
[in] | nROIs | The number of rectangles in the ROIs array.
[in,out] | Holes | Pointer to a variable for storing the bounding boxes of the holes. It can be NULL. For details see the description of parameter flags below. If PHOLE_DETECT flag is set and Holes parameter is not NULL this array is allocated by the function and can be freed calling the function kRecFree.
[in,out] | nHoles | Pointer to a variable for storing the number of the holes. It can be NULL if Holes is NULL.
[in] flags The following flags can be set:
  • PHOLE_DETECT : If this flag is set, the function automatically detects the punch holes. The bounding boxes of the detected punch holes are returned in the Holes array if the Holes parameter is not NULL.
  • PHOLE_REMOVE : If this flag is set the function removes the punch holes from the image. If only this flag is set, the parameters Holes and nHoles must contain the bounding boxes and the number of holes (i.e. they are input parameters).
  • PHOLE_DETECT and PHOLE_REMOVE flags can be combined.
[in] | minDiameter | Reserved for future versions. Must be 0.
[in] | maxDiameter | Reserved for future versions. Must be 0.
Return values
RECERR
Note
The function searches for sizes declared in punch hole standards.
The specification variations of this function in C# are:
// Only removing
RECERR kRecRemovePunchHoles(int sid, IntPtr hPage, RECT[] Holes);
// Only detecting
RECERR kRecDetectPunchHoles(int sid, IntPtr hPage, RECT[] ROIs, out RECT[] Holes, uint minDiameter, uint maxDiameter);
RECERR kRecDetectPunchHoles(int sid, IntPtr hPage, out RECT[] Holes, uint minDiameter, uint maxDiameter);
// Detecting and removing
RECERR kRecDetectAndRemovePunchHoles(int sid, IntPtr hPage, RECT[] ROIs, out RECT[] Holes, uint minDiameter, uint maxDiameter);
RECERR kRecDetectAndRemovePunchHoles(int sid, IntPtr hPage, out RECT[] Holes, uint minDiameter, uint maxDiameter);
kRecRemovePunchHoles
RECERR RECAPIKRN kRecRemovePunchHoles(int sid, HPAGE hPage, LPCRECT ROIs, int nROIs, LPRECT *Holes, int *nHoles, UINT flags, UINT minDiameter, UINT maxDiameter)
Removing punch holes.
The specification of this function in Java is:
int kRecRemovePunchHoles(int sid, HPAGE hPage, RECT[] ROIs, RECT[] Holes, long minDiameter, long maxDiameter)
The specification of this function in Python is:
def kRecRemovePunchHoles(sid: int, hPage: "HPAGE", ROIs: "RectArray", Holes: Optional["RectArray"], minDiameter: int, maxDiameter: int) -> int

◆ kRecResetBookSize()

RECERR RECAPIKRN kRecResetBookSize ( int sid )

Resetting the stored book page size.

This function resets the book page size stored by kRecDetectBook. This function should be called every time you want to process more than one book and the page size of the next book differs from that of the previous one.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
This function is typically followed by a kRecDetectBook call.
This function resets the settings Kernel.Img.BookSize.X and Kernel.Img.BookSize.Y.
The specification of this function in C# is:
RECERR kRecResetBookSize(int sid);
kRecResetBookSize
RECERR RECAPIKRN kRecResetBookSize(int sid)
Resetting the stored book page size.
The specification of this function in Java is:
int kRecResetBookSize(int sid)
The specification of this function in Python is:
def kRecResetBookSize(sid: int) -> int

◆ kRecRotateImg()

RECERR RECAPIKRN kRecRotateImg | ( | int | sid,
 |  | HPAGE | hPage,
 |  | IMG_ROTATE | Rotation )

Rotating the page.

The kRecRotateImg function rotates and/or mirrors the page according to the given parameter. It can be perform rotation by 90 degrees or its multiples.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the image to be rotated.
[in] | Rotation | Image transformation to be performed. Possible values can be any value of IMG_ROTATE except ROT_AUTO.
Return values
RECERR
Note
The coordinates of all user zones will be recalculated. The OCR zones will be removed.
The specification of this function in C# is:
RECERR kRecRotateImg(int sid, IntPtr hPage, IMG_ROTATE Rotation);
kRecRotateImg
RECERR RECAPIKRN kRecRotateImg(int sid, HPAGE hPage, IMG_ROTATE Rotation)
Rotating the page.
The specification of this function in Java is:
int kRecRotateImg(int sid, HPAGE hPage, IMG_ROTATE Rotation)
The specification of this function in Python is:
def kRecRotateImg(sid: int, hPage: "HPAGE", Rotation: int) -> int

◆ kRecRotateImgArea()

RECERR RECAPIKRN kRecRotateImgArea | ( | int | sid,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPCRECT | pSrcRect,
 |  | IMG_ROTATE | Rotation,
 |  | LPIMG_INFO | lpImg,
 |  | BYTE ** | lplpBitmap )

Copying image area with rotation.

The kRecRotateImgArea function copies and rotates a rectangular area of the current image (II_CURRENT) of a page into a buffer available to the application. The function assumes that the coordinates are given in the coordinate system of the current image (II_CURRENT).

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page which contains the source image.
[in] | iiImg | Index to the image in the page.
[in] | pSrcRect | Dimensions of the source area. NULL means: the whole image will be copied.
[in] | Rotation | Image rotation mode to be applied as the area is copied. All the values of the IMG_ROTATE can be used except ROT_AUTO.
[out] | lpImg | Address of a structure to get information about the output image area.
[out] | lplpBitmap | Address of a pointer to the rotated bitmap.
Return values
RECERR
Note
If the resulting bitmap is no longer needed the application should call the kRecFree function in order to free its memory.
This function takes into account the Line order (IMG_LINEORDER), the Padding mode (IMG_PADDING) and - with color images - the RGBorder (IMG_RGBORDER) settings of the Engine. These settings should be consistent with the appropriate attributes of the destination bitmap to be created. A preceding call to the kRecSetImgFormat is necessary to change these settings.
The coordinates of the leftmost pixel of the uppermost line of the image is (0,0).
Calling this function with ROT_NO parameter is equivalent to calling the kRecGetImgArea function.
If the source image is B/W, the representation of black pixels in the created bitmap will be one (1), and white is zero (0), i.e. for displaying the image use the NOTSRCCOPY raster operation code.
The specification of this function in C# is:
RECERR kRecRotateImgArea(int sid, IntPtr hPage, IMAGEINDEX iiImg, RECT pSrcRect, IMG_ROTATE Rotation, out IMG_INFO pImg, out byte[] ppBitmap);
// or when pSrcRect is NULL in C/C++
RECERR kRecRotateImgArea(int sid, IntPtr hPage, IMAGEINDEX iiImg, IMG_ROTATE Rotation, out IMG_INFO pImg, out byte[] ppBitmap);
// or
RECERR kRecRotateImgArea(int sid, IntPtr hPage, IMAGEINDEX iiImg, RECT pSrcRect, IMG_ROTATE Rotation, out IMG_INFO pImg, out Bitmap bmp);
// or when pSrcRect is NULL in C/C++
RECERR kRecRotateImgArea(int sid, IntPtr hPage, IMAGEINDEX iiImg, IMG_ROTATE Rotation, out IMG_INFO pImg, out Bitmap bmp);
kRecRotateImgArea
RECERR RECAPIKRN kRecRotateImgArea(int sid, HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pSrcRect, IMG_ROTATE Rotation, LPIMG_INFO lpImg, BYTE **lplpBitmap)
Copying image area with rotation.
The specification of this function in Java is:
int kRecRotateImgArea(int sid, HPAGE hPage, IMAGEINDEX iiImg, RECT pSrcRect, IMG_ROTATE Rotation, IMG_INFO lpImg, OutputByteBuffer outputByteBuffer)

◆ kRecSetDropoutColorWeights()

RECERR RECAPIKRN kRecSetDropoutColorWeights | ( | int | sid,
 |  | int | wred,
 |  | int | wgreen,
 |  | int | wblue )

Changing the dropout color weight settings for binarization.

The kRecSetDropoutColorWeights function sets the weights used to calculate the gray-level intensity values from the color components during binarization. In default mode these weights are (77, 150, 29). By setting the weights before preprocessing and/or binarization, objects of a particular color (the drop-out color) can be dropped from the binary image, therefore filled forms can be binarized so that the BW image does not contain the preprinted text. E.g. using (1, 0, 0) as weights, the red preprinted text can be dropped from the white background. In practice the best weights can be calculated by the function kRecDetectDropoutColorWeights. To process drop-out color images the CNV_GLOBAL binarization method is suggested (see kRecSetImgBinarizationMode).

Parameters
[in] | sid | Settings Collection ID.
[in] | wred | Weight of the red component.
[in] | wgreen | Weight of the green component.
[in] | wblue | Weight of the blue component.
Return values
RECERR
Note
The B/W image is created if it does not exist, except with kRecPreprocessImg, which creates it in any case. These settings affect only the primary image conversion (i.e. conversion during loading, see kRecSetImgConvMode) and kRecPreprocessImg. Otherwise, the weights stored in the HPAGE are used for binarization. At loading, these settings are stored in the HPAGE and they can be changed by kRecDetectDropoutColorWeights.
When processing empty forms using a drop-out color, it is recommended to apply auto-deskewing (if desired) when the original image enters into the Engine's responsibility, or at least before the OCR image is created. Typically with forms, auto-deskew relies on finding printed lines or text lines that are usually form labels. Precisely these elements are removed by applying a drop-out color, so calling auto-deskew when the OCR image is already created is liable to fail. A possible workaround may be the following:
  1. Set drop-out color weights to default (77,150,29).
  2. Detect skew (kRecDetectImgSkew)
  3. Set drop-out color weights
  4. Set slope and rotation (kRecSetImgDeskew, kRecSetImgSlope, kRecSetImgRotation)
  5. Pre-process the image
This function sets the settings Kernel.Img.DropoutColor.Blue and ...Green and ...Red. These settings can be retrieved by kRecGetDropoutColorWeights.
The specification of this function in C# is:
RECERR kRecSetDropoutColorWeights(int sid, int wred, int wgreen, int wblue);
kRecSetDropoutColorWeights
RECERR RECAPIKRN kRecSetDropoutColorWeights(int sid, int wred, int wgreen, int wblue)
Changing the dropout color weight settings for binarization.
The specification of this function in Java is:
int kRecSetDropoutColorWeights(int sid, int wred, int wgreen, int wblue)
The specification of this function in Python is:
def kRecSetDropoutColorWeights(sid: int, wred: int, wgreen: int, wblue: int) -> int

◆ kRecSetFaxCorrection()

RECERR RECAPIKRN kRecSetFaxCorrection | ( | int | sid,
 |  | INTBOOL | corr )

Changing the fax correction setting.

This function changes the setting Kernel.Img.FaxCorrectionEnabled, which determines whether the fax correction operation is enabled during preprocessing (PID_IMGPREPROCESS) or not.

Parameters
[in] | sid | Settings Collection ID.
[in] | corr | If this is TRUE, the fax correction is enabled.
Return values
RECERR
Note
If fax correction is enabled (this is the default), the resolution of B/W images with an approximate resolution of 200 x 100 dpi is doubled in the y direction (vertically). The result of this process appears on II_CURRENT (thus also on II_BW and II_OCR) images. This is in contrast to the resolution enhancement performed during 3D deskew, which is applied to both the x and y directions.
This function sets the setting Kernel.Img.FaxCorrectionEnabled. This setting can be retrieved by kRecGetFaxCorrection.
The specification of this function in C# is:
RECERR kRecSetFaxCorrection(int sid, bool corr);
kRecSetFaxCorrection
RECERR RECAPIKRN kRecSetFaxCorrection(int sid, INTBOOL corr)
Changing the fax correction setting.
The specification of this function in Java is:
int kRecSetFaxCorrection(int sid, int corr)
The specification of this function in Python is:
def kRecSetFaxCorrection(sid: int, corr: bool) -> int

◆ kRecSetImgBinarizationMode()

RECERR RECAPIKRN kRecSetImgBinarizationMode | ( | int | sid,
 |  | IMG_CONVERSION | BWConversion )

Setting secondary image conversion mode.

The kRecSetImgBinarizationMode function specifies which Image conversion mode is used during an implicit secondary image conversion step. This step is performed automatically when the application calls a KernelAPI API function whose operation requires the II_BW image, but it does not exist. This setting influences how a non-B/W image stored in the Engine is converted to a B/W one.

Parameters
[in] | sid | Settings Collection ID.
[in] | BWConversion | Secondary image conversion mode to be set. Valid values are: CNV_AUTO, CNV_SET and CNV_GLOBAL. If another one has been specified, the function returns with API_PARAMETER_ERR.
Return values
RECERR
Note
Note that both the kRecSetImgConvMode and the kRecSetImgBinarizationMode functions specify Image conversion modes.
The kRecSetImgConvMode specifies the mode to be applied during the PID_IMGINPUT process (primary image conversion). The result of this process is an image under the authority of the Engine. Depending on the original image source AND the Primary image conversion mode setting (specified with kRecSetImgConvMode), the created image is a B/W, gray-scale or 24-bit color one.
On the other hand, a secondary image conversion with BWConversion mode might be performed on existing images. In this case a second, B/W image is created and stored in the page on index II_BW. This step is called either directly (from within the kRecConvertImg2BW function) or implicitly, as described above. E.g. when the kRecRecognize function has been called for a non-B/W image, an implicit secondary image conversion is performed automatically. The kRecRecognize function may implicitly include the conversion of the image, if necessary. A previous kRecSetImgBinarizationMode call allows you to specify how this implicit conversion is performed.
If this function is not called, the default value of CNV_AUTO is applied.
This function toggles the setting Kernel.Img.Binarization.SecondaryMode. This setting can be retrieved by kRecGetImgBinarizationMode.
B/W images also undergo their own implicit secondary image conversion during pre-process or the first time when the II_BW image is required. This conversion applies a despeckle operation, so this setting is not applied to them.
The specification of this function in C# is:
RECERR kRecSetImgBinarizationMode(int sid, IMG_CONVERSION BWConversion);
kRecSetImgBinarizationMode
RECERR RECAPIKRN kRecSetImgBinarizationMode(int sid, IMG_CONVERSION BWConversion)
Setting secondary image conversion mode.
The specification of this function in Java is:
int kRecSetImgBinarizationMode(int sid, IMG_CONVERSION BWConversion)
The specification of this function in Python is:
def kRecSetImgBinarizationMode(sid: int, BWConversion: int) -> int

◆ kRecSetImgBrightness()

RECERR RECAPIKRN kRecSetImgBrightness | ( | int | sid,
 |  | int | Brightness )

Setting brightness.

The kRecSetImgBrightness function fine-tunes the threshold calculation in the automatic adaptive image conversion mode (i.e. when CNV_AUTO has been specified). This influences the brightness/darkness of the resulting B/W image during both the primary and the secondary image conversion.

Parameters
[in] | sid | Settings Collection ID.
[in] | Brightness | Brightness control of the automatic image conversion algorithm. The value range is between zero (0) and 100. A value of 0 tunes the conversion to give a lighter image, while a value of 100 results in a darker image. The default value is 50.
Return values
RECERR
Note
This function influences both the primary and the secondary image conversions. It has no effect if other than CNV_AUTO image conversion mode has been specified.
This function sets the setting Kernel.Img.Binarization.Brightness. This setting can be retrieved by kRecGetImgBrightness.
The specification of this function in C# is:
RECERR kRecSetImgBrightness(int sid, int Brightness);
kRecSetImgBrightness
RECERR RECAPIKRN kRecSetImgBrightness(int sid, int Brightness)
Setting brightness.
The specification of this function in Java is:
int kRecSetImgBrightness(int sid, int Brightness)
The specification of this function in Python is:
def kRecSetImgBrightness(sid: int, Brightness: int) -> int

◆ kRecSetImgConvMode()

RECERR RECAPIKRN kRecSetImgConvMode | ( | int | sid,
 |  | IMG_CONVERSION | Conversion )

Setting the primary image conversion mode.

The kRecSetImgConvMode function specifies which Image conversion mode is used during the primary image conversion step. While loading an image to the Engine's authority (PID_IMGINPUT process), an image conversion is also performed according to the current image conversion mode setting. The setting specified here influences what kind of image will be created in the Engine's memory.

Parameters
[in] | sid | Settings Collection ID.
[in] | Conversion | Primary image conversion mode to be set. Possible values are: CNV_AUTO, CNV_SET, CNV_NO, CNV_GLOBAL and CNV_GRAY.
Return values
RECERR
Note
The following situations can occur here, depending on the setting specified:
  • B/W, Gray-scale or 24-bit color image created without any conversion,
  • B/W image created, converted from gray-scale image source,
  • B/W image created, converted from 24-bit color image source or
  • Gray-scale image created, converted from 24-bit color image source. See IMG_CONVERSION.
If this function is not called, the default value of this setting is CNV_NO.
This function toggles the setting Kernel.Img.Binarization.PrimaryMode. This setting can be retrieved by kRecGetImgConvMode.
The specification of this function in C# is:
RECERR kRecSetImgConvMode(int sid, IMG_CONVERSION Conversion);
kRecSetImgConvMode
RECERR RECAPIKRN kRecSetImgConvMode(int sid, IMG_CONVERSION Conversion)
Setting the primary image conversion mode.
The specification of this function in Java is:
int kRecSetImgConvMode(int sid, IMG_CONVERSION Conversion)
The specification of this function in Python is:
def kRecSetImgConvMode(sid: int, Conversion: int) -> int

◆ kRecSetImgDeskew()

RECERR RECAPIKRN kRecSetImgDeskew | ( | int | sid,
 |  | IMG_DESKEW | _ImgDeskew )

Setting deskew mode.

The kRecSetImgDeskew function specifies which Image deskewing mode is used during a forthcoming PID_IMGPREPROCESS process. Deskewing mode can be automatic, switched off or programmable.

Parameters
[in] | sid | Settings Collection ID.
[in] | _ImgDeskew | Select deskewing mode.
Return values
RECERR
Note
See also Notes on Deskew and Orientation.
This function toggles the setting Kernel.Img.Deskew.Mode. This setting can be retrieved by kRecGetImgDeskew.
The specification of this function in C# is:
RECERR kRecSetImgDeskew(int sid, IMG_DESKEW ImgDeskew);
kRecSetImgDeskew
RECERR RECAPIKRN kRecSetImgDeskew(int sid, IMG_DESKEW _ImgDeskew)
Setting deskew mode.
The specification of this function in Java is:
int kRecSetImgDeskew(int sid, IMG_DESKEW _ImgDeskew)
The specification of this function in Python is:
def kRecSetImgDeskew(sid: int, _ImgDeskew: int) -> int

◆ kRecSetImgDespeckleMode()

RECERR RECAPIKRN kRecSetImgDespeckleMode | ( | int | sid,
 |  | INTBOOL | bMode )

Setting despeckle mode.

The kRecSetImgDespeckleMode function specifies the Engine's Image despeckle mode setting, i.e. whether the adaptive noise removal algorithm is to be activated during implicit primary and secondary image conversion when the current image (II_CURRENT) is a B/W one. The noise removal algorithm runs only on B/W images with a resolution of 180 dpi or higher. This setting might influence the recognition accuracy.

Parameters
[in] | sid | Settings Collection ID.
[in] | bMode | Image despeckle mode to be set.
Return values
RECERR
Note
When this setting is enabled, B/W images with a resolution above 180 dpi automatically undergo an implicit secondary image conversion whenever the application calls a KernelAPI API function whose operation requires a B/W or despeckled image, e.g. the kRecLocateZones, the kRecPreprocessImg or the kRecRecognize functions.
Grayscale or color images undergo their own implicit secondary image conversion during pre-process or the first time when the II_BW image is required. When this setting is enabled, this conversion performs an adaptive image smoothing algorithm before the binarization.
If this function is not called to specify the Image despeckle mode setting, by default this setting is enabled.
Immediate despeckling of a B/W image in the Engine's memory space (regardless of its resolution) is available by calling kRecDespeckleImg. The despeckled image replaces the original one and is available to the application. Note that kRecDespeckleImg applies despeckle on the II_CURRENT image while kRecPreprocessImg and implicit secondary image conversion applies despeckle on the II_BW image.
This function sets the setting Kernel.Img.DespeckleMode. This setting can be retrieved by kRecGetImgDespeckleMode.
Scanners often have the possibility of specifying whether the type of the document is 'text', 'photo' or 'text/photo' (mixed). When text/photo or photo is selected (and black-and-white scanning is chosen) the scanners apply a halftone (dithering, error diffusion) algorithm to simulate gray levels. In this case the scanned image contains a lot of noise and a special despeckle algorithm is required to pre-process it before OCR. By default despeckle detects whether the image has been scanned in halftone mode and applies halftone removal if so. The halftone detection and removal can be switched on or off by Kernel.Img.Despeckle.Halftone setting. The default value of this setting is -1, which means that the current pre-process trade-off (Settings of the Recognition Module Kernel.OcrMgr.TradeOff.Preproc) determines whether halftone detection and removal are applied or not: not applied if trade-off is TO_FAST, and applied otherwise. Set this setting to 0 if you are sure that your image does not contain this type of noise and you want to switch these algorithms off. Set this setting to 1 if your image might contain this type of noise and you want to switch these algorithms on independently of the current trade-off. The halftone detection and removal algorithms are not applied if the image resolution is less than 180 dpi. After pre-process, you can ask whether the image contains halftone noise by calling kRecGetPreprocessInfo.
Barcode specific notes: Despeckle (particularly halftone removal) may remove or deteriorate the thin lines of barcodes, especially if the resolution of the image is less than 300 dpi. If you want to recognize barcodes, check the recognition accuracy on your images using the different despeckle settings in order to select the best one.
The specification of this function in C# is:
RECERR kRecSetImgDespeckleMode(int sid, bool bMode);
kRecSetImgDespeckleMode
RECERR RECAPIKRN kRecSetImgDespeckleMode(int sid, INTBOOL bMode)
Setting despeckle mode.
The specification of this function in Java is:
int kRecSetImgDespeckleMode(int sid, int bMode)
The specification of this function in Python is:
def kRecSetImgDespeckleMode(sid: int, bMode: bool) -> int

◆ kRecSetImgDownsample()

RECERR RECAPIKRN kRecSetImgDownsample | ( | int | sid,
 |  | INTBOOL | downsample )

Changing the view downsample setting.

This function changes the setting Kernel.Img.ViewDownsample, which determines whether the current image (II_CURRENT) is created in the same resolution as the original (II_ORIGINAL) one or in a resolution reduced to 100-150 DPI (depends on the original resolution) while running kRecPreprocessImg. For more information about this setting see Settings of the Image Handling Module. For information about the lifetime of the current image see IMAGEINDEX.

Parameters
[in] | sid | Settings Collection ID.
[in] | downsample | If this is TRUE, the view image is created with reduced resolution. Its default is FALSE.
Return values
RECERR
Note
This function sets the setting Kernel.Img.ViewDownsample. This setting can be retrieved by kRecGetImgDownsample.
The specification of this function in C# is:
RECERR kRecSetImgDownsample(int sid, bool downsample);
kRecSetImgDownsample
RECERR RECAPIKRN kRecSetImgDownsample(int sid, INTBOOL downsample)
Changing the view downsample setting.
The specification of this function in Java is:
int kRecSetImgDownsample(int sid, int downsample)
The specification of this function in Python is:
def kRecSetImgDownsample(sid: int, downsample: bool) -> int

◆ kRecSetImgFlags()

RECERR RECAPIKRN kRecSetImgFlags | ( | HPAGE | hPage,
 |  | IMG_FLAGS | Flag,
 |  | INTBOOL | bValue )

Setting the image flags.

The kRecSetImgFlags function sets the specified flag of the given HPAGE.

Parameters
[in] | hPage | Handle of the page.
[in] | Flag | The flag to set. See: IMG_FLAGS.
[in] | bValue | The new value of the flag.
Note
This function can set the value of a single flag per call, so flag combinations do not work.
The specification of this function in Java is:
int kRecSetImgFlags(HPAGE hPage, IMG_FLAGS Flag, int bValue)
kRecSetImgFlags
RECERR RECAPIKRN kRecSetImgFlags(HPAGE hPage, IMG_FLAGS Flag, INTBOOL bValue)
Setting the image flags.
The specification of this function in Python is:
def kRecSetImgFlags(hPage: "HPAGE", Flag: int, bValue: bool) -> int

◆ kRecSetImgFormat()

RECERR RECAPIKRN kRecSetImgFormat | ( | int | sid,
 |  | IMG_LINEORDER | lineord,
 |  | IMG_PADDING | padding,
 |  | IMG_RGBORDER | ord )

Setting image format.

The kRecSetImgFormat function specifies the line order, the padding mode and (in the case of a 24-bit color image) the order of the composite color components of the images in the application's authority. The settings of this function affect the following API functions: kRecGetImgArea, kRecPutImgArea, kRecRotateImgArea, kRecReadImg, kRecWriteImg and the kRecLoadImgM functions.

Parameters
[in] | sid | Settings Collection ID.
[in] | lineord | Line order selection. Possible values are: TOP_DOWN, BOTTOM_UP. This parameter is not considered during kRecReadImg and kRecWriteImg, because they work only on one line at a time.
[in] | padding | Padding the scan lines to byte, word or double word boundaries. The values of this parameter therefore can be PAD_BYTEBOUNDARY, PAD_WORDBOUNDARY or PAD_DWORDBOUNDARY. This parameter is not considered during kRecReadImg and kRecWriteImg, because they work only on one line at a time.
[in] | ord | Order of the composite color components. Possible values are: COLOR_RGB or COLOR_BGR.
Return values
RECERR
Note
The Padding mode setting is taken into account only in conjunction with exporting functions, i.e with kRecGetImgArea and kRecRotateImgArea.
The default values are:
  • lineord = TOP_DOWN
  • padding = PAD_WORDBOUNDARY
  • ord = COLOR_RGB. If the application is going to create a Windows bitmap, these default values are correct (i.e. there is no need to call this function at all).
If you want to create a Windows DIB (device-independent bitmap), you should set the image format as follows:
  • lineord = BOTTOM_UP
  • padding = PAD_DWORDBOUNDARY
  • ord = COLOR_BGR.
This function toggles the settings Kernel.Img.LineOrder and ...Padding and ...RGBOrder. These settings can be retrieved by kRecGetImgFormat.
The specification of this function in C# is:
RECERR kRecSetImgFormat(int sid, IMG_LINEORDER lineord, IMG_PADDING padding, IMG_RGBORDER ord);
kRecSetImgFormat
RECERR RECAPIKRN kRecSetImgFormat(int sid, IMG_LINEORDER lineord, IMG_PADDING padding, IMG_RGBORDER ord)
Setting image format.
The specification of this function in Java is:
int kRecSetImgFormat(int sid, IMG_LINEORDER lineord, IMG_PADDING padding, IMG_RGBORDER ord)
The specification of this function in Python is:
def kRecSetImgFormat(sid: int, lineord: int, padding: int, ord: int) -> int

◆ kRecSetImgInvert()

RECERR RECAPIKRN kRecSetImgInvert | ( | int | sid,
 |  | IMG_INVERT | ImgInvert )

Setting inversion mode.

The kRecSetImgInvert function specifies which Image inversion mode is used during the forthcoming PID_IMGPREPROCESS processes. The Image inversion mode can be either automatic, switched on or switched off (white-on-black to black-on-white).

Parameters
[in] | sid | Settings Collection ID.
[in] | ImgInvert | Image inversion mode to be set. Possible values are: INV_NO, INV_YES, INV_AUTO.
Return values
RECERR
Note
This function toggles the setting Kernel.Img.Invert. This setting can be retrieved by kRecGetImgInvert.
The specification of this function in C# is:
RECERR kRecSetImgInvert(int sid, IMG_INVERT ImgInvert);
kRecSetImgInvert
RECERR RECAPIKRN kRecSetImgInvert(int sid, IMG_INVERT ImgInvert)
Setting inversion mode.
The specification of this function in Java is:
int kRecSetImgInvert(int sid, IMG_INVERT ImgInvert)
The specification of this function in Python is:
def kRecSetImgInvert(sid: int, ImgInvert: int) -> int

◆ kRecSetImgPalette()

RECERR RECAPIKRN kRecSetImgPalette | ( | HPAGE | hPage,
 |  | const BYTE * | pPal )

Setting palette of the image.

This function sets the palette of the current (II_CURRENT) image of the given page.

Parameters
[in] | hPage | Handle of the page containing the image.
[in] | pPal | Array of the palette to be set. See notes.
Return values
RECERR
Note
Only the 8-bit palette-color images are supported, so the size of the palette is always 3*256 bytes. The order of the composite color objects in the palette is always red, green, blue. If the number of bits per pixel of the image is not 8 the function returns API_PARAMETER_ERR.
The specification of this function in C# is:
RECERR kRecSetImgPalette(IntPtr hPage, byte[] pPal);
kRecSetImgPalette
RECERR RECAPIKRN kRecSetImgPalette(HPAGE hPage, const BYTE *pPal)
Setting palette of the image.
The specification of this function in Java is:
int kRecSetImgPalette(HPAGE hPage, java.nio.ByteBuffer pPal)

◆ kRecSetImgResolEnhancement()

RECERR RECAPIKRN kRecSetImgResolEnhancement | ( | int | sid,
 |  | IMG_RESENH | res )

Setting resolution enhancement mode.

The kRecSetImgResolEnhancement function specifies the Image resolution enhancement mode. The value specifies whether the image resolution enhancement is to be activated during the secondary image conversion, i.e. during image pre-processing, auto-zoning or recognition. The resolution enhancement algorithm results in a II_BW image whose resolution is higher than the resolution of the II_CURRENT image. This setting might influence recognition accuracy.

Parameters
[in] | sid | Settings Collection ID.
[in] | res | The Image resolution enhancement value to be set.
Return values
RECERR
Note
When the Image resolution enhancement value is not RE_NO, the images undergoing an implicit secondary image conversion to B/W also may have their resolution increased (see IMG_RESENH). These secondary image conversions occur whenever the application calls a KernelAPI API function whose operation requires a B/W image, e.g. the kRecLocateZones, the kRecPreprocessImg or the kRecRecognize functions.
If this function is not called to specify the Image resolution enhancement mode setting, by default RE_AUTO is applied.
This function toggles the setting Kernel.Img.ResolutionEnhancement. This setting can be retrieved by kRecGetImgResolEnhancement.
There is another setting (Kernel.Img.ResolutionEnhancement.EnabledForBW) which together with the Kernel.Img.ResolutionEnhancement setting determines whether resolution enhancement should be applied on BW images. If Kernel.Img.ResolutionEnhancement.EnabledForBW is true then resolution enhancement is applied on BW images according the Kernel.Img.ResolutionEnhancement, otherwise it is not applied.
The specification of this function in C# is:
RECERR kRecSetImgResolEnhancement(int sid, IMG_RESENH res);
kRecSetImgResolEnhancement
RECERR RECAPIKRN kRecSetImgResolEnhancement(int sid, IMG_RESENH res)
Setting resolution enhancement mode.
The specification of this function in Java is:
int kRecSetImgResolEnhancement(int sid, IMG_RESENH res)
The specification of this function in Python is:
def kRecSetImgResolEnhancement(sid: int, res: int) -> int

◆ kRecSetImgResolution()

RECERR RECAPIKRN kRecSetImgResolution | ( | HPAGE | hPage,
 |  | SIZE | DPI )

Changing the resolution of an image.

This function sets the resolution of the current (II_CURRENT) image of the given page.

Parameters
[in] | hPage | Handle of the page containing the image.
[in] | DPI | The new horizontal and vertical resolution (Dots Per Inch) of the current image.
Return values
RECERR
Note
This function clears the IMG_FLAGS_NORESOLUTION flag (IMG_FLAGS) and modifies the resolution of the II_ORIGINAL, II_BW, II_OCR and II_THUMBNAIL images too.
The specification of this function in C# is:
RECERR kRecSetImgResolution(IntPtr hPage, SIZE DPI);
kRecSetImgResolution
RECERR RECAPIKRN kRecSetImgResolution(HPAGE hPage, SIZE DPI)
Changing the resolution of an image.
The specification of this function in Java is:
int kRecSetImgResolution(HPAGE hPage, SIZE DPI)
The specification of this function in Python is:
def kRecSetImgResolution(hPage: "HPAGE", DPI: "SIZE") -> int

◆ kRecSetImgRotation()

RECERR RECAPIKRN kRecSetImgRotation | ( | int | sid,
 |  | IMG_ROTATE | imgRotate )

Setting rotation mode.

The kRecSetImgRotation function specifies which Image rotation mode is used during a forthcoming PID_IMGPREPROCESS process. The Image rotation mode can be automatic, switched off or programmable.

Parameters
[in] | sid | Settings Collection ID.
[in] | imgRotate | Image rotation mode to be set. Possible values are: ROT_AUTO, ROT_NO, ROT_RIGHT, ROT_DOWN, ROT_LEFT.
Return values
RECERR
Note
See also Notes on Deskew and Orientation.
This function toggles the setting Kernel.Img.Rotation. This setting can be retrieved by kRecGetImgRotation.
The specification of this function in C# is:
RECERR kRecSetImgRotation(int sid, IMG_ROTATE ImgRotate);
kRecSetImgRotation
RECERR RECAPIKRN kRecSetImgRotation(int sid, IMG_ROTATE imgRotate)
Setting rotation mode.
The specification of this function in Java is:
int kRecSetImgRotation(int sid, IMG_ROTATE imgRotate)
The specification of this function in Python is:
def kRecSetImgRotation(sid: int, imgRotate: int) -> int

◆ kRecSetImgSlope()

RECERR RECAPIKRN kRecSetImgSlope | ( | int | sid,
 |  | int | Slope )

Setting the slope.

The kRecSetImgSlope function specifies the value of the skew slope. This value is used during the PID_IMGPREPROCESS process when the Image deskewing mode is set to DSK_SET.

Parameters
[in] | sid | Settings Collection ID.
[in] | Slope | Slope value for deskewing. The value given here is the number of pixels of vertical ascent on 1000 horizontal pixels i.e. the tangent of the deskew angle multiplied by 1000.
Return values
RECERR
Note
Note that to detect the skew of an image containing machine printed text, the application should call the kRecDetectImgSkew function.
For information about limits of page angle using deskew operations see Notes on Deskew.
This function toggles the setting Kernel.Img.Deskew.Slope. This setting can be retrieved by kRecGetImgSlope.
The specification of this function in C# is:
RECERR kRecSetImgSlope(int sid, int Slope);
kRecSetImgSlope
RECERR RECAPIKRN kRecSetImgSlope(int sid, int Slope)
Setting the slope.
The specification of this function in Java is:
int kRecSetImgSlope(int sid, int Slope)
The specification of this function in Python is:
def kRecSetImgSlope(sid: int, Slope: int) -> int

◆ kRecSetImgStretchMode()

RECERR RECAPIKRN kRecSetImgStretchMode | ( | int | sid,
 |  | IMG_STRETCHMODE | ImgStretchMode )

Setting stretching mode.

The kRecSetImgStretchMode function specifies which Image stretching mode is used while executing the kRecGetImgArea or kRecPutImgArea functions.

Parameters
[in] | sid | Settings Collection ID.
[in] | ImgStretchMode | Image stretching mode to be applied. Possible values are: STRETCH_DELETE, STRETCH_OR, STRETCH_AND and STRETCH_AVG.
Return values
RECERR
Note
If this function is not called by the integrating application to specify the Image stretching mode, the default value of this setting, STRETCH_DELETE are applied.
This function toggles the setting Kernel.Img.StretchMode. This setting can be retrieved by kRecGetImgStretchMode.
The specification of this function in C# is:
RECERR kRecSetImgStretchMode(int sid, IMG_STRETCHMODE ImgStretchMode);
kRecSetImgStretchMode
RECERR RECAPIKRN kRecSetImgStretchMode(int sid, IMG_STRETCHMODE ImgStretchMode)
Setting stretching mode.
The specification of this function in Java is:
int kRecSetImgStretchMode(int sid, IMG_STRETCHMODE ImgStretchMode)
The specification of this function in Python is:
def kRecSetImgStretchMode(sid: int, ImgStretchMode: int) -> int

◆ kRecSetImgThreshold()

RECERR RECAPIKRN kRecSetImgThreshold | ( | int | sid,
 |  | int | Threshold )

Setting the binarization threshold.

The kRecSetImgThreshold function specifies the threshold parameter of an image conversion to a B/W image. This parameter has an effect only when the CNV_SET image conversion mode has been set. This setting is used during both the primary and the secondary image conversion.

Parameters
[in] | sid | Settings Collection ID.
[in] | Threshold | The image conversion threshold value to be set. It ranges between zero (0) and 255, default: 128.
Return values
RECERR
Note
This setting is applied to both the primary and the secondary image conversions.
The function has no effect if other than CNV_SET image conversion mode has been specified.
This function sets the setting Kernel.Img.Binarization.Threshold. This setting can be retrieved by kRecGetImgThreshold.
The specification of this function in C# is:
RECERR kRecSetImgThreshold(int sid, int Threshold);
kRecSetImgThreshold
RECERR RECAPIKRN kRecSetImgThreshold(int sid, int Threshold)
Setting the binarization threshold.
The specification of this function in Java is:
int kRecSetImgThreshold(int sid, int Threshold)
The specification of this function in Python is:
def kRecSetImgThreshold(sid: int, Threshold: int) -> int

◆ kRecSetPreserveOriginalImg()

RECERR RECAPIKRN kRecSetPreserveOriginalImg | ( | int | sid,
 |  | INTBOOL | preserve )

Changing the keep original image setting.

This function changes the setting Kernel.Img.KeepOriginalImage, which determines whether the original image (II_ORIGINAL) is kept after the preprocessing step or not. The original image is used only as an input image of the preprocessing step PID_IMGPREPROCESS, thus after preprocessing it can be deleted for saving memory. For more information about this setting see Settings of the Image Handling Module. For information about the lifetime of the thumbnail image see IMAGEINDEX.

Parameters
[in] | sid | Settings Collection ID.
[in] | preserve | If this is TRUE, the original image is kept.
Return values
RECERR
Note
This function toggles the setting Kernel.Img.KeepOriginalImage. This setting can be retrieved by kRecGetPreserveOriginalImg.
The specification of this function in C# is:
RECERR kRecSetPreserveOriginalImg(int sid, bool preserve);
kRecSetPreserveOriginalImg
RECERR RECAPIKRN kRecSetPreserveOriginalImg(int sid, INTBOOL preserve)
Changing the keep original image setting.
The specification of this function in Java is:
int kRecSetPreserveOriginalImg(int sid, int preserve)
The specification of this function in Python is:
def kRecSetPreserveOriginalImg(sid: int, preserve: bool) -> int

◆ kRecSetRetainColor()

RECERR RECAPIKRN kRecSetRetainColor | ( | int | sid,
 |  | RETAINCOLOR | RetainColor )

Changing retain color setting.

This function changes the retain color setting.

Parameters
[in] | sid | Settings Collection ID.
[in] | RetainColor | The retain color value to be set.
Return values
RECERR
Note
This function sets the setting Kernel.OcrMgr.RetainColor. This setting can be retrieved by kRecGetRetainColor.
The specification of this function in C# is:
RECERR kRecSetRetainColor(int sid, RETAINCOLOR RetainColor);
kRecSetRetainColor
RECERR RECAPIKRN kRecSetRetainColor(int sid, RETAINCOLOR RetainColor)
Changing retain color setting.
The specification of this function in Java is:
int kRecSetRetainColor(int sid, RETAINCOLOR RetainColor)
The specification of this function in Python is:
def kRecSetRetainColor(sid: int, RetainColor: int) -> int

◆ kRecSetThumbnailImgInfo()

RECERR RECAPIKRN kRecSetThumbnailImgInfo | ( | int | sid,
 |  | const IMG_INFO * | pThumbnail,
 |  | REC_COLOR | color )

Changing the thumbnail image info settings.

This function changes the settings under the node Kernel.Img.Thumbnail, which determines the image info used at the creation of the thumbnail image. For more information about this setting see Settings of the Image Handling Module. For information about the lifetime of the thumbnail image see IMAGEINDEX.

Parameters
[in] | sid | Settings Collection ID.
[in] | pThumbnail | This is the image information to be set. Only its fields IMG_INFO::BitsPerPixel and IMG_INFO::Size are considered. The BitsPerPixel can be 1, 8 or 24. The Size is the width and height of the thumbnail image. If either the horizontal or vertical size is set to zero, its value is automatically determined so as to preserve the aspect ratio of the source page. If both size values are given, the aspect ratio is still preserved, with the thumbnail color placed in the unused space (see II_THUMBNAIL).
[in] | color | This thumbnail color is placed in the background if the thumbnail image does not cover the whole thumbnail area. See II_THUMBNAIL.
Return values
RECERR
Note
This function toggles the settings Kernel.Img.Thumbnail.BitsPerPixel, ...Color, ...Size.X and ...Size.Y. These settings can be retrieved by kRecGetThumbnailImgInfo.
The specification of this function in C# is:
RECERR kRecSetThumbnailImgInfo(int sid, [In] IMG_INFO pThumbnail, uint color);
kRecSetThumbnailImgInfo
RECERR RECAPIKRN kRecSetThumbnailImgInfo(int sid, const IMG_INFO *pThumbnail, REC_COLOR color)
Changing the thumbnail image info settings.
The specification of this function in Java is:
int kRecSetThumbnailImgInfo(int sid, IMG_INFO pThumbnail, long color)
The specification of this function in Python is:
def kRecSetThumbnailImgInfo(sid: int, pThumbnail: "IMG_INFO", color: int) -> int

◆ kRecStartReadImg()

RECERR RECAPIKRN kRecStartReadImg | ( | int | sid,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPCRECT | pRect,
 |  | IMG_ROTATE | ImgRotation,
 |  | LPWORD | pBytes )

Starting to read an image line-by-line.

The kRecStartReadImg function initiates the line-by-line reading process to export an image stored in the image management module.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page which contains the image to be processed.
[in] | iiImg | Index to the image in the page.
[in] | pRect | Pointer to the structure defining the requested area of the image or NULL for the entire image.
[in] | ImgRotation | Orientation of the lines during reading. Possible values are all the values of the type IMG_ROTATE except ROT_AUTO.
[out] | pBytes | Pointer to a variable to hold the length of the lines to be read in bytes.
Return values
RECERR
Note
Using different Settings Collections you can open several images at the same time by this function.
This function is the first in a series of calls to read an image line-by-line. It should be followed by calls to kRecReadImg, which is usually called repeatedly. The kRecStopReadImg function should be used to signal the completion of this reading process. These functions should be used instead of kRecGetImgArea, if the full image is too large to store in the application's memory.
Three analogous functions kRecStartWriteImg, kRecWriteImg and kRecStopWriteImg perform image import.
With 24-bit color images, this function takes into account the RGBorder (IMG_RGBORDER) setting of the Engine. This setting defines how the destination bitmap's color representation is created. To change this setting, a preceding call to the kRecSetImgFormat function is necessary.
This function is insecure for managed code. In C# use the more advanced kRecGetImgArea function.

◆ kRecStartWriteImg()

RECERR RECAPIKRN kRecStartWriteImg | ( | int | sid,
 |  | LPCIMG_INFO | pImg )

Starting to write an image line-by-line.

The kRecStartWriteImg function initiates a line-by-line bitmap transfer for direct raw image download from the application's image source. The kRecStartWriteImg function sends pertinent information about the image to the Engine and prepares for creating a new HPAGE.

Parameters
[in] | sid | Settings Collection ID.
[in] | pImg | Pointer to a filled IMG_INFO structure describing the image to be transferred.
Return values
RECERR
Note
Using different Settings Collections you can open several images at the same time by this function.
This function is the first in a series of calls to send an image in lines to the Engine. It should be followed by calls to kRecWriteImg, which is usually called repeatedly to send successive lines of the image to an image in the image management module. After the full image has been sent, the clean-up function kRecStopWriteImg needs to be called to complete the process. kRecStopWriteImg creates the mentioned new HPAGE and returns with it.
Use these functions instead of the direct method kRecLoadImgM when the image is too large to place in memory.
There is no need to specify the BytesPerLine field of the passed image info and if the number of lines is not known in advance or it is uncertain, zero (0) can be used for the vertical size.
Three analogous functions kRecStartReadImg, kRecReadImg and kRecStopReadImg perform image export.
With 24-bit color images, this function takes into account the RGBorder (IMG_RGBORDER) setting of the Engine. This setting describes the source bitmap's color representation. To change this setting, a preceding call to the kRecSetImgFormat function is necessary.
This function is insecure for managed code. In C# use the more advanced kRecPutImgArea or kRecCreateImg functions.

◆ kRecStopReadImg()

RECERR RECAPIKRN kRecStopReadImg ( int sid )

Stopping to read an image line-by-line.

The kRecStopReadImg function stops the line-by-line image exporting process started and performed with the functions kRecStartReadImg and kRecReadImg.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
Typically this function should be called when no more lines remain in the defined image area. This is signaled by a returned value of IMG_NOMORE_WARN from a kRecReadImg call.
This function is insecure for managed code. In C# use the more advanced kRecGetImgArea function.

◆ kRecStopWriteImg()

RECERR RECAPIKRN kRecStopWriteImg | ( | int | sid,
 |  | HPAGE * | phPage )

Stopping the writing of an image line-by-line.

The kRecStopWriteImg function completes the image download operation started with kRecStartWriteImg and kRecWriteImg calls. It stores the downloaded image in a newly created HPAGE.

Parameters
[in] | sid | Settings Collection ID.
[out] | phPage | Address of a variable to store the handle of the created page.
Return values
RECERR
Note
This function is insecure for managed code. In C# use the more advanced kRecPutImgArea or kRecCreateImg functions.

◆ kRecTransformCoordinates()

RECERR RECAPIKRN kRecTransformCoordinates | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiDst,
 |  | IMAGEINDEX | iiSrc,
 |  | int | nP,
 |  | LPPOINT | pPoint )

Transforming coordinates between images of a page.

This function retrieves the coordinates of the destination image according to those of the source image. The transformation used is able to convert the coordinate system of the source image into that of the destination image of the same page.

Parameters
[in] | hPage | Handle of the page.
[in] | iiDst | Index of the destination image.
[in] | iiSrc | Index of the source image.
[in] | nP | Number of points in the buffer.
[in,out] | pPoint | Buffer of the points to be converted. The result will rewrite the coordinates in place.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecTransformCoordinates(IntPtr hPage, IMAGEINDEX iiDst, IMAGEINDEX iiSrc, POINT[] pPoint);
kRecTransformCoordinates
RECERR RECAPIKRN kRecTransformCoordinates(HPAGE hPage, IMAGEINDEX iiDst, IMAGEINDEX iiSrc, int nP, LPPOINT pPoint)
Transforming coordinates between images of a page.
The specification of this function in Java is:
int kRecTransformCoordinates(HPAGE hPage, IMAGEINDEX iiDst, IMAGEINDEX iiSrc, int nP, POINT pPoint)
The specification of this function in Python is:
def kRecTransformCoordinates(hPage: "HPAGE", iiDst: int, iiSrc: int, pPoint: "PointArray") -> int

◆ kRecTransformImg()

RECERR RECAPIKRN kRecTransformImg | ( | int | sid,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPCRECT | pSrcRect,
 |  | LPCSIZE | pDstSize,
 |  | WORD | BitsPerPixel,
 |  | HPAGE * | phPageOut )

Transforming an image.

The kRecTransformImg function creates a new image from an existing one. During this transformation, a rectangular area of the selected image of the input page is copied to the original image (II_ORIGINAL) of the output page. This area is compressed or stretched according to the ratio of the source rectangular area and the destination size.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the input page.
[in] | iiImg | Index of the input image whose area should be transformed.
[in] | pSrcRect | Rectangular area of the image to be transformed. NULL means: the whole image is transformed.
[in] | pDstSize | Size of the image to be created in pixels. A value of NULL here means that the destination size is equal to the size of the source rectangle.
[in] | BitsPerPixel | Type of the image (number of bits per pixel). Possible values are: 1, 4, 8, 24 for B/W, 4-bit gray-scale, 8-bit gray-scale and 24-bit color image, respectively.
[out] | phPageOut | Pointer of a variable to store the handle of the output page to be created.
Return values
RECERR
Note
To create a B/W image from the current one without changing the size of the image, call the function kRecConvertImg2BW instead.
If the input image is a B/W one and the output image is specified as an 8-bit gray-scale one, and the area should be compressed, a scale-to-gray image conversion will be applied.
The resolution of the target image is calculated according to the compression/stretching ratio.
When the target page is no longer needed, remove it from the image management module by invoking the kRecFreeImg function.
The specification of this function in C# is:
RECERR kRecTransformImg(int sid, IntPtr hPage, IMAGEINDEX iiImg, RECT pSrcRect, SIZE pDstSize, ushort BitsPerPixel, out IntPtr phPageOut);
// or when pSrcRect is NULL in C/C++
RECERR kRecTransformImg(int sid, IntPtr hPage, IMAGEINDEX iiImg, SIZE pDstSize, ushort BitsPerPixel, out IntPtr phPageOut);
// or when pDstSize is NULL in C/C++
RECERR kRecTransformImg(int sid, IntPtr hPage, IMAGEINDEX iiImg, RECT pSrcRect, ushort BitsPerPixel, out IntPtr phPageOut);
// or when both are NULL
RECERR kRecTransformImg(int sid, IntPtr hPage, IMAGEINDEX iiImg, ushort BitsPerPixel, out IntPtr phPageOut);
kRecTransformImg
RECERR RECAPIKRN kRecTransformImg(int sid, HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pSrcRect, LPCSIZE pDstSize, WORD BitsPerPixel, HPAGE *phPageOut)
Transforming an image.
The specification of this function in Java is:
int kRecTransformImg(int sid, HPAGE hPage, IMAGEINDEX iiImg, RECT pSrcRect, SIZE pDstSize, int BitsPerPixel, HPAGE phPageOut)
The specification of this function in Python is:
def kRecTransformImg(sid: int, hPage: "HPAGE", iiImg: int, pSrcRect: "RECT", pDstSize: "SIZE", BitsPerPixel: "WORD") -> Tuple[int, "HPAGE"]

◆ kRecTransformImgByMatrix()

RECERR RECAPIKRN kRecTransformImgByMatrix | ( | int | sid,
 |  | HPAGE | hPage,
 |  | const SIZE * | newsize,
 |  | const double * | matrix )

Performing geometrical transformation determined by a matrix.

The kRecTransformImgByMatrix function performs a geometrical transformation on the II_CURRENT image of the given page. If there are BW (II_BW) and thumbnail (II_THUMBNAIL) images they are regenerated from the transformed current image.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the image(s) to be transformed.
[in] | newsize | The new size of the current image. The size is not changed if it is NULL.
[in] | matrix | The transformation matrix containing 8 elements.
Return values
RECERR
Note
The matrix is the first 8 elements of a 3x3 M matrix in the following order: M[0][0], M[0][1], M[0][2], M[1][0], M[1][1], M[1][2], M[2][0], M[2][1]. The last (M[2][2]) element is always supposed to be 1.0. The function uses the following algorithm,
(x0,y0) is the original point and (x2,y2) is the transformed point, [x, y, z] is a column vector:
[x1, y1, z1] = M * [x0,y0,1]
x2 = x1 / z1
y2 = y1 / z1
Using this function rotation, translation, enlargement, reducing, shearing, perspective transformations and their combinations can be performed.
  • Rotation by x degrees: cos(x),sin(x),0,-sin(x),cos(x),0,0,0
  • Translation by (x,y): 1,0,x,0,1,y,0,0
  • Scaling by scalefactor s: s,0,0,0,s,0,0,0
    Note
    Applying 2 transformations on the image (T2 given by matrix M2 after T1 given by matrix M1) can be performed in one step calculating and passing the combined matrix M2 * M1. If the M[2][2] element of the combined matrix is not 1.0 the matrix should be normalized (i.e. its elements should be divided by M[2][2]).
    The specification of this function in C# is:
    RECERR kRecTransformImgByMatrix(int sid, IntPtr hPage, SIZE newsize, double[] pMatrix);
    // or when newsize is NULL in C/C++
    RECERR kRecTransformImgByMatrix(int sid, IntPtr hPage, double[] pMatrix);
    kRecTransformImgByMatrix
    RECERR RECAPIKRN kRecTransformImgByMatrix(int sid, HPAGE hPage, const SIZE *newsize, const double *matrix)
    Performing geometrical transformation determined by a matrix.
    The specification of this function in Java is:
    int kRecTransformImgByMatrix(int sid, HPAGE hPage, SIZE newsize, double[] matrix)
    The specification of this function in Python is:
    def kRecTransformImgByMatrix(sid: int, hPage: "HPAGE", newsize: "SIZE", matrix: "DoubleArray") -> int

◆ kRecTransformImgByPoints()

RECERR RECAPIKRN kRecTransformImgByPoints | ( | int | sid,
 |  | HPAGE | hPage,
 |  | const SIZE * | newsize,
 |  | const POINT * | pOriginal,
 |  | const POINT * | pTransformed,
 |  | int | nPoints )

Performing geometrical transformation determined by points.

The kRecTransformImgByPoints function performs a geometrical transformation on the II_CURRENT image of the given page. It creates a transformation matrix which transforms the pOriginal points to pTransformed, and applies it to the image. If there are BW (II_BW) and thumbnail (II_THUMBNAIL) images they are regenerated from the transformed current image.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of page containing the image(s) to be transformed.
[in] | newsize | The new size of the current image. The size is not changed if it is NULL.
[in] | pOriginal | Array of original points.
[in] | pTransformed | Array of transformed points.
[in] | nPoints | The number of given points in pOriginal and pTransformed array.
Return values
RECERR
Note
- The transformation is a translation if nPoints == 1,
  • it is a similarity transformation if nPoints == 2,
  • it is a similarity transformation combined with a shearing if nPoints == 3, and
  • it is a perspective transformation if nPoints >= 4.
  • If nPoints > 4 the transformation does not exactly transform all original points to transformed ones.
The specification of this function in C# is:
RECERR kRecTransformImgByPoints(int sid, IntPtr hPage, SIZE newsize, POINT[] pOriginal, POINT[] pTransformed);
// or when newsize is NULL in C/C++
RECERR kRecTransformImgByPoints(int sid, IntPtr hPage, POINT[] pOriginal, POINT[] pTransformed);
kRecTransformImgByPoints
RECERR RECAPIKRN kRecTransformImgByPoints(int sid, HPAGE hPage, const SIZE *newsize, const POINT *pOriginal, const POINT *pTransformed, int nPoints)
Performing geometrical transformation determined by points.
The specification of this function in Java is:
int kRecTransformImgByPoints(int sid, HPAGE hPage, SIZE newsize, POINT[] pOriginal, POINT[] pTransformed)
The specification of this function in Python is:
def kRecTransformImgByPoints(sid: int, hPage: "HPAGE", newsize: "SIZE", pOriginal: "PointArray", pTransformed: "PointArray") -> int

◆ kRecTransformImgPalette()

RECERR RECAPIKRN kRecTransformImgPalette | ( | int | sid,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPCRECT | pSrcRect,
 |  | LPCSIZE | pDstSize,
 |  | HPAGE * | phPageOut )

Transforming palette-color images.

The kRecTransformImgPalette function creates a new palette-color image from an existing image. During this transformation, a rectangular area of the selected image of the input page is copied to the original image (II_ORIGINAL) of the output page. This area is compressed or stretched according to the ratio of the source rectangular area's size and that of the destination image.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the source page.
[in] | iiImg | Index of the image in the source page to be transformed.
[in] | pSrcRect | Rectangular area of the selected image to be transformed. NULL means the whole image is transformed.
[in] | pDstSize | Size of the output image to be created in pixels. A value of NULL here means that the destination size is equal to the size of the source rectangle.
[out] | phPageOut | Pointer of a variable to store the handle of the output page.
Return values
RECERR
Note
To create images other than color-palette ones, use the function kRecTransformImg.
The resolution of the output image is calculated according to the compression/stretching ratio.
When the output page is no longer needed it has to be removed from the image management module by invoking the kRecFreeImg function.
The specification of this function in C# is:
RECERR kRecTransformImgPalette(int sid, IntPtr hPage, IMAGEINDEX iiImg, RECT pSrcRect, SIZE pDstSize, out IntPtr phPageOut);
// or when pSrcRect is NULL in C/C++
RECERR kRecTransformImgPalette(int sid, IntPtr hPage, IMAGEINDEX iiImg, SIZE pDstSize, out IntPtr phPageOut);
// or when pDstSize is NULL in C/C++
RECERR kRecTransformImgPalette(int sid, IntPtr hPage, IMAGEINDEX iiImg, RECT pSrcRect, out IntPtr phPageOut);
// or when both are NULL
RECERR kRecTransformImgPalette(int sid, IntPtr hPage, IMAGEINDEX iiImg, out IntPtr phPageOut);
kRecTransformImgPalette
RECERR RECAPIKRN kRecTransformImgPalette(int sid, HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pSrcRect, LPCSIZE pDstSize, HPAGE *phPageOut)
Transforming palette-color images.
The specification of this function in Java is:
int kRecTransformImgPalette(int sid, HPAGE hPage, IMAGEINDEX iiImg, RECT pSrcRect, SIZE pDstSize, HPAGE phPageOut)
The specification of this function in Python is:
def kRecTransformImgPalette(sid: int, hPage: "HPAGE", iiImg: int, pSrcRect: "RECT", pDstSize: "SIZE") -> Tuple[int, "HPAGE"]

◆ kRecWriteImg()

RECERR RECAPIKRN kRecWriteImg | ( | int | sid,
 |  | const LPBYTE | pBuff )

Writing an image line-by-line.

The kRecWriteImg function downloads a line of raw image data from the application's buffer to the Engine. It should be repeatedly called to send successive lines of the image to an image in the image management module.

Parameters
[in] | sid | Settings Collection ID.
[in] | pBuff | Pointer to a buffer containing the line of image data to be downloaded to the Engine.
Return values
RECERR
Note
This function is the second part in a three-part series for downloading lines of image data to the Engine. The first call in the series is kRecStartWriteImg, which prepares the Engine for the incoming image. The kRecStopWriteImg is called after the image has been completely sent to the Engine to perform clean-up. Use these functions instead of the direct method kRecLoadImgM when the image is too large to place in memory.
The line-by-line image transfer must start with the top line of the image and end with the bottom line.
This function is insecure for managed code. In C# use the more advanced kRecPutImgArea or kRecCreateImg functions.


RecAPI: _IMG_INFO Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
_IMG_INFO Struct Reference
KernelAPI » Image Handling Module

Structure of an image containing basic physical information. More...

#include <KernelApi.h>

Public Attributes

SIZE | Size
SIZE | DPI
UINT | BytesPerLine
INTBOOL | IsPalette
WORD | BitsPerPixel
void * | DummyS

Detailed Description

Structure of an image containing basic physical information.

Note
See IMG_LINEORDER, IMG_RGBORDER, and IMG_PADDING for more information.

Member Data Documentation

◆ BitsPerPixel

WORD _IMG_INFO::BitsPerPixel

Specifies the number of bits per pixel (bit depth). The value of BitsPerPixel can be 1, 4, 8 or 24.

◆ BytesPerLine

UINT _IMG_INFO::BytesPerLine

Length of one pixel line in bytes (including padding).

◆ DPI

SIZE _IMG_INFO::DPI

Horizontal and vertical resolution (Dots Per Inch).

◆ DummyS

void* _IMG_INFO::DummyS

For internal use only.

◆ IsPalette

INTBOOL _IMG_INFO::IsPalette

TRUE if the image has a palette .

◆ Size

SIZE _IMG_INFO::Size

Horizontal and vertical sizes of the bitmap in pixels.


RecAPI: _COMPRESSED_IMG_INFO Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
_COMPRESSED_IMG_INFO Struct Reference
KernelAPI » Image Handling Module

Basic physical information of a compressed image buffer. More...

#include <KernelApi.h>

Public Attributes

IMG_COMPRESSION Compression
SIZE | Size
SIZE | DPI
WORD | BitsPerPixel
void * | DummyS

Detailed Description

Basic physical information of a compressed image buffer.

This structure specifies the basic infromation about the image to be loaded from compressed memory buffer (kRecLoadImgMC and kRecLoadImgDataStreamMC).

Member Data Documentation

◆ BitsPerPixel

WORD _COMPRESSED_IMG_INFO::BitsPerPixel

Specifies the number of bits per pixel (bit depth). The value of BitsPerPixel can be 1, 4, 8 or 24. This is to be given only for TIFF compression types.

◆ Compression

IMG_COMPRESSION _COMPRESSED_IMG_INFO::Compression

Compression type.

◆ DPI

SIZE _COMPRESSED_IMG_INFO::DPI

Horizontal and vertical resolution (Dots Per Inch). This is to be given only for TIFF compression types.

◆ DummyS

void* _COMPRESSED_IMG_INFO::DummyS

For internal use only.

◆ Size

SIZE _COMPRESSED_IMG_INFO::Size

Horizontal and vertical sizes of the bitmap in pixels. This is to be given only for TIFF compression types.


RecAPI: CUT_INFO Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
CUT_INFO Struct Reference
KernelAPI » Image Handling Module

Structure for book images. More...

#include <KernelApi.h>

Public Attributes

int | x
Cutting position.
int | info
Containing information.
int | first_x
Left position.
int | last_x
Right position.
int | dpi
Resolution.

Detailed Description

Structure for book images.

This provides information on the images produced by scanning a book, with two facing pages per scan. See kRecDetectBook and kRecCreateBookPages. They show how each incoming image can be cut into two book-page images for recognition. Page consolidation is likely to be applied to these page images.

Member Data Documentation

◆ dpi

int CUT_INFO::dpi

Resolution.

This structure refers to this dpi. Resolution change between two consecutive scans of the same book is handled correctly.

◆ first_x

int CUT_INFO::first_x

Left position.

Minimal x coordinate of the text or graphics on the original page.

◆ info

int CUT_INFO::info

Containing information.

Possible values

  • 0: both pages contain text,
  • 1: right page does not contain text,
  • 2: left page does not contain text.

◆ last_x

int CUT_INFO::last_x

Right position.

Maximal x coordinate of the text or graphics on the original page.

◆ x

int CUT_INFO::x

Cutting position.

The position where the two pages are cut. If this is -1, the kRecDetectBook cannot find two facing pages.


RecAPI: PREPROC_INFO Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
PREPROC_INFO Struct Reference
KernelAPI » Image Handling Module

Information about preprocessing. More...

#include <KernelApi.h>

Public Attributes

IMG_ROTATE Rotation
int | Slope
PREPROC_INFO_FLAGS Flags
double | Matrix [8]

Detailed Description

Information about preprocessing.

Member Data Documentation

◆ Flags

PREPROC_INFO_FLAGS PREPROC_INFO::Flags

PREPROC_INFO flags.

◆ Matrix

double PREPROC_INFO::Matrix[8]

Matrix of the applied transformation (see also kRecTransformImgByMatrix).

◆ Rotation

IMG_ROTATE PREPROC_INFO::Rotation

Applied rotation(s).

◆ Slope

int PREPROC_INFO::Slope

Slope of the applied deskew. Note that 3D deskew and kRecApplyFormTemplate does not fill this field.


RecAPI: RLINE Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
RLINE Struct Reference
KernelAPI » Image Handling Module

Structure of a line. More...

#include <KernelApi.h>

Public Attributes

POINT | start
POINT | end
unsigned short | width
RLSTYLE style
REC_COLOR color
RLTYPES | type
unsigned short | flag
DWORD | plist

Detailed Description

Structure of a line.

The lines of an image are stored in the line list of the HPAGE. Only nearly horizontal and vertical lines are detected. There are three functions for filling this list: kRecLineRemoval, kRecLocateZones, kRecRecognize. They use different algorithms for searching lines. Thus, their outputs are different.

The functions kRecLineRemoval and kRecLocateZones do not find dotted and dashed lines. In addition, they render double lines as one or two solid lines. Thus, after these functions, the style is always LS_SOLID.

The function kRecLineRemoval works on the image II_BW; because of this, the line color is always REC_DEFAULT_COLOR.

The function kRecRecognize provides only the lines outside OCR zones. It detects the lines only when the decomp method is DCM_STANDARD. After this function, the line list stores the coordinates of the middle line of the bounding box of the detected lines, which are given on the image II_BW. The other two functions store the end points of the lines (in the coordinate system of the II_BW). The HPAGE stores the result of the latest run function, the previous results are lost.

When a kRecRecognize runs after a kRecLocateZones, the line list will be more accurate, since kRecLocateZones may find lines that are parts of graphics or large letters, and does not search dotted or dashed lines. In this case, kRecRecognize removes the lines from inside OCR zones, because they become underlines, table splitters or leaders. It also modifies the coordinates of the lines making them exactly horizontal or vertical.

Running of line detection depends on page descriptor. In the case of default page descriptor, when there are no user zones, the above functions search lines on the whole page; when there are user zones, they search within only WT_FLOW, WT_TABLE and WT_AUTO zones. Otherwise, they search outside of the user zones, if the page descriptor says that flow text or table zones should be detected there.

Member Data Documentation

◆ color

REC_COLOR RLINE::color

Color of the line. It is set only when RETAINCOLOR_YES is set and with color images.

◆ end

POINT RLINE::end

Ending point of the line (in the middle of the rule line).

◆ flag

unsigned short RLINE::flag

Only for internal use.

◆ plist

DWORD RLINE::plist

Only for internal use.

◆ start

POINT RLINE::start

Starting point of the line (in the middle of the rule line).

◆ style

RLSTYLE RLINE::style

Style.

◆ type

RLTYPES RLINE::type

Only for internal use.

◆ width

unsigned short RLINE::width

Width of the line in pixels.


RecAPI: Zone Handling Module

Topics | Classes | Macros | Typedefs | Enumerations | Functions
Zone Handling Module
KernelAPI

Zone handling tools. More...

Topics

Table Recognition Module
Table detection and working with tables.

Classes

struct | _ZONE
ZONE structure. More...
struct | ZONEDATA
ZONEDATA structure. More...

Macros

#define MAX_ZONE_LANGUAGES 2
Length of languages array in a zone.

Typedefs

typedef struct _ZONE | ZONE
ZONE structure.
typedef ZONE * | LPZONE
Pointer to a structure ZONE.
typedef const ZONE * | LPCZONE
Const pointer to a structure ZONE.
typedef ZONEDATA * | LPZONEDATA
Pointer to a structure ZONEDATA.
typedef const ZONEDATA * | LPCZONEDATA
Const pointer to a structure ZONEDATA.

Enumerations

enum FILLINGMETHOD {
FM_DEFAULT = 0 ,
FM_OMNIFONT ,
FM_DRAFTDOT9 ,
FM_BARCODE ,
FM_OMR ,
FM_HANDPRINT ,
FM_BRAILLE ,
FM_DRAFTDOT24 ,
FM_OCRA ,
FM_OCRB ,
FM_MICR ,
FM_BARCODE2D ,
FM_DOTDIGIT ,
FM_DASHDIGIT ,
FM_RESERVED_2 ,
FM_CMC7 ,
FM_NO_OCR ,
FM_AUTO_HAND ,
FM_AUTO_BAR ,
FM_MRZ ,
FM_SIZE
}
Filling methods. More...
enum RECOGNITIONMODULE {
RM_AUTO = 0 ,
RM_OMNIFONT_MTX ,
RM_OMNIFONT_MOR ,
RM_DOT ,
RM_BAR ,
RM_OMR ,
RM_HNR ,
RM_RER ,
RM_BRA ,
RM_MAT ,
RM_RESERVED_P ,
RM_OMNIFONT_PLUS2W ,
RM_OMNIFONT_FRX ,
RM_OMNIFONT_PLUS3W ,
RM_ASIAN ,
RM_RESERVED_M ,
RM_RESERVED_A ,
RM_ARABIC ,
RM_SIZE
}
Recognition modules (Engines) More...
enum ZONETYPE {
WT_FLOW ,
WT_TABLE ,
WT_GRAPHIC ,
WT_AUTO ,
WT_IGNORE ,
WT_FORM ,
WT_VERTTEXT ,
WT_LEFTTEXT ,
WT_RIGHTTEXT
}
Basic zone types. More...
enum IMG_DECOMP {
DCM_AUTO ,
DCM_LEGACY ,
DCM_STANDARD ,
DCM_FAST
}
Page parse method. More...
enum ZONE_BORDER_TYPE {
ZBT_PURE_TEXT ,
ZBT_FRAMED_PURE_TEXT ,
ZBT_SHORT_COMB ,
ZBT_FRAMED_SHORT_COMB ,
ZBT_INDIVIDUAL_BOXES ,
ZBT_FRAMED_FULL_COMB ,
ZBT_UNDERLINED_TEXT ,
ZBT_GRAY_BOXES ,
ZBT_SIZE
}
Zone border types. More...
enum LOCATEHANDWRITINGMODE {
LH_RETAIN_HANDWRITING ,
LH_REMOVE_HANDWRITING
}
kRecLocateHandwriting modes More...
enum CREATEHANDWRINGPAGEMODE {
CHP_FIND_HANDWRITING ,
CHP_SEPARATE_HANDWRITING
}
kRecCreateHandwritingPage modes More...

Functions

RECERR RECAPIKRN | kRecSetDecompMethod (int sid, IMG_DECOMP Algorithm)
Setting the decomp method.
RECERR RECAPIKRN | kRecGetDecompMethod (int sid, IMG_DECOMP *pAlgorithm)
Getting the decomp method.
RECERR RECAPIKRN | kRecSetNongriddedTableDetect (int sid, INTBOOL bEnable)
Setting the non-gridded table detection.
RECERR RECAPIKRN | kRecGetNongriddedTableDetect (int sid, INTBOOL *bEnable)
Getting the non-gridded table detection setting.
RECERR RECAPIKRN | kRecSetForceSingleColumn (int sid, INTBOOL bForceSingle)
Specify the Force Single Column mode.
RECERR RECAPIKRN | kRecGetForceSingleColumn (int sid, INTBOOL *pbForceSingle)
Getting the setting of Force Single Column mode.
RECERR RECAPIKRN | kRecLocateZones (int sid, HPAGE hPage)
Page parsing.
RECERR RECAPIKRN | kRecLocateZonesEx (int sid, HPAGE hPage, int fm_mode)
Extended page parsing.
RECERR RECAPIKRN | kRecSetPageDescription (int sid, DWORD PageDesc)
Setting page description data.
RECERR RECAPIKRN | kRecGetPageDescription (int sid, DWORD *pPageDesc)
Getting page description data.
RECERR RECAPIKRN | kRecGetZoneCount (HPAGE hPage, int *pnZones)
Getting the user zone count.
RECERR RECAPIKRN | kRecGetZoneInfo (HPAGE hPage, IMAGEINDEX iiImg, LPZONE pZone, int nZone)
Getting user zone information.
RECERR RECAPIKRN | kRecGetZoneLayout (HPAGE hPage, IMAGEINDEX iiImg, LPRECT *ppRects, int *pnRects, int iZone)
Getting user zone shape information.
RECERR RECAPIKRN | kRecGetZoneNodeArray (HPAGE hPage, IMAGEINDEX iiImg, LPPOINT *ppPoints, int *pnNodes, int iZone)
Getting the polygon of the user zone.
RECERR RECAPIKRN | kRecDeleteAllZones (HPAGE hPage)
Deleting all user zones.
RECERR RECAPIKRN | kRecDeleteZone (HPAGE hPage, int nZone)
Deleting a user zone.
void RECAPIKRN | kRecInitZone (LPZONE pZone)
Initializing a ZONE variable.
RECERR RECAPIKRN | kRecInsertZone (HPAGE hPage, IMAGEINDEX iiImg, LPCZONE pZone, int nZone)
Inserting a user zone.
RECERR RECAPIKRN | kRecAddZoneRect (HPAGE hPage, IMAGEINDEX iiImg, const RECT *pRect, int nZone)
Adding a rectangle to a user zone.
RECERR RECAPIKRN | kRecSubZoneRect (HPAGE hPage, IMAGEINDEX iiImg, const RECT *pRect, int nZone)
Subtracting a rectangle from a user zone.
RECERR RECAPIKRN | kRecSetZoneBorder (HPAGE hPage, int nZone, ZONE_BORDER_TYPE ZoneBorderType, int CellCount)
Setting the border type of a zone.
RECERR RECAPIKRN | kRecGetZoneBorder (HPAGE hPage, int nZone, ZONE_BORDER_TYPE *pZoneBorderType, int *pCellCount)
Getting the border type of zone.
RECERR RECAPIKRN | kRecCopyOCRZones (HPAGE hPage)
Copying the OCR zone list to a user zone list.
RECERR RECAPIKRN | kRecLoadZones (HPAGE hPage, LPCTSTR pFileName)
Loading user zones.
RECERR RECAPIKRN | kRecSaveZones (HPAGE hPage, LPCTSTR pFileName)
Saving the user zone list.
RECERR RECAPIKRN | kRecUpdateZone (HPAGE hPage, IMAGEINDEX iiImg, LPCZONE pZone, int nZone)
Updating a user zone.
RECERR RECAPIKRN | kRecSetZoneLayout (HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pRects, int nRects, int nZone)
Updating the user zone shape information.
RECERR RECAPIKRN | kRecGetOCRZoneCount (HPAGE hPage, int *pnOCRZones)
Getting the OCR zone count.
RECERR RECAPIKRN | kRecGetOCRZoneInfo (HPAGE hPage, IMAGEINDEX iiImg, LPZONE pOCRZone, int nOCRZone)
Getting OCR zone information.
RECERR RECAPIKRN | kRecGetOCRZoneData (HPAGE hPage, IMAGEINDEX iiImg, LPZONEDATA pOCRZoneData, int nOCRZone)
Getting additional information about OCR zones.
RECERR RECAPIKRN | kRecGetOCRZoneLayout (HPAGE hPage, IMAGEINDEX iiImg, LPRECT *ppRects, int *pnRects, int nZone)
Getting OCR zone shape information.
RECERR RECAPIKRN | kRecGetOCRZoneNodeArray (HPAGE hPage, IMAGEINDEX iiImg, LPPOINT *ppPoints, int *pnNodes, int iZone)
Getting the polygon of the OCR zone.
RECERR RECAPIKRN | kRecSaveOCRZones (HPAGE hPage, LPCTSTR pFileName)
Saving the OCR zone list.
RECERR RECAPIKRN | kRecUpdateOCRZone (HPAGE hPage, IMAGEINDEX iiImg, LPCZONE pZone, int nZone)
Updating the OCR zone.
RECERR RECAPIKRN | kRecLocateHandwriting (int sid, HPAGE hPage, LOCATEHANDWRITINGMODE mode, LPCRECT pRect)
Find/remove handwriting on/from the given image.
RECERR RECAPIKRN | kRecCreateHandwritingPage (int sid, HPAGE hPage, HPAGE *phPageOut, CREATEHANDWRINGPAGEMODE mode, LPCRECT pRect)
Find/separate handwriting on the given image.

Bitmasks of checking control

Defining spell checking behavior by zones. See ZONE::chk_control.

#define | CHK_LANGDICT_PROHIBIT 0x00000001
Prohibit the use of the Language dictionary.
#define | CHK_USERDICT_PROHIBIT 0x00000002
Prohibit the use of the user dictionary.
#define | CHK_CHECKCBF_PROHIBIT 0x00000004
Deprecated.
#define | CHK_VERTDICT_PROHIBIT 0x00000008
Prohibit the use of the Vertical dictionary.
#define | CHK_IGNORE_WHITESPACE 0x00000010
Ignore white space characters (SPACE and TAB characters) during checking. This field should be used together with the CHK_PASS_LINES flag.
#define | CHK_IGNORE_CASE 0x00000020
Case insensitive UD-checking.
#define | CHK_PASS_LINES 0x00000040
Instructs the selected RECOGNITIONMODULE to pass entire lines to the checker, instead of words. Do not use this attribute in conjunction with spell checking.
#define | CHK_CORRECTION_DISABLED 0x00000080
Retained only for compatibility.
#define | CHK_INCLUDE_PUNCTUATION 0x00000100
Checking will consider punctuation characters on the boundaries of the strings as well.
#define | CHK_CORRECT_PROPERNAMES 0x00000200
Retained only for compatibility.
#define | CHK_LANGDICT_USED 0x00010000
"After recognition flag": the Language dictionary was enabled during the checking process (spell checking was activated for the zone).
#define | CHK_USERDICT_USED 0x00020000
"After recognition flag": the user dictionary was enabled during the checking process (UD-checking was activated for the zone).
#define | CHK_CHECKCBF_USED 0x00040000
Deprecated.
#define | CHK_VERTDICT_USED 0x00080000
"After recognition flag": a Vertical dictionary was enabled during the checking process.

Filling modes for extended page parsing

These flags describe the different filling modes possibly used on the page for helping the automatic zone locating process. These flags are combinable and to be passed to the function kRecLocateZonesEx.

#define | LZX_OMNIFONT 1
Find machine print zones. See also FM_OMNIFONT.
#define | LZX_HANDPRINT 2
Find handprint zones. See also FM_HANDPRINT.
#define | LZX_BARCODE 4
Find 1D and 2D barcode zones. See also FM_BARCODE.
#define | LZX_MRZ 8
Find MRZ zones. See also FM_MRZ.

Page Descriptor defines

Defining behavior of auto-zoning outside user zones. See the usage of page descriptor.

#define | LZ_COLUMN_MASK 0x000000ff
This can be used for masking the LZ_COLUMN flag.
#define | LZ_COLUMN_NO 0x00000001
This does not find text zones on the page.
#define | LZ_COLUMN_ONE 0x00000002
The page contains one column (single column mode).
#define | LZ_COLUMN_AUTO 0x00000004
This finds text zones on the page automatically.
#define | LZ_COLUMN_FIND 0x00000008
Internal use only.
#define | LZ_TABLE_MASK 0x0000ff00
This can be used for masking the LZ_TABLE flag.
#define | LZ_TABLE_NO 0x00000100
This does not find tables on the page.
#define | LZ_TABLE_ONE 0x00000200
The whole page is one table.
#define | LZ_TABLE_AUTO 0x00000400
This finds table zones automatically.
#define | LZ_GRAPHICS_MASK 0x00ff0000
This can be used for masking the LZ_GRAPHICS flag.
#define | LZ_GRAPHICS_NO 0x00010000
This does not find graphics on the page.
#define | LZ_GRAPHICS_ONE 0x00020000
The whole page is one graphic.
#define | LZ_GRAPHICS_AUTO 0x00040000
This finds graphic zones automatically.
#define | LZ_FORM 0x01000000
#define | LZ_FREEFORM 0x02000000
This can be used for recognition of free forms. This is when a page contains a filled, gridded form, and the best possible OCR accuracy is desired, without creating formatted output. In this case the gridded form is decomposed into smaller text zones optimized for OCR. The zones are not sorted by reading order. It cannot be combined with LZ_FORM. It is used only by DCM_STANDARD method.

Detailed Description

Zone handling tools.

The zoneis a rectangular area or the union of specifically located rectangular areas in the page. The upper limit of its dimensions is full page size. It also contains a feature of interest to the user.

The union of rectangles must have a so-called pizzabox shape: the top of each rectangle in the union must touch the bottom of the upper rectangle (i.e. the bottom of the upper one and the top of the lower one is exactly the same). A rectangle can touch at most one rectangle above and one below.
Zones that cannot have a pizzabox shape include:

  • Table zones - they must be rectangular,
  • Vertical text zones for CCJK or Western languages - they must be rectangular,
  • OMR zones (see FM_OMR, RM_OMR) - these zones may also contain non-touching rectangles.

A pizzabox-shaped zone is a compound and irregular zone.
The image data covered by each zone is handled and processed (typically recognized) separately, according to zone-specific parameters.

NOTE: In both the SDK and its documentation coordinates refer to grid-coordinates - i.e. the top or left borders of pixels. Thus a rectangle does not contain the pixels according to its right and bottom coordinates.

Any HPAGE can contain two types of zones in zone lists:

  • user zones and
  • OCR zones.

The user zones are defined by the User. The OCR zones are created by the page parser process, which detects the OCR zones and fills the OCR zone list. When there are user zones, the page parser creates one or more OCR zones from each user zone and it may process the area outside of user zones, as controled by the page descriptor (see below).

IMPORTANT: The CSDK does not support overlapping non-graphical user zones. A graphical user zone (WT_GRAPHIC) can overlap non-graphical ones. Furthermore, the auto zoning algorithm may create graphical OCR zones overlapping non-graphical ones.

The type of OCR zones never can be WT_AUTO and WT_IGNORE. The created OCR zones always inherit the attributes (e.g.: filter, filling method, etc.; see ZONE) of the user zone inside which they were created. If an OCR zone is created outside user zones, its attributes will be set to default for filling method, recognition module, filters and spell checking related properties.

The recognition process (kRecRecognize) works on OCR zones.

The number of zones in the zone lists can be queried at any time using the functions kRecGetZoneCount and kRecGetOCRZoneCount. All functions that use an index to determine the zone to be queried or modified may receive the index -1. This refers to the last zone in the given zone list. Exception: kRecInsertZone : Assign the value -1 to have the new zone inserted at the end of the zone list. From then on the value -1 refers to this inserted zone.

Zones can be added to the appropriate zone list of any given HPAGE in three different ways:

  1. add zones automatically (auto-zoning) - use it to add OCR zones
  2. add zones manually (by specifying the zone coordinates and attributes - use it to add user zones, or
  3. add zones from a zone file (a storage file) - use it to add user zones.

Auto-zoning

Automatic page-layout decomposition process (auto-zoning) can be activated directly by calling the kRecLocateZones function for finding text blocks on the image. It creates an entire OCR zone list for the given HPAGE.

OmniPage Capture SDK v2025.1 offers three different algorithms to be applied during auto-zoning: use the kRecSetDecompMethod function to specify the Page parser algorithm to be applied during auto-zoning. For details, see also IMG_DECOMP.

When you use auto-zoning, each resulting zone is initialized with

  • the zone's detected coordinates,
  • the determined zone type (any ZONETYPE except WT_AUTO and WT_IGNORE).

All zones created by this function will have

  • the default filling method FM_DEFAULT,
  • the automatic recognition module selection RM_AUTO setting,
  • the FILTER_DEFAULT Character Set filter, to specify the use of global filtering, if any; and
  • none of the checking prohibit flags (e.g. CHK_LANGDICT_PROHIBIT) set. NOTE: The only exception from the above is when creating OCR zones from user zones that were added before auto-zoning. In this case, OCR zones inherit the attributes of the corresponding user zones.

If auto-zoning uses the method DCM_STANDARD, the process will also attempt finding horizontal and vertical rule lines. If there are user zones, auto-zoning searches for rule lines in WT_AUTO and WT_TABLE zones and also outside the user zones - when the page descriptor allows it (see Page Descriptor defines). If there are no user zones, rule line detection is performed. Rule lines are stored in the page, in a line list. The recognition process (PID_RECOGNITION1 et al.) modifies this line list and it retains only the lines that are outside the OCR zones. After zoning, the line list does not contain dotted, dashed or double style lines (RLSTYLE). This information only becomes available after the recognition process.

OCR zones may be changed by the recognition process (kRecRecognize), because some post-processing operations have such effects. For example, when non-gridded table detection (kRecSetNongriddedTableDetect) runs during the recognition process.

Any zone can be locally overridden with the functions kRecUpdateZone and kRecUpdateOCRZone. These allow you to change the attributes of a zone in the zone list. Note that the fields ZONE::rectBBox, and ZONE::type cannot be modified by kRecUpdateOCRZone.

Adding zones manually

You can choose to search for zones automatically, and/or create your own zones: user zones. To add simple zones to the zone list manually, use the kRecInsertZone function. To add a rectangle to or subtract a rectangle from an existing user zone, use the functions kRecAddZoneRect or kRecSubZoneRect.

Adding zones from a zone file

The third way of creating zones is to have zones read from a file (called a zone file, or in OmniPage terminology, a zone template file) that contains the attributes of previously saved zones. Zones created this way will also be user zones. An integrating application can save the current user zone definitions to a zone file any time with the kRecSaveZones function. The application can load them from a zone file with the kRecLoadZones function.

NOTE: When a zone file is loaded, any previous zones are removed from the page.

If the application calls the kRecRecognize recognizing function on a page with an empty zone list, the page-layout decomposition function is called automatically.

It is recommended to create homogeneous user zones as much as possible, because they may give better results. It is especially important in the case of Asian languages (either CCJK, Arabic, Thai or Hebrew). WT_AUTO zones can be inhomogeneous.

To get information about any particular zone in the image zone list, invoke the kRecGetZoneInfo and kRecGetOCRZoneInfo functions. These functions are useful to find out more about zones created by auto-zoning.

NOTE: When you update a table-type zone with the kRecUpdateZone function, the cell-detection algorithm will not be activated, resulting in improper table detection within the zone. See the description of creation of table information.

Any changes in user zone list (kRecInsertZone, kRecDeleteZone, kRecDeleteAllZones, kRecAddZoneRect, kRecSubZoneRect, kRecLoadZones, kRecUpdateZone, kRecSetZoneLayout) will make OCR zones invalid; the OCR zone list will be emptied and regenerated.

Usage of Page Descriptor

The page description describes the possible layout elements (text, table, graphics and form) on the page outside of the user zones. These layout elements are found by the page parsing (i.e. zoning) and the recognition processes. The page description has no effect inside the user zones. The LZ_COLUMN / LZ_TABLE / LZ_GRAPHICS flags specify how to find text / table / graphic zones.

A valid page descriptor is either a single LZ_FORM flag (see Form Recognition Module), or a combination (logical OR) of several other bits. These combinable bits are the LZ_COLUMN_column, LZ_TABLE_table and LZ_GRAPHICS_graphics flags, (where column, table and graphics can be NO, ONE and AUTO) and the LZ_FREEFORM flag.

The default page descriptor is 0. This means that page parsing does not create OCR zones outside of the user zones. If no user zones were specified the default value 0 is equivalent to LZ_COLUMN_AUTO | LZ_TABLE_AUTO | LZ_GRAPHICS_AUTO, i.e. automatic zoning is done on the whole page detecting these 3 kinds of zones.

When LZ_FREEFORM is combined (OR'd) with the other flags (or used alone, i.e. combined with the default 0), the normal functioning of the page parsing process is changed to create smaller text zones if necessary, in order to optimize OCR. Even though this flag can be combined with any of the LZ_TABLE flags, tabular structures are not detected as table cells, just as separate zones. It makes this flag most useful when form data is to be extracted from the page without re-constructing the page layout in a formatted output. Combining this flag with LZ_GRAPHICS_NO could make OCR accuracy even better when free forms are to be processed and formatted output (with pictures) is not desired.

LZ_GRAPHICS_NO means that no pictures or graphic areas will be returned as WT_GRAPHIC zones. Page parsing still detects such areas on the page, so no text zones are created on those areas that would return just garbage. Anyway, using LZ_GRAPHICS_NO hints the page parser that any characters found on the page should be part of a text zone. This can improve data extraction accuracy on free forms.

The LZ_TABLE_ONE and LZ_GRAPHICS_ONE flags specify that the whole page is either a single table, or a single picture. If one of them is specified, other zone types are not considered for detection. If both LZ_TABLE_ONE and LZ_GRAPHICS_ONE are specified the zoning works as if only LZ_TABLE_ONE was set. These two ONE flags cannot be combined with LZ_FREEFORM.

The DCM_LEGACY and DCM_FAST mode zoning can handle only the following cases:

  • Page descriptor is 0: this is the default, works as described above
  • LZ_COLUMN_AUTO | LZ_TABLE_AUTO | LZ_GRAPHICS_AUTO: only when there is no user zone
  • LZ_COLUMN_ONE | LZ_TABLE_AUTO | LZ_GRAPHICS_AUTO: only when there is no user zone
  • LZ_COLUMN_NO | LZ_TABLE_NO | LZ_GRAPHICS_NO: only when there are user zones
  • Any page descriptor value with a single WT_AUTO user zone, which covers the whole page

any other cases cause an error (API_ERROR_ERR).

Page descriptor can be specified by the function kRecSetPageDescription.

IMPORTANT NOTE: if the page descriptor is set to LZ_FORM, there must not be any zones on the page. Note also that LZ_FORM cannot be combined with other flags. See Form Recognition Module for usage details.

Backwards compatible combination: In versions before 22.0 the default value of this setting was LZ_COLUMN_NO | LZ_TABLE_NO | LZ_GRAPHICS_NO having a non-intuitive meaning in cases when there are no user zones defined; in that case it means LZ_COLUMN_AUTO | LZ_TABLE_AUTO | LZ_GRAPHICS_AUTO. While this LZ_COLUMN_NO | LZ_TABLE_NO | LZ_GRAPHICS_NO combination is defined now only when there are user zones, the old "auto" meaning is still maintained for backwards compatibility. Anyway, new applications must use the 0 value for this purpose.

Note that the change in the default value has an effect on previously invalid combinations. For example the meaning of a single LZ_TABLE_AUTO bit value (that was illegal before version 22.0) is like this:

  • When there are user zones, it means that automatic table detection is to be done on the areas not covered by the user zone. There is no change in this meaning in versions before and after 22.0.
  • When there are no user zones, the meaning differs between versions: in old versions it was an illegal value, but it was interpreted as LZ_COLUMN_NO | LZ_TABLE_AUTO | LZ_GRAPHICS_NO. Starting from 22.0 it is a legal value, but the meaning is different: unspecified (0) fields have AUTO meaning, so it is equivalent to LZ_COLUMN_AUTO | LZ_TABLE_AUTO | LZ_GRAPHICS_AUTO!

Other related information

Table detection and handling by Table Recognition Module are also parts of this module.

The working of the Zone Handling Module can also be adjusted with settings in some points.

Detection of filling method of zones

There are multiple ways of doing automatic filling method detection:

  1. When a user defined zone's fm field is FM_AUTO_HAND, then automatic machine print vs. handprint detection is done by the kRecLocateZones function. The detection is done zone by zone, on all FM_AUTO_HAND zones. It is the most accurate filling method detection, available from version 22.0, but it works on user defined zones only and detects these two filling methods only (machine print and handprint).
  2. The older kRecDetectFillingMethod function can be used either on user defined FM_DEFAULT zones, or (after calling kRecLocateZones) on automatic OCR zones. When the FILLINGMETHOD* output parameter of this function is NULL, the function works zone by zone, detecting if the zone contains handprint, machine print, dot-matrix print (9 and 24 pin), or barcode.
  3. Another use of this function is when the output argument is not NULL: in this case a single, page-specific filling method value is returned only, that tells what the most general filling method of the page is, considering the specified zones only.
  4. The final case is when kRecDetectFillingMethod is not called and there are FM_DEFAULT zones. Normally in this case there is no filling method detection is done, the zones inherit the value of the default filling method (kRecSetDefaultFillingMethod). But if this default value itself is also FM_DEFAULT, that is a special case: then filling method detection (kRecDetectFillingMethod) is called automatically at the beginning of the recognition process.

If filling method detection cannot determine a type in a given zone, it leaves FM_DEFAULT in the field fm of the zone.

During recognition if both the default filling method and the field ZONE::fm are FM_DEFAULT, the engine supposes FM_OMNIFONT filling method for such zones.

Vertical text support

For Western languages, including Greek and languages using the Cyrillic alphabet, automatic detection of left or right rotated vertical text is available, including detection inside table cells.

  • Multi-line table cell content can be detected for all input file types, providing the cell borders are visible.
  • For PDF files containing a text layer auto-detection will find both single- and multi-line vertical texts anywhere on the page.
  • However for other input file types, beyond table cell handling, only single-line caption-style texts near diagrams or pictures or at the border of the page can be auto-detected.

Auto-detected vertical text zones outside tables take the flags WT_LEFTTEXT or WT_RIGHTTEXT while table cells detected as containing vertical text now include this in the CELL_INFO data.

This auto-detection runs on images with no inserted user zones, or on page portions designated for auto-zoning. Text direction can be forced by inserting user zones into page images containing Western or Cyrillic languages, using the following flags: normal (WT_FLOW), left rotated vertical (WT_LEFTTEXT) or right rotated vertical (WT_RIGHTTEXT). Vertical text user zones must be rectangular; they can be placed anywhere on the page and can cover multi-line texts. To force vertical text handling in a table cell, the required flag should be set in the new text type field inside CELL_INFO.

Automatic left and right text detection can be disabled by switching the Kernel.Decomp.FindRotatedText setting off. Switch this setting off if the processed document does not contain vertical text, because the vertical text detection (and recognition) may increase processing time.

Vertical text can also be auto-detected for CCJK languages. Alternatively, it can be explicitly set by inserting zones with the flags WT_FLOW for horizontal left-to-right text or WT_VERTTEXT for vertical text with top-to-bottom character flow and right-to-left line flow. As for Western languages, CCJK vertical text zones must be rectangular. If an irregular zone is changed to vertical text content, its shape snaps to a bounding rectangle, removing the irregularity. It is not possible to pass text direction information for table cells to the Asian OCR module – it will perform auto-detection.

In the recognition results, the LETTER structure makeup field contains two additional bits to store the text direction. See also which output converters and formatting levels of the RecAPIPlus support the different types of vertical texts.

Macro Definition Documentation

◆ LZ_FORM

#define LZ_FORM 0x01000000

The page contains an unfilled form. Do not create any user zones if you use LZ_FORM! See Form Recognition Module as well. LZ_FORM works with western languages only. Non-supported languages return with the error code NOT_IMPL_ERR.

Typedef Documentation

◆ ZONE

typedef struct _ZONE ZONE

ZONE structure.

The ZONE structure contains all the necessary information for describing a zone. A zone is a rectangular or pizza-box shaped area on an image (Only OMR zones can be non-pizza-box shaped; and table zones and vertical text zones must be rectangular), but ZONE contains only its bounding box. It contains a feature of interest to the user. The image data covered by each zone is handled and processed (typically recognized) separately. A very first classification of the zones is their type: whether a zone's area is to be recognized or it should be treated as graphic. Zones containing textual information can be either flowed type or table type zones. This basic classification of zones helps the Engine to handle the textual information correctly. Zones are always associated with a FILLINGMETHOD filling method and one of the available RECOGNITIONMODULE recognition modules. These determine what kind of recognition algorithm is applied to the zone during its processing. For possible RM-FM pairs see Filling method - Recognition module combinations.

Note
Zones in a page are built into a sequential list, called the zone list. Each zone receives an internal index number, reflecting its position in this list. In some cases this zone order even determines the zone content order in the final output document. The index of the first zone in the zone list is zero (0).
It is recommended to create homogeneous user zones as much as possible, because they may give better results. It is especially important in the case of Asian languages. WT_AUTO zones can be inhomogeneous.

Enumeration Type Documentation

◆ CREATEHANDWRINGPAGEMODE

enum CREATEHANDWRINGPAGEMODE

kRecCreateHandwritingPage modes

These types can be used to specify the processing mode of kRecCreateHandwritingPage.

Enumerator
CHP_FIND_HANDWRITING | hPage will not change. *phPageOut will contain the handwriting only and it will contain the handwriting zones.
CHP_SEPARATE_HANDWRITING | Handwriting will be removed from hPage. *phPageOut will contain only the handwriting, and it will contain the handwriting zones.

◆ FILLINGMETHOD

enum FILLINGMETHOD

Filling methods.

This enumerates the possible content types of the zones from the Engine's perspective. Each zone must have one of the filling methods listed here. It can be done by specifying the fm field of the zones defined on the image.

Note
Each zone needs to be associated with a RECOGNITIONMODULE (RM) and a FILLINGMETHOD (FM). This is needed because some RMs support more than one FM, and some FMs are accepted by more than one RM. It is important to ensure that the RM-FM pair is suitable. For possible RM-FM pairs see Filling method - Recognition module combinations.
Enumerator
FM_DEFAULT | The default zone filling method. The actual zone filling method for all zones of this type will be inquired just before recognition, according to the setting previously specified with a separate call to the kRecSetDefaultFillingMethod function.
FM_OMNIFONT | The omnifont zone filling method. It denotes a machine printed text with any typeface not highly stylized. All platforms.
FM_DRAFTDOT9 | The 9-pin draft dot-matrix zone filling method. It denotes a 9-pin draft dot-matrix printout. Supported on: Windows.
FM_BARCODE | The barcode zone filling method. It denotes a zone with 1D or 2D (one- or two-dimensional) barcodes. All platforms.
FM_OMR | The optical mark zone filling method. It denotes a zone with one or more checkboxes that are judged to be marked or unmarked. All platforms.
FM_HANDPRINT | The hand-written zone filling method. It denotes hand-written text within the zone. Supported on: Windows, Linux. and MacOS x64
FM_BRAILLE | This filling method is NOT available.
FM_DRAFTDOT24 | The 24-pin draft dot-matrix zone filling method. It denotes a 24-pin draft dot-matrix printout. All platforms.
FM_OCRA | The OCR-A zone filling method. All platforms.
FM_OCRB | The OCR-B zone filling method. All platforms.
FM_MICR | The magnetic ink character filling method. Supported on: Windows, Linux, Embedded Linux. and MacOS x64
FM_BARCODE2D | The 2D barcode zone filling method.
FM_DOTDIGIT | The dot-digit zone filling method. Supported on: Windows.
FM_DASHDIGIT | The dash-digit zone filling method. Supported on: Windows.
FM_RESERVED_2 | Internal use only.
FM_CMC7 | The CMC7 font zone filling method. Supported on: Windows, Linux, Embedded Linux. and MacOS x64
FM_NO_OCR | No recognition will be attempted.
FM_AUTO_HAND | Automatic detection: the zone is either machineprint or handprint
FM_AUTO_BAR | Automatic detection: the zone is either machineprint or barcode
FM_MRZ | The MRZ zone filling method. It denotes a 2 or 3-line Machine Readable Zone area on ID cards. All platforms.
FM_SIZE | Number of zone filling methods.

◆ IMG_DECOMP

enum IMG_DECOMP

Page parse method.

This enum lists the possible values of the Page parser algorithm settings of the Engine. This setting makes it possible to specify one of the three different page parser algorithms for Latin-alphabet languages, or one of the two different algorithms for CCJK and Arabic languages. In the latter case DCM_LEGACY and DCM_FAST are the same. In addition, this setting co-operating with trade-off affects on the accuracy of embedded English text recognition of the Arabic Recognition module.

Enumerator
DCM_AUTO | Automatic. The Engine determines at runtime which algorithm will be applied. This depends on the trade-off setting: DCM_LEGACY algorithm is applied when trade-off is TO_FAST, otherwise DCM_STANDARD is applied (Default.)
DCM_LEGACY | Simple page decomposition. This is faster but less accurate than Standard.
DCM_STANDARD | The most accurate page parsing module.
DCM_FAST | For non-Asian languages this algorithm can be treated as a simplified variant of DCM_LEGACY: this algorithm does not try to find tables on the page. It is the fastest (but least accurate) parsing algorithm available. Use it only for simple page parsing tasks! For CCJK and Arabic languages this is the same as DCM_LEGACY.

◆ LOCATEHANDWRITINGMODE

enum LOCATEHANDWRITINGMODE

kRecLocateHandwriting modes

These types can be used to specify the processing mode of kRecLocateHandwriting.

Enumerator
LH_RETAIN_HANDWRITING | Find handwriting and remove anything else from hPage. Return the handwriting zones.
LH_REMOVE_HANDWRITING | Remove handwriting from hPage.

◆ RECOGNITIONMODULE

enum RECOGNITIONMODULE

Recognition modules (Engines)

This enumerates the different recognition modules of the Engine available to the integrating application. All zones must have an assigned recognition module in their rm fields before processing.

Note
Only those recognition modules that have been supplied, licensed and successfully installed in the Engine configuration will be available.
The RM_AUTO setting can be specifically placed in the zone's rm field. It is also generated by the kRecLocateZones (auto-zoning) function and, under specific circumstances, by the function kRecDetectFillingMethod.
Each zone needs to be associated with a RECOGNITIONMODULE (RM) and a FILLINGMETHOD (FM). This is needed because some RMs support more than one FM, and some FMs are accepted by more than one RM. It is important to ensure that the RM-FM pair is suitable. For possible RM-FM pairs see Filling method - Recognition module combinations.
Enumerator
RM_AUTO | Specifies that the Engine will automatically attempt to select the most suitable recognition module for the zone. This will be determined just before recognition, according to the zone's filling method and, if necessary, other settings (most typically the Character Set).
RM_OMNIFONT_MTX | Specifies the M/TEXT omnifont recognition module. Supported on: Windows.
RM_OMNIFONT_MOR | Specifies the multi-lingual MOR omnifont recognition module. Supported on: Windows, Linux. and MacOS x64
RM_DOT | Specifies the DOT 9-pin draft dot-matrix recognition module. Supported on: Windows.
RM_BAR | Specifies the BAR barcode recognition module. All platforms.
RM_OMR | Specifies the OMR optical mark recognition module. All platforms.
RM_HNR | Specifies the HNR handprinted numeral recognition module. Supported on: Windows.
RM_RER | Specifies the third-party RER reRecognition Handprint recognition module. Supported on: Windows, Linux. and MacOS x64
RM_BRA | This recognition module is NOT supported.
RM_MAT | Specifies the MAT matrix matching recognition module. Supported on: Windows.
RM_RESERVED_P | Internal use only. Must NOT be selected.
RM_OMNIFONT_PLUS2W | 2-way voting engine. All platforms.
RM_OMNIFONT_FRX | FRX engine. All platforms.
RM_OMNIFONT_PLUS3W | 3-way voting engine. Supported on: Windows, Linux, MacOS.
RM_ASIAN | Asian engine from Tsinghua All platforms.
RM_RESERVED_M | Internal use only. Must NOT be selected.
RM_RESERVED_A | Internal use only. Must NOT be selected.
RM_ARABIC | Arabic engine from Tsinghua All platforms.
RM_SIZE | Number of available recognition modules.

◆ ZONE_BORDER_TYPE

enum ZONE_BORDER_TYPE

Zone border types.

Types of zone border of printed handwritten text. See kRecSetZoneBorder.

Enumerator
ZBT_PURE_TEXT | Pure text without border.
ZBT_FRAMED_PURE_TEXT | The text is enclosed by a frame.
ZBT_SHORT_COMB | The text is in a comb.
ZBT_FRAMED_SHORT_COMB | The text is in a comb which is enclosed by a frame.
ZBT_INDIVIDUAL_BOXES | The characters are in separate boxes.
ZBT_FRAMED_FULL_COMB | The text is enclosed by a frame, the characters are separated by vertical lines.
ZBT_UNDERLINED_TEXT | The text is underlined.
ZBT_GRAY_BOXES | The characters are in white fields on gray background.
ZBT_SIZE | Number of border types.

◆ ZONETYPE

enum ZONETYPE

Basic zone types.

Enumerator
WT_FLOW | Flowed text. This zone type means that the zone contains textual information arranged horizontally without a table type structure inside. Inside a user zone of this type kRecLocateZones creates one OCR zone of the same type. It can be in OCR zones and user zones. It can also be used for horizontally appearing CCJK characters.
WT_TABLE | Table type zone. This type means that the zone contains a table, i.e. rows and columns, with or without a grid. Such zones will be handled differently from flowed text type zones. Inside a user zone of this type kRecLocateZones creates one OCR zone of the same type. The Engine will try to reconstruct as much of the original table text layout of the zone as the final output document format supports.
WT_GRAPHIC | Graphic type zone. This type of zone contains graphics, i.e. this zone will not be recognized at all and all other recognition related settings will be ignored. The only reason to have such a zone is to save or export the image inside it. Inside a user zone of this type kRecLocateZones creates one OCR zone of the same type.
WT_AUTO | Inside a user zone of this type kRecLocateZones performs a parsing algorithm and it may create several OCR zones of any types except WT_AUTO, WT_IGNORE and WT_FORM. This type can only be in user zones.
WT_IGNORE | Ignore zone. kRecLocateZones does not create OCR zones inside a user zone of this type.
WT_FORM | Form zone. Logical Form Recognition will run within this zone. It indicates an unfilled form and it should be set in the user zone before running kRecLocateZones. kRecLocateZones creates one OCR zone of the same type, the created OCR zone contains a description of the form objects. See also Form Recognition Module.
WT_VERTTEXT | Vertical text. For CCJK characters only.
WT_LEFTTEXT | Left rotated text. For Latin, Greek and Cyrillic characters only.
WT_RIGHTTEXT | Right rotated text. For Latin, Greek and Cyrillic characters only.

Function Documentation

◆ kRecAddZoneRect()

RECERR RECAPIKRN kRecAddZoneRect | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | const RECT * | pRect,
 |  | int | nZone )

Adding a rectangle to a user zone.

This function adds a new rectangle to an existing user zone. It creates their union. Because the new rectangle can overlap previous rectangles the function recalculates the rectangle list of the zone. The resulting union must be pizza-box except in the case of OMR zones. Of course, table zones and vertical text zones cannot receive new rectangles.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | The index of the image whose coordinate system you have used in defining the rectangle to be added. It is recommended to use II_CURRENT coordinates if possible.
[in] | pRect | The rectangle to be added to the given user zone.
[in] | nZone | The index of the user zone the new rectangle is added to.
Return values
RECERR
Note
The insertion of a new irregular zone can be performed only by rectangles. The first rectangle must be inserted by kRecInsertZone. The additional rectangles must be added by kRecAddZoneRect or removed by kRecSubZoneRect. The rectangle list of the given zone is automatically updated (the overlapping rectangles are recalculated, when subtracting the remaining (maybe non-rectangular) area is broken into rectangular areas, etc.), thus the ZONE passed to the function kRecInsertZone must have only the bounding box of the irregular zone’s first rectangle (it must not be the bounding box of the whole zone).
The CSDK does not support overlapping user zones, thus newly added rectangles must be disjoint with other zones (of course, except the nZone-th one).
Note that the index of the first zone in the zone list is zero (0).
Any changes in the user zone list provokes the deletion of the OCR zone list.
The specification of this function in C# is:
RECERR kRecAddZoneRect(IntPtr hPage, IMAGEINDEX iiImg, RECT pRect, int nZone);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
IMAGEINDEX
IMAGEINDEX
Index of each image type in HPAGE.
Definition KernelApi.h:991
kRecAddZoneRect
RECERR RECAPIKRN kRecAddZoneRect(HPAGE hPage, IMAGEINDEX iiImg, const RECT *pRect, int nZone)
Adding a rectangle to a user zone.
The specification of this function in Java is:
int kRecAddZoneRect(HPAGE hPage, IMAGEINDEX iiImg, RECT pRect, int nZone)
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
The specification of this function in Python is:
def kRecAddZoneRect(hPage: "HPAGE", iiImg: int, pRect: "RECT", nZone: int) -> int

◆ kRecCopyOCRZones()

RECERR RECAPIKRN kRecCopyOCRZones ( HPAGE hPage )

Copying the OCR zone list to a user zone list.

This function copies the OCR zones in the place of user zones. It leaves the OCR zones intact, but deletes the former user zones. It can be used to delete/insert/change user zones based on the OCR zones detected by a previous kRecLocateZones.

Parameters
[in] hPage Handle of the page.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecCopyOCRZones(IntPtr hPage);
kRecCopyOCRZones
RECERR RECAPIKRN kRecCopyOCRZones(HPAGE hPage)
Copying the OCR zone list to a user zone list.
The specification of this function in Java is:
int kRecCopyOCRZones(HPAGE hPage)
The specification of this function in Python is:
def kRecCopyOCRZones(hPage: "HPAGE") -> int

◆ kRecCreateHandwritingPage()

RECERR RECAPIKRN kRecCreateHandwritingPage | ( | int | sid,
 |  | HPAGE | hPage,
 |  | HPAGE * | phPageOut,
 |  | CREATEHANDWRINGPAGEMODE | mode,
 |  | LPCRECT | pRect )

Find/separate handwriting on the given image.

This function finds the handwriting on the page and creates a new HPAGE that will contain only the handwriting. The new HPAGE will contains the handwriting zones. Depending on the mode parameter the original HPAGE will not change or the handwriting will be removed from it. It is useful when these areas will be recognized by RM_RER or RM_HNR or another handwritten text recognizer. See also kRecLocateHandwriting.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | phPageOut | Address of a variable to store the handle of the created page that contains only the handwritings. Must be freed with kRecFreeImg if no longer needed.
[in] | mode | Specifies whether to change the original hPage or not.
[in] | pRect | Pointer to the rectangular area to be detected (II_CURRENT coordinate system is used). If it is NULL the entire image is processed.
Return values
RECERR
Note
See the description about processing handwritten text.
The specification of this function in C# is:
RECERR kRecCreateHandwritingPage(int sid, IntPtr hPage, out IntPtr phPage,
CREATEHANDWRINGPAGEMODE mode, RECT UserRect);
CREATEHANDWRINGPAGEMODE
CREATEHANDWRINGPAGEMODE
kRecCreateHandwritingPage modes
Definition KernelApi.h:3311
kRecCreateHandwritingPage
RECERR RECAPIKRN kRecCreateHandwritingPage(int sid, HPAGE hPage, HPAGE *phPageOut, CREATEHANDWRINGPAGEMODE mode, LPCRECT pRect)
Find/separate handwriting on the given image.
The specification of this function in C# Objects is:
Page.CreateHandwritingPage(out Page page, CREATEHANDWRINGPAGEMODE mode, RECT UserRect);
The specification of this function in Java is:
int kRecCreateHandwritingPage(int sid, HPAGE hPage, HPAGE phPageOut, CREATEHANDWRINGPAGEMODE mode, RECT pRect)
The specification of this function in Python is:
def kRecCreateHandwritingPage(sid: int, hPage: "HPAGE", mode: "CREATEHANDWRINGPAGEMODE", pRect: "RECT") -> Tuple[int, "HPAGE"]

◆ kRecDeleteAllZones()

RECERR RECAPIKRN kRecDeleteAllZones ( HPAGE hPage )

Deleting all user zones.

This function deletes all zones both in the user and the OCR zone list for the page.

Parameters
[in] hPage Handle of the page.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecDeleteAllZones(IntPtr hPage);
kRecDeleteAllZones
RECERR RECAPIKRN kRecDeleteAllZones(HPAGE hPage)
Deleting all user zones.
The specification of this function in Java is:
int kRecDeleteAllZones(HPAGE hPage)
The specification of this function in Python is:
def kRecDeleteAllZones(hPage: "HPAGE") -> int

◆ kRecDeleteZone()

RECERR RECAPIKRN kRecDeleteZone | ( | HPAGE | hPage,
 |  | int | nZone )

Deleting a user zone.

This function deletes a zone from the user zone list of the page.

Parameters
[in] | hPage | The handle of the page.
[in] | nZone | Index of the user zone to be deleted.
Return values
RECERR
Note
Note that the index of the first zone in the zone list is zero (0).
Any changes in the user zone list provokes deletion of the OCR zone list.
The specification of this function in C# is:
RECERR kRecDeleteZone(IntPtr hPage, int nZone);
kRecDeleteZone
RECERR RECAPIKRN kRecDeleteZone(HPAGE hPage, int nZone)
Deleting a user zone.
The specification of this function in Java is:
int kRecDeleteZone(HPAGE hPage, int nZone)
The specification of this function in Python is:
def kRecDeleteZone(hPage: "HPAGE", nZone: int) -> int

◆ kRecGetDecompMethod()

RECERR RECAPIKRN kRecGetDecompMethod | ( | int | sid,
 |  | IMG_DECOMP * | pAlgorithm )

Getting the decomp method.

This function inquires the current Page parser algorithm setting of the Engine.

Parameters
[in] | sid | Settings Collection ID.
[out] | pAlgorithm | The current page parser algorithm.
Return values
RECERR
Note
This function gets the value of the setting Kernel.Decomp.Method. This setting can be changed by kRecSetDecompMethod.
The specification of this function in C# is:
RECERR kRecGetDecompMethod(int sid, out IMG_DECOMP decompAlg);
IMG_DECOMP
IMG_DECOMP
Page parse method.
Definition KernelApi.h:2363
kRecGetDecompMethod
RECERR RECAPIKRN kRecGetDecompMethod(int sid, IMG_DECOMP *pAlgorithm)
Getting the decomp method.
The specification of this function in Java is:
int kRecGetDecompMethod(int sid, IMG_DECOMP[] pAlgorithm)
The specification of this function in Python is:
def kRecGetDecompMethod(sid: int) -> Tuple[int, int]

◆ kRecGetForceSingleColumn()

RECERR RECAPIKRN kRecGetForceSingleColumn | ( | int | sid,
 |  | INTBOOL * | pbForceSingle )

Getting the setting of Force Single Column mode.

This function inquires the current setting of the Force Single Column mode.

Parameters
[in] | sid | Settings Collection ID.
[out] | pbForceSingle | Address of a Boolean variable to hold the current Force Single Column mode setting.
Return values
RECERR
Note
This function gets the value of the setting Kernel.Decomp.ForceSingleColumn. This setting can be changed by kRecSetForceSingleColumn.
The specification of this function in C# is:
RECERR kRecGetForceSingleColumn(int sid, out bool bEnable);
kRecGetForceSingleColumn
RECERR RECAPIKRN kRecGetForceSingleColumn(int sid, INTBOOL *pbForceSingle)
Getting the setting of Force Single Column mode.
The specification of this function in Java is:
int kRecGetForceSingleColumn(int sid, int[] pbForceSingle)
The specification of this function in Python is:
def kRecGetForceSingleColumn(sid: int) -> Tuple[int, bool]

◆ kRecGetNongriddedTableDetect()

RECERR RECAPIKRN kRecGetNongriddedTableDetect | ( | int | sid,
 |  | INTBOOL * | bEnable )

Getting the non-gridded table detection setting.

This function specifies whether the non-gridded table detection feature of the Engine is enabled.

Parameters
[in] | sid | Settings Collection ID.
[out] | bEnable | The value of the current non-gridded table detection setting.
Return values
RECERR
Note
This function gets the value of the setting Kernel.Decomp.EnableNonGrid. This setting can be changed by kRecSetNongriddedTableDetect.
The specification of this function in C# is:
RECERR kRecGetNongriddedTableDetect(int sid, out bool bEnable);
kRecGetNongriddedTableDetect
RECERR RECAPIKRN kRecGetNongriddedTableDetect(int sid, INTBOOL *bEnable)
Getting the non-gridded table detection setting.
The specification of this function in Java is:
int kRecGetNongriddedTableDetect(int sid, int[] bEnable)
The specification of this function in Python is:
def kRecGetNongriddedTableDetect(sid: int) -> Tuple[int, bool]

◆ kRecGetOCRZoneCount()

RECERR RECAPIKRN kRecGetOCRZoneCount | ( | HPAGE | hPage,
 |  | int * | pnOCRZones )

Getting the OCR zone count.

This function gets the number of zones in the OCR zone list of the page.

Parameters
[in] | hPage | Handle of the page.
[out] | pnOCRZones | Address of an integer variable to get the number of zones.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetOCRZoneCount(IntPtr hPage, out int ZoneCount);
kRecGetOCRZoneCount
RECERR RECAPIKRN kRecGetOCRZoneCount(HPAGE hPage, int *pnOCRZones)
Getting the OCR zone count.
The specification of this function in Java is:
int kRecGetOCRZoneCount(HPAGE hPage, int[] pnOCRZones)
The specification of this function in Python is:
def kRecGetOCRZoneCount(hPage: "HPAGE") -> Tuple[int, int]

◆ kRecGetOCRZoneData()

RECERR RECAPIKRN kRecGetOCRZoneData | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPZONEDATA | pOCRZoneData,
 |  | int | nOCRZone )

Getting additional information about OCR zones.

This function can be used for getting additional information about any OCR zone in the OCR zone list of the page.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image in the page whose coordinate system is to be used to report the zone's boundary box.
[out] | pOCRZoneData | Pointer to a variable for storing the requested zone-data information.
[in] | nOCRZone | Index of the zone in the zone list, from which the information is requested.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
RECERR kRecGetOCRZoneData(IntPtr hPage, IMAGEINDEX iiImg, out ZONEDATA pOCRZoneData, int nOCRZone);
kRecGetOCRZoneData
RECERR RECAPIKRN kRecGetOCRZoneData(HPAGE hPage, IMAGEINDEX iiImg, LPZONEDATA pOCRZoneData, int nOCRZone)
Getting additional information about OCR zones.
ZONEDATA
ZONEDATA structure.
Definition KernelApi.h:1708
The specification of this function in Java is:
int kRecGetOCRZoneData(HPAGE hPage, IMAGEINDEX iiImg, ZONEDATA pOCRZoneData, int nOCRZone)
The specification of this function in Python is:
def kRecGetOCRZoneData(hPage: "HPAGE", iiImg: int, nOCRZone: int) -> Tuple[int, "ZONEDATA"]

◆ kRecGetOCRZoneInfo()

RECERR RECAPIKRN kRecGetOCRZoneInfo | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPZONE | pOCRZone,
 |  | int | nOCRZone )

Getting OCR zone information.

This function can be used for getting information about any zone in the OCR zone list of the page.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image in the page whose coordinate system is used to report the zone's boundary box.
[out] | pOCRZone | Pointer to a variable for storing the requested zone information.
[in] | nOCRZone | Index of the zone in the zone list, from which the information is requested.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
RECERR kRecGetOCRZoneInfo(IntPtr hPage, IMAGEINDEX iiImage, out ZONE pZone, int nZone);
kRecGetOCRZoneInfo
RECERR RECAPIKRN kRecGetOCRZoneInfo(HPAGE hPage, IMAGEINDEX iiImg, LPZONE pOCRZone, int nOCRZone)
Getting OCR zone information.
_ZONE
ZONE structure.
Definition KernelApi.h:1675
The specification of this function in Java is:
int kRecGetOCRZoneInfo(HPAGE hPage, IMAGEINDEX iiImg, ZONE pOCRZone, int nOCRZone)
The specification of this function in Python is:
def kRecGetOCRZoneInfo(hPage: "HPAGE", iiImg: int, nOCRZone: int) -> Tuple[int, "ZONE"]

◆ kRecGetOCRZoneLayout()

RECERR RECAPIKRN kRecGetOCRZoneLayout | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPRECT * | ppRects,
 |  | int * | pnRects,
 |  | int | nZone )

Getting OCR zone shape information.

This function can be used for getting information about the shape of any zone in the OCR zone list of the hPage page. For more information about the possible shape of the zones see the definition of pizza-box.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image in the page whose coordinate system is used to report the shape information.
[out] | ppRects | Pointer to an array of RECTs for storing the requested shape information.
[out] | pnRects | Pointer to number variable for storing the number of rectangles in the ppRects array.
[in] | nZone | Index of the zone in the zone list, from which the information is requested.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
Since this function creates a new memory object containing the shape RECTs, after evaluating the result, the application should call the kRecFree function to free this memory area.
The specification of this function in C# is:
RECERR kRecGetOCRZoneLayout(IntPtr hPage, IMAGEINDEX iiImg, out RECT[] ppRects, int nZone);
kRecGetOCRZoneLayout
RECERR RECAPIKRN kRecGetOCRZoneLayout(HPAGE hPage, IMAGEINDEX iiImg, LPRECT *ppRects, int *pnRects, int nZone)
Getting OCR zone shape information.
The specification of this function in Java is:
int kRecGetOCRZoneLayout(HPAGE hPage, IMAGEINDEX iiImg, RectArray ppRects, int nZone)
The specification of this function in Python is:
def kRecGetOCRZoneLayout(hPage: "HPAGE", iiImg: int, nZone: int) -> Tuple[int, "RectArray"]

◆ kRecGetOCRZoneNodeArray()

RECERR RECAPIKRN kRecGetOCRZoneNodeArray | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPPOINT * | ppPoints,
 |  | int * | pnNodes,
 |  | int | iZone )

Getting the polygon of the OCR zone.

This function retrieves the polygon made up of the OCR zone's vertices. This can be useful for an application with a GUI for drawing irregular zones.

Parameters
[in] | hPage | The handle of the page.
[in] | iiImg | Index of the image in the page whose coordinate system is used to report the points.
[out] | ppPoints | The pointer of the array of polygon points. This array is allocated by the function and can be freed via calling the function kRecFree.
[out] | pnNodes | The pointer of an integer retrieving the number of polygon vertices.
[in] | iZone | The index of the OCR zone in question.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
You cannot call this function on OMR zones (see FM_OMR, RM_OMR), because they may have non-pizzabox shapes.
If iiImg is II_ORIGINAL the polygon may have slanting edges.
Since this function creates a new memory object containing the nodes, the application should call the kRecFree function to free this memory area after evaluating the result.
The specification of this function in C# is:
RECERR kRecGetOCRZoneNodeArray(IntPtr hPage, IMAGEINDEX iiImg, out POINT[] ppPoints, int nZone);
kRecGetOCRZoneNodeArray
RECERR RECAPIKRN kRecGetOCRZoneNodeArray(HPAGE hPage, IMAGEINDEX iiImg, LPPOINT *ppPoints, int *pnNodes, int iZone)
Getting the polygon of the OCR zone.
The specification of this function in Java is:
int kRecGetOCRZoneNodeArray(HPAGE hPage, IMAGEINDEX iiImg, PointArray ppPoints, int iZone)
The specification of this function in Python is:
def kRecGetOCRZoneNodeArray(hPage: "HPAGE", iiImg: int, iZone: int) -> Tuple[int, "PointArray"]

◆ kRecGetPageDescription()

RECERR RECAPIKRN kRecGetPageDescription | ( | int | sid,
 |  | DWORD * | pPageDesc )

Getting page description data.

This function gets the current page description data.

Parameters
[in] | sid | Settings Collection ID.
[out] | pPageDesc | The actual Page Descriptor.
Return values
RECERR
Note
This function gets the value of the setting Kernel.Decomp.PageDesc. This setting can be changed by kRecSetPageDescription.
The specification of this function in C# is:
RECERR kRecGetPageDescription(int sid, out PAGEDESCRIPTION pPageDesc);
kRecGetPageDescription
RECERR RECAPIKRN kRecGetPageDescription(int sid, DWORD *pPageDesc)
Getting page description data.
The specification of this function in Java is:
int kRecGetPageDescription(int sid, long[] pPageDesc)
The specification of this function in Python is:
def kRecGetPageDescription(sid: int) -> Tuple[int, int]

◆ kRecGetZoneBorder()

RECERR RECAPIKRN kRecGetZoneBorder | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | ZONE_BORDER_TYPE * | pZoneBorderType,
 |  | int * | pCellCount )

Getting the border type of zone.

This function gets the border type of a zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Index of the user zone in question.
[out] | pZoneBorderType | Address of a variable to get the border type, see: ZONE_BORDER_TYPE.
[out] | pCellCount | Address of a variable to get the number of comb cells or boxes.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
RECERR kRecGetZoneBorder(IntPtr hPage, nZone, out ZoneBorder, out int CellCount);
kRecGetZoneBorder
RECERR RECAPIKRN kRecGetZoneBorder(HPAGE hPage, int nZone, ZONE_BORDER_TYPE *pZoneBorderType, int *pCellCount)
Getting the border type of zone.
The specification of this function in Java is:
int kRecGetZoneBorder(HPAGE hPage, nZone, ZoneBorder, int[] pCellCount)
The specification of this function in Python is:
def kRecGetZoneBorder(hPage: "HPAGE", nZone: int) -> Tuple[int, int, int]

◆ kRecGetZoneCount()

RECERR RECAPIKRN kRecGetZoneCount | ( | HPAGE | hPage,
 |  | int * | pnZones )

Getting the user zone count.

This function gets the number of zones in the user zone list for the page.

Parameters
[in] | hPage | Handle of the page.
[out] | pnZones | Address of an integer variable to get the number of zones.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetZoneCount(IntPtr hPage, out int pnZones);
kRecGetZoneCount
RECERR RECAPIKRN kRecGetZoneCount(HPAGE hPage, int *pnZones)
Getting the user zone count.
The specification of this function in Java is:
int kRecGetZoneCount(HPAGE hPage, int[] pnZones)
The specification of this function in Python is:
def kRecGetZoneCount(hPage: "HPAGE") -> Tuple[int, int]

◆ kRecGetZoneInfo()

RECERR RECAPIKRN kRecGetZoneInfo | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPZONE | pZone,
 |  | int | nZone )

Getting user zone information.

This function can be used for getting information about any zone in the user zone list of the page.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image in the page, whose coordinate system is used to report the zone's boundary box.
[out] | pZone | Pointer to a variable for storing the requested zone information.
[in] | nZone | Index of the zone in the zone list, from which the information is requested.
Return values
RECERR
Note
Note that the index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
RECERR kRecGetZoneInfo(IntPtr hPage, IMAGEINDEX iiImg, out ZONE pZone, int nZone);
kRecGetZoneInfo
RECERR RECAPIKRN kRecGetZoneInfo(HPAGE hPage, IMAGEINDEX iiImg, LPZONE pZone, int nZone)
Getting user zone information.
The specification of this function in Java is:
int kRecGetZoneInfo(HPAGE hPage, IMAGEINDEX iiImg, ZONE pZone, int nZone)
The specification of this function in Python is:
def kRecGetZoneInfo(hPage: "HPAGE", iiImg: int, nZone: int) -> Tuple[int, "ZONE"]

◆ kRecGetZoneLayout()

RECERR RECAPIKRN kRecGetZoneLayout | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPRECT * | ppRects,
 |  | int * | pnRects,
 |  | int | iZone )

Getting user zone shape information.

This function can be used for getting information about the shape of any zone in the user zone list of the hPage page. For more information about the possible zone shapes see the definition of pizza-box.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image in the page, whose coordinate system is used to report the requested zone shape.
[out] | ppRects | Pointer to an array of RECTs for storing the requested shape information.
[out] | pnRects | Pointer to a number variable for storing the number of rectangles in the ppRects array.
[in] | iZone | Index of the zone in the zone list, from which the information is requested.
Return values
RECERR
Note
Note that the index of the first zone in the zone list is zero (0).
Since this function creates a new memory object containing the shape RECTs, after evaluating the result, the application should call the kRecFree function to free this memory area.
The specification of this function in C# is:
RECERR kRecGetZoneLayout(IntPtr hPage, IMAGEINDEX iiImg, out RECT[] ppRects, int nZone);
kRecGetZoneLayout
RECERR RECAPIKRN kRecGetZoneLayout(HPAGE hPage, IMAGEINDEX iiImg, LPRECT *ppRects, int *pnRects, int iZone)
Getting user zone shape information.
The specification of this function in Java is:
int kRecGetZoneLayout(HPAGE hPage, IMAGEINDEX iiImg, RectArray ppRects, int iZone)
The specification of this function in Python is:
def kRecGetZoneLayout(hPage: "HPAGE", iiImg: int, iZone: int) -> Tuple[int, "RectArray"]

◆ kRecGetZoneNodeArray()

RECERR RECAPIKRN kRecGetZoneNodeArray | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPPOINT * | ppPoints,
 |  | int * | pnNodes,
 |  | int | iZone )

Getting the polygon of the user zone.

This function retrieves the polygon made up of the vertices of the user zone. This can be useful for an application with a GUI when drawing irregular zones.

Parameters
[in] | hPage | The handle of the page.
[in] | iiImg | Index of the image in the page, whose coordinate system is used to report the points.
[out] | ppPoints | The pointer of the array of polygon points. This array is allocated by the function and can be freed calling the function kRecFree.
[out] | pnNodes | The pointer of an integer retrieving the number of polygon vertices.
[in] | iZone | The index of the user zone in question.
Return values
RECERR
Note
Note that the index of the first zone in the zone list is zero (0).
You cannot call this function on OMR zones (see FM_OMR, RM_OMR), because they may have non-pizzabox shapes.
If iiImg is II_ORIGINAL the polygon may have slanting edges due to the deskew operation.
Since this function creates a new memory object containing the nodes, the application should call the kRecFree function to free this memory area after evaluating the result.
The specification of this function in C# is:
RECERR kRecGetZoneNodeArray(IntPtr hPage, IMAGEINDEX iiImg, out POINT[] ppPoints, int nZone);
kRecGetZoneNodeArray
RECERR RECAPIKRN kRecGetZoneNodeArray(HPAGE hPage, IMAGEINDEX iiImg, LPPOINT *ppPoints, int *pnNodes, int iZone)
Getting the polygon of the user zone.
The specification of this function in Java is:
int kRecGetZoneNodeArray(HPAGE hPage, IMAGEINDEX iiImg, PointArray ppPoints, int iZone)
The specification of this function in Python is:
def kRecGetZoneNodeArray(hPage: "HPAGE", iiImg: int, iZone: int) -> Tuple[int, "PointArray"]

◆ kRecInitZone()

void RECAPIKRN kRecInitZone ( LPZONE pZone )

Initializing a ZONE variable.

This function initializes a ZONE variable to default values.

Parameters
[in] pZone Pointer to the zone structure to be initialized.
Return values
none
Note
All the fields of the structure are set to a default value:
type = WT_FLOW;
fm = FM_DEFAULT;
rm = RM_AUTO;
filter = FILTER_DEFAULT;
chk_control = 0;
chk_fn = NULL;
chk_sect = "";
userdata = 0;
FILTER_DEFAULT
@ FILTER_DEFAULT
Definition KernelApi.h:731
WT_FLOW
@ WT_FLOW
Definition KernelApi.h:1550
RM_AUTO
@ RM_AUTO
Definition KernelApi.h:606
FM_DEFAULT
@ FM_DEFAULT
Definition KernelApi.h:553
The bounding box (ZONE::rectBBox) is set to 0, the real value must be set after this call.
In a C++ program it might be useful to create a CZone class based on ZONE and call kRecInitZone in the constructor.
The specification of this function in C# is:
RECERR kRecInitZone([In, Out] ZONE zone);
kRecInitZone
void RECAPIKRN kRecInitZone(LPZONE pZone)
Initializing a ZONE variable.
The specification of this function in Java is:
void kRecInitZone(ZONE pZone)
The specification of this function in Python is:
def kRecInitZone() -> "ZONE"

◆ kRecInsertZone()

RECERR RECAPIKRN kRecInsertZone | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPCZONE | pZone,
 |  | int | nZone )

Inserting a user zone.

This function inserts a new zone in the user zone list of the page. After inserting the zone, the zone list will be recalculated automatically. For information about insertion of irregular zones see notes.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image in the page whose coordinate system you have used in defining the boundary box for the new zone. It is recommended to use II_CURRENT coordinates if possible.
[in] | pZone | Pointer to the zone data to be inserted.
[in] | nZone | Index in the user zone list where the new zone should be inserted. Use zero (0) to insert the zone as the first element of the zone list. To insert a zone as the last element of the zone list, use -1.
Return values
RECERR
Note
The insertion of a new irregular zone can be performed only by rectangles. The first rectangle must be inserted by kRecInsertZone. The additional rectangles must be added by kRecAddZoneRect or removed by kRecSubZoneRect. The rectangle list of the given zone is automatically updated (the overlapping rectangles are recalculated; when zones are subtracted, the remaining (maybe non-rectangular) area is broken into rectangular areas, etc.), thus the ZONE passed to the function kRecInsertZone must have only the bounding box of the irregular zone’s first rectangle (it must not be the bounding box of the whole zone).
When inserting a zone, the application should initialize all the fields of the ZONE structure. The kRecInitZone function could be used for this purpose. The ZONE::rectBBox field does not have a meaningful default value, so it must always be directly initialized after kRecInitZone. If other fields are not changed then a WT_FLOW zone is created this way with default features.
The ZONE::type field of the zone to be inserted can be any ZONETYPE.
For successful zone insertion:
  • the whole zone area must lie within the page's OCR image area,
  • the whole zone area must lie within the given image's area,
  • the top left coordinates of the zone must have lower values than those of the bottom right ones,
  • the zone must not overlap another zone.
It is the programmer's responsibility to specify a valid recognition module-filling method pair, otherwise any incorrectly set zones will have no recognition result. For more details, see the topic Filling method - Recognition module combinations.
Any changes in the user zone list provokes deletion of the OCR zone list.
Insertion of a zone (containing machine printed uppercase flowed text):
HPAGE hPage;
ZONE zone;
kRecInitZone(&zone);
zone.rectBBox.left = 0;
zone.rectBBox.top = 0;
zone.rectBBox.right = 100;
zone.rectBBox.bottom = 200;
zone.fm = FM_OMNIFONT;
zone.rm = RM_OMNIFONT_MOR;
zone.filter = (CHR_FILTER)(FILTER_UPPERCASE | FILTER_DIGIT);
kRecInsertZone(hPage, II_CURRENT, &zone, -1);
CHR_FILTER
CHR_FILTER
Recognition filters.
Definition KernelApi.h:730
FILTER_UPPERCASE
@ FILTER_UPPERCASE
Definition KernelApi.h:736
FILTER_DIGIT
@ FILTER_DIGIT
Definition KernelApi.h:734
II_CURRENT
@ II_CURRENT
Definition KernelApi.h:1001
kRecInsertZone
RECERR RECAPIKRN kRecInsertZone(HPAGE hPage, IMAGEINDEX iiImg, LPCZONE pZone, int nZone)
Inserting a user zone.
RM_OMNIFONT_MOR
@ RM_OMNIFONT_MOR
Definition KernelApi.h:612
FM_OMNIFONT
@ FM_OMNIFONT
Definition KernelApi.h:558
_ZONE::rm
RECOGNITIONMODULE rm
Definition KernelApi.h:1688
_ZONE::rectBBox
RECT rectBBox
Definition KernelApi.h:1676
_ZONE::fm
FILLINGMETHOD fm
Definition KernelApi.h:1687
_ZONE::filter
CHR_FILTER filter
Definition KernelApi.h:1690
The specification of this function in C# is:
RECERR kRecInsertZone(IntPtr hPage, IMAGEINDEX iiImg, [In] ZONE pZone, int nZone);
The specification of this function in Java is:
int kRecInsertZone(HPAGE hPage, IMAGEINDEX iiImg, ZONE pZone, int nZone)
The specification of this function in Python is:
def kRecInsertZone(hPage: "HPAGE", iiImg: int, pZone: "ZONE", nZone: int) -> int

◆ kRecLoadZones()

RECERR RECAPIKRN kRecLoadZones | ( | HPAGE | hPage,
 |  | LPCTSTR | pFileName )

Loading user zones.

This function loads the user zone list from a zone file. The function attaches the zone list to the page.

Parameters
[in] | hPage | Handle of the page.
[in] | pFileName | Name of the zone file to be loaded.
Return values
ZONE_SIZE_WARN | At least one zone has been truncated, because it extends beyond the image
ZONE_SIZE_ERR | At least one zone has not been loaded, because it extends beyond the image
RECERR | Other errors
Note
Calling this function removes any zone list (OCR zone list as well) already attached to the page.
This function can load zone files created by a previous version of OmniPage CSDK v2025.1.
The specification of this function in C# is:
RECERR kRecLoadZones(IntPtr hPage, string pFileName);
kRecLoadZones
RECERR RECAPIKRN kRecLoadZones(HPAGE hPage, LPCTSTR pFileName)
Loading user zones.
The specification of this function in Java is:
int kRecLoadZones(HPAGE hPage, String pFileName)
The specification of this function in Python is:
def kRecLoadZones(hPage: "HPAGE", pFileName: str) -> int

◆ kRecLocateHandwriting()

RECERR RECAPIKRN kRecLocateHandwriting | ( | int | sid,
 |  | HPAGE | hPage,
 |  | LOCATEHANDWRITINGMODE | mode,
 |  | LPCRECT | pRect )

Find/remove handwriting on/from the given image.

This function finds the handwriting on the page. Depending on the mode parameter it retains or removes the handwriting. When the handwriting is retained, the function also returns handwriting zones. It is useful when these areas will be recognized by RM_RER or RM_HNR or another handwritten text recognizer. See also kRecCreateHandwritingPage.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | mode | Specifies whether to keep or remove handwriting.
[in] | pRect | Pointer to the rectangular area to be detected (II_CURRENT coordinate system is used). If it is NULL the entire image is processed.
Return values
RECERR
Note
See the description about processing handwritten text.
The specification of this function in C# is:
RECERR kRecLocateHandwriting(int sid, IntPtr hPage, LOCATEHANDWRITINGMODE mode, RECT UserRect);
LOCATEHANDWRITINGMODE
LOCATEHANDWRITINGMODE
kRecLocateHandwriting modes
Definition KernelApi.h:3283
kRecLocateHandwriting
RECERR RECAPIKRN kRecLocateHandwriting(int sid, HPAGE hPage, LOCATEHANDWRITINGMODE mode, LPCRECT pRect)
Find/remove handwriting on/from the given image.
The specification of this function in C# Objects is:
Page.LocateHandwriting(LOCATEHANDWRITINGMODE mode, RECT UserRect);
The specification of this function in Java is:
int kRecLocateHandwriting(int sid, HPAGE hPage, LOCATEHANDWRITINGMODE mode, RECT pRect)
The specification of this function in Python is:
def kRecLocateHandwriting(sid: int, hPage: "HPAGE", mode: "LOCATEHANDWRITINGMODE", pRect: "RECT") -> int

◆ kRecLocateZones()

RECERR RECAPIKRN kRecLocateZones | ( | int | sid,
 |  | HPAGE | hPage )

Page parsing.

This function analyzes the page layout structure of the image (auto-zoning). It finds text or graphic blocks on the page, builds an OCR zone list and then connects it to the page. The user zone list is not changed. It activates the PID_DECOMPOSITION process.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the OCR image to be analyzed.
Return values
RECERR
Note
OmniPage Capture SDK uses different auto-zoning algorithms for Latin-alphabet and Asian text. Ensure that the correct language has been set before calling kRecLocateZones (see: kRecSetLanguages, kRecManageLanguages).
OmniPage Capture SDK offers three different algorithms to be applied during auto-zoning of Latin-alphabet text, and two different algorithms during auto-zoning of CCJK and Arabic text; use the kRecSetDecompMethod function to specify the Page parser algorithm. For details, see also IMG_DECOMP.
If hPage does not contain II_BW image, an implicit secondary image conversion step is also performed automatically to convert the image to a despeckled B/W image (which will be stored in II_BW image of hPage) on which the auto-zoning function operates. The parameters for this conversion can be specified through the functions kRecSetImgBinarizationMode, kRecSetImgDespeckleMode, kRecSetImgBrightness, kRecSetImgThreshold, kRecSetImgResolEnhancement and kRecSetRMTradeoff.
If user zones are used together with kRecLocateZones they should be inserted before calling this function.
kRecLocateZones creates the OCR zones and puts them into the OCR zone list. Any previously inserted OCR zone is deleted first. The generated OCR zones are used by the recognition process and they may be modified by this.
The type of user zone determines how kRecLocateZones finds OCR zones inside them. See ZONETYPE for a description of individual types.
The OCR zones detected outside User zones take the value FILTER_DEFAULT, meaning that the zone will take on the global filter setting (which is by default FILTER_ALL to have no filtering).
The OCR zones detected outside User zones will always have the FM_DEFAULT and RM_AUTO values in their ZONE::fm and ZONE::rm fields, respectively. The "meaning" of the FM_DEFAULT filling method can be specified with the kRecSetDefaultFillingMethod function, while the "meaning" of the RM_AUTO recognition module can be specified with the kRecSetDefaultRecognitionModule function.
Since the function's zone location algorithm is optimized for searching text blocks, it is not recommended for locating barcodes. This situation can be handled with user zones.
Note that the kRecGetOCRZoneCount function can be used for inquiring the number of OCR zones in the zone list. The application can get the OCR zone parameters by the kRecGetOCRZoneInfo function. After modifying some zone attributes the kRecUpdateOCRZone function can be used to apply the changes.
kRecDetectFillingMethod is a useful function when you do not know the type of page to be processed.
This function can fill the line list of the HPAGE, but not all line situations are handled in the same way. See RLINE for more information.
The specification of this function in C# is:
RECERR kRecLocateZones(int sid, IntPtr hPage);
kRecLocateZones
RECERR RECAPIKRN kRecLocateZones(int sid, HPAGE hPage)
Page parsing.
The specification of this function in Objects: is:
Page.LocateZones();
The specification of this function in Java is:
int kRecLocateZones(int sid, HPAGE hPage)
The specification of this function in Python is:
def kRecLocateZones(sid: int, hPage: "HPAGE") -> int

◆ kRecLocateZonesEx()

RECERR RECAPIKRN kRecLocateZonesEx | ( | int | sid,
 |  | HPAGE | hPage,
 |  | int | fm_mode )

Extended page parsing.

This function analyzes the page layout automatically. It searches for areas on the page according to the specified filling modes (fm_mode). Different filling modes require different recognition algoritms. This function produces zones which will be recognized by the proper algorithms even when different filling modes are combined on the page. The parameter fm_mode describes the content type of the page that the caller wants to process. In all other respects, refer to the documentation of the function kRecLocateZones.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page containing the OCR image to be analyzed.
[in] | fm_mode | Type(s) of the areas of interest.
Return values
RECERR
Note
If hPage has a user zone, this function will fail and return an error code.
The specification of this function in C# is:
RECERR kRecLocateZonesEx(int sid, IntPtr hPage, int fm_mode);
kRecLocateZonesEx
RECERR RECAPIKRN kRecLocateZonesEx(int sid, HPAGE hPage, int fm_mode)
Extended page parsing.
The specification of this function in Objects: is:
Page.LocateZonesEx(int fm_mode);
The specification of this function in Java is:
int kRecLocateZonesEx(int sid, HPAGE hPage, int fm_mode)
The specification of this function in Python is:
def kRecLocateZonesEx(sid: int, hPage: "HPAGE", fm_mode: int) -> int

◆ kRecSaveOCRZones()

RECERR RECAPIKRN kRecSaveOCRZones | ( | HPAGE | hPage,
 |  | LPCTSTR | pFileName )

Saving the OCR zone list.

This function saves the current OCR zone list of the page into a zone file. The zone file can be loaded later by kRecLoadZones as user zones.

Parameters
[in] | hPage | Handle of the page.
[in] | pFileName | Name of the zone file to be created.
Return values
RECERR
Note
This function overwrites a pre-existing zone file with the same name.
The zone coordinates are saved into the zone file in twips (1/1440 inches).
The specification of this function in C# is:
RECERR kRecSaveOCRZones(IntPtr hPage, string pFileName);
kRecSaveOCRZones
RECERR RECAPIKRN kRecSaveOCRZones(HPAGE hPage, LPCTSTR pFileName)
Saving the OCR zone list.
The specification of this function in Java is:
int kRecSaveOCRZones(HPAGE hPage, String pFileName)
The specification of this function in Python is:
def kRecSaveOCRZones(hPage: "HPAGE", pFileName: str) -> int

◆ kRecSaveZones()

RECERR RECAPIKRN kRecSaveZones | ( | HPAGE | hPage,
 |  | LPCTSTR | pFileName )

Saving the user zone list.

This function saves the current user zone list of the page into a zone file.

Parameters
[in] | hPage | Handle of the page.
[in] | pFileName | Name of the zone file to be created.
Return values
RECERR
Note
This function overwrites a pre-existing zone file with the same name.
The zone coordinates are saved into the zone file in twips (1/1440 inches).
The specification of this function in C# is:
RECERR kRecSaveZones(IntPtr hPage, string pFileName);
kRecSaveZones
RECERR RECAPIKRN kRecSaveZones(HPAGE hPage, LPCTSTR pFileName)
Saving the user zone list.
The specification of this function in Java is:
int kRecSaveZones(HPAGE hPage, String pFileName)
The specification of this function in Python is:
def kRecSaveZones(hPage: "HPAGE", pFileName: str) -> int

◆ kRecSetDecompMethod()

RECERR RECAPIKRN kRecSetDecompMethod | ( | int | sid,
 |  | IMG_DECOMP | Algorithm )

Setting the decomp method.

This function specifies the Page parser algorithm setting of the Engine. This setting is applied whenever the auto-zoning algorithm is activated (PID_DECOMPOSITION process).

Parameters
[in] | sid | Settings Collection ID.
[in] | Algorithm | The page parser algorithm to be set.
Return values
RECERR
Note
If this function is not called, the default value, DCM_AUTO is applied.
This function sets the value of the setting Kernel.Decomp.Method. This setting can be retrieved by kRecGetDecompMethod.
The specification of this function in C# is:
RECERR kRecSetDecompMethod(int sid, IMG_DECOMP decompAlg);
kRecSetDecompMethod
RECERR RECAPIKRN kRecSetDecompMethod(int sid, IMG_DECOMP Algorithm)
Setting the decomp method.
The specification of this function in Java is:
int kRecSetDecompMethod(int sid, IMG_DECOMP Algorithm)
The specification of this function in Python is:
def kRecSetDecompMethod(sid: int, Algorithm: int) -> int

◆ kRecSetForceSingleColumn()

RECERR RECAPIKRN kRecSetForceSingleColumn | ( | int | sid,
 |  | INTBOOL | bForceSingle )

Specify the Force Single Column mode.

This function specifies the Force Single Column mode for the page-layout PID_DECOMPOSITION process. It prevents the Engine's de-columnization from detecting columns and placing their contents one below the other. It is useful for conserving the columnar structure in tables.

Parameters
[in] | sid | Settings Collection ID.
[in] | bForceSingle | Force Single Column mode to be set (default is FALSE).
Return values
RECERR
Note
It is highly recommended to switch this on sparingly, only for cases where the image has a single tabular structure and chances are that the automatic decomposition would fail in analyzing the layout properly.
Single Column mode is handled in a different way in DCM_STANDARD mode. In this case, the "single column" is only a recommendation to the Decomposition Module, which may still generate multi-column results if this seems necessary (e.g. if the page parser finds more than one column, there are text and picture side by side, or texts are separated by vertical lines, etc.)
This mode takes effect only when the page descriptor has its default value (kRecSetPageDescription).
This function sets the value of the setting Kernel.Decomp.ForceSingleColumn. This setting can be retrieved by kRecGetForceSingleColumn.
The specification of this function in C# is:
RECERR kRecSetForceSingleColumn(int sid, bool bEnable);
kRecSetForceSingleColumn
RECERR RECAPIKRN kRecSetForceSingleColumn(int sid, INTBOOL bForceSingle)
Specify the Force Single Column mode.
The specification of this function in Java is:
int kRecSetForceSingleColumn(int sid, int bForceSingle)
The specification of this function in Python is:
def kRecSetForceSingleColumn(sid: int, bForceSingle: bool) -> int

◆ kRecSetNongriddedTableDetect()

RECERR RECAPIKRN kRecSetNongriddedTableDetect | ( | int | sid,
 |  | INTBOOL | bEnable )

Setting the non-gridded table detection.

This function sets the Non-gridded table detection setting of the Engine. Tables with visible grid lines (gridded tables) in an original page can usually be detected successfully by the auto-zoning function. In contrast, tables without visible cell separators (non-gridded tables) in the original are harder to identify as tables, because they might also be word lists or data arranged in columns. The OmniPage CSDK offers an algorithm for detecting such non-gridded tables more confidently. This feature of the Engine can only be used in conjunction with an auto-zoning step. The algorithm is based on the result of the character recognition and runs on the OCR zones created by auto-zoning (including the zones created from a WT_AUTO User zone).

Parameters
[in] | sid | Settings Collection ID.
[in] | bEnable | The value to be set for the non-gridded table detection setting (the default is TRUE).
Return values
RECERR
Note
The detection of non-gridded tables is not supported with the following recognition languages: Arabic, Simplified Chinese, Traditional Chinese, Hebrew, Japanese, and Korean.
When this feature is enabled, a special algorithm tries to find non-gridded table(s) on the image. This algorithm is based on the existing OCR zone list of the image and also on the recognized characters, i.e. this algorithm is activated as one of the last steps in the character recognition. Because of this, its effect might be visible only after a kRecRecognize or kRecProcessPages call.
The running of this algorithm is strongly controlled, since it may change the OCR zone list belonging to the image.
It is recommended to disable the Non-gridded table detection algorithm when the DCM_FAST page parser algorithm has been selected (see: kRecSetDecompMethod).
This function sets the value of the setting Kernel.Decomp.EnableNonGrid. This setting can be retrieved by kRecGetNongriddedTableDetect.
The specification of this function in C# is:
RECERR kRecSetNongriddedTableDetect(int sid, bool bEnable);
kRecSetNongriddedTableDetect
RECERR RECAPIKRN kRecSetNongriddedTableDetect(int sid, INTBOOL bEnable)
Setting the non-gridded table detection.
The specification of this function in Java is:
int kRecSetNongriddedTableDetect(int sid, int bEnable)
The specification of this function in Python is:
def kRecSetNongriddedTableDetect(sid: int, bEnable: bool) -> int

◆ kRecSetPageDescription()

RECERR RECAPIKRN kRecSetPageDescription | ( | int | sid,
 |  | DWORD | PageDesc )

Setting page description data.

The page description data controls how the page parse (see kRecLocateZones and kRecRecognize) runs on the page. Page Descriptor defines describe the different behaviors of page parse. If the program has information about the image, it can help the page parse to achieve better layout results.

Parameters
[in] | sid | Settings Collection ID.
[in] | PageDesc | The Page Descriptor. It contains a set of LZ_ flags
Return values
RECERR
Note
This function sets the value of the setting Kernel.Decomp.PageDesc. This setting can be retrieved by kRecGetPageDescription.
The specification of this function in C# is:
RECERR kRecSetPageDescription(int sid, PAGEDESCRIPTION PageDesc);
kRecSetPageDescription
RECERR RECAPIKRN kRecSetPageDescription(int sid, DWORD PageDesc)
Setting page description data.
The specification of this function in Java is:
int kRecSetPageDescription(int sid, long PageDesc)
The specification of this function in Python is:
def kRecSetPageDescription(sid: int, PageDesc: int) -> int

◆ kRecSetZoneBorder()

RECERR RECAPIKRN kRecSetZoneBorder | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | ZONE_BORDER_TYPE | ZoneBorderType,
 |  | int | CellCount )

Setting the border type of a zone.

This function sets the border type of a hand-print zone. The filling method of the zone must be FM_HANDPRINT or FM_AUTO_HAND.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Index of the user zone to be updated.
[in] | ZoneBorderType | Zone border type, see ZONE_BORDER_TYPE.
[in] | CellCount | Number of comb cells or boxes in the zone. 0 means automatic detection.
Return values
RECERR
Note
If you want to recognize the text in a comb, you can define the type of the borders, this helps improving accuracy.
The index of the first zone in the zone list is zero (0).
If the CellCount parameter is 0, then CSDK will detect the number of cells automatically.
The CellCount is not used in zone border types that do not define combs or boxes.
The specification of this function in C# is:
RECERR kRecSetZoneBorder(IntPtr hPage, nZone, ZoneBorder, CellCount);
kRecSetZoneBorder
RECERR RECAPIKRN kRecSetZoneBorder(HPAGE hPage, int nZone, ZONE_BORDER_TYPE ZoneBorderType, int CellCount)
Setting the border type of a zone.
The specification of this function in Java is:
int kRecSetZoneBorder(HPAGE hPage, nZone, ZoneBorder, CellCount)
The specification of this function in Python is:
def kRecSetZoneBorder(hPage: "HPAGE", nZone: int, ZoneBorderType: int, CellCount: int) -> int

◆ kRecSetZoneLayout()

RECERR RECAPIKRN kRecSetZoneLayout | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPCRECT | pRects,
 |  | int | nRects,
 |  | int | nZone )

Updating the user zone shape information.

This function updates the shape information of any zone in the user zone list. See also the definition of pizza-box for more information about zone shapes.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image in the page whose coordinate system you have used in defining the shape to be updated.
[in] | pRects | Array of RECTs for storing the shape information.
[in] | nRects | The number of RECTs in the shape information array.
[in] | nZone | Index of the zone to be updated.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
Any changes in the user zone list provokes deletion and regeneration of the OCR zone list.
The specification of this function in C# is:
RECERR kRecSetZoneLayout(IntPtr hPage, IMAGEINDEX iiImg, RECT[] pRects, int nZone);
kRecSetZoneLayout
RECERR RECAPIKRN kRecSetZoneLayout(HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pRects, int nRects, int nZone)
Updating the user zone shape information.
The specification of this function in Java is:
int kRecSetZoneLayout(HPAGE hPage, IMAGEINDEX iiImg, RECT pRects, int nRects, int nZone)
The specification of this function in Python is:
def kRecSetZoneLayout(hPage: "HPAGE", iiImg: int, pRects: "RectArray", nZone: int) -> int

◆ kRecSubZoneRect()

RECERR RECAPIKRN kRecSubZoneRect | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | const RECT * | pRect,
 |  | int | nZone )

Subtracting a rectangle from a user zone.

This function subtracts a rectangle from an existing user zone. The function recalculates the rectangle list of the zone. The resulting list must describe a pizza-box shape. Subtraction cannot be performed on table zones and vertical text zones.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | The index of the image whose coordinate system you have used in defining the rectangle to be subtracted. It is recommended to use II_CURRENT coordinates if possible.
[in] | pRect | The rectangle to be subtracted from the given user zone.
[in] | nZone | The index of the user zone the rectangle is subtracted from.
Return values
RECERR
Note
The insertion of a new irregular zone can be performed only by rectangles. The first rectangle must be inserted by kRecInsertZone. The additional rectangles must be added by kRecAddZoneRect or removed by kRecSubZoneRect. The rectangle list of the given zone is automatically updated (the overlapping rectangles are recalculated; when subtracting, the remaining (maybe non-rectangular) area is broken into rectangular areas, etc.), thus the ZONE passed to the function kRecInsertZone must have only the bounding box of the irregular zone’s first rectangle (it must not be the bounding box of the whole zone).
Note that the index of the first zone in the zone list is zero (0).
Any changes in the user zone list provokes deletion of the OCR zone list.
The specification of this function in C# is:
RECERR kRecSubZoneRect(IntPtr hPage, IMAGEINDEX iiImg, RECT pRect, int nZone);
kRecSubZoneRect
RECERR RECAPIKRN kRecSubZoneRect(HPAGE hPage, IMAGEINDEX iiImg, const RECT *pRect, int nZone)
Subtracting a rectangle from a user zone.
The specification of this function in Java is:
int kRecSubZoneRect(HPAGE hPage, IMAGEINDEX iiImg, RECT pRect, int nZone)
The specification of this function in Python is:
def kRecSubZoneRect(hPage: "HPAGE", iiImg: int, pRect: "RECT", nZone: int) -> int

◆ kRecUpdateOCRZone()

RECERR RECAPIKRN kRecUpdateOCRZone | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPCZONE | pZone,
 |  | int | nZone )

Updating the OCR zone.

This function updates the zone data of any zone in the OCR zone list. The fields ZONE::rectBBox, ZONE::type, ZONE::chk_fn (must be NULL) and chk_sect (must be empty string) cannot be modified.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image in the page, whose coordinate system you have used in defining the zone's boundary box.
[in] | pZone | Pointer to a zone structure with the necessary updating zone data.
[in] | nZone | Index of the zone to be updated.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
This function can modify only the following fields of the specified OCR zone: userdata, fm, rm, filter, chk_control. Other fields of the passed zone structure are not considered.
The preferred method of updating a zone is the following:
  • call the kRecGetOCRZoneInfo to ask the current parameters of the zone,
  • modify the zone parameters,
  • call the kRecUpdateOCRZone function.
It is the programmer's responsibility to specify a valid recognition module-filling method pair, otherwise any incorrectly set zones will have no recognition result. For more details see the topic Filling method - Recognition module combinations.
The specification of this function in C# is:
RECERR kRecUpdateOCRZone(IntPtr hPage, IMAGEINDEX iiImg, [In] ZONE pZone, int nZone);
kRecUpdateOCRZone
RECERR RECAPIKRN kRecUpdateOCRZone(HPAGE hPage, IMAGEINDEX iiImg, LPCZONE pZone, int nZone)
Updating the OCR zone.
The specification of this function in Java is:
int kRecUpdateOCRZone(HPAGE hPage, IMAGEINDEX iiImg, ZONE pZone, int nZone)
The specification of this function in Python is:
def kRecUpdateOCRZone(hPage: "HPAGE", iiImg: int, pZone: "ZONE", nZone: int) -> int

◆ kRecUpdateZone()

RECERR RECAPIKRN kRecUpdateZone | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPCZONE | pZone,
 |  | int | nZone )

Updating a user zone.

This function updates the zone data of any zone in the user zone list.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image in the page whose coordinate system you have used in defining the zone's boundary box.
[in] | pZone | Pointer to a zone structure with the necessary updating zone data.
[in] | nZone | Index of the zone to be updated.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
When updating a zone, the application should initialize all the fields of pZone either by the kRecInitZone or, in most cases, the kRecGetZoneInfo functions.
If the new ZONE::rectBBox is equal to the old one, the layout of the zone (kRecGetZoneLayout) is not changed. Otherwise it is modified to a simple rectangular zone equal to the new rectBBox (i.e. the one or more previous rectangles building up the zone are deleted and the only one rectBBox is stored).
The preferred method of updating a zone is the following:
  • call the kRecGetZoneInfo to ask the current parameters of the zone,
  • modify the zone parameters,
  • call the kRecUpdateZone function.
It is the programmer's responsibility to specify a valid recognition module-filling method pair. Otherwise any incorrectly set zones will have no recognition result. For more details see the topic Filling method - Recognition module combinations.
When updating a table-type zone the "cell-detection" algorithm will not be activated, which results in improper table detection within the zone. You can detect cells within a table zone by calling kRecLocateTable.
Any changes in the user zone list provokes deletion of the OCR zone list.
The specification of this function in C# is:
RECERR kRecUpdateZone(IntPtr hPage, IMAGEINDEX iiImg, [In] ZONE pZone, int nZone);
kRecUpdateZone
RECERR RECAPIKRN kRecUpdateZone(HPAGE hPage, IMAGEINDEX iiImg, LPCZONE pZone, int nZone)
Updating a user zone.
The specification of this function in Java is:
int kRecUpdateZone(HPAGE hPage, IMAGEINDEX iiImg, ZONE pZone, int nZone)
The specification of this function in Python is:
def kRecUpdateZone(hPage: "HPAGE", iiImg: int, pZone: "ZONE", nZone: int) -> int


RecAPI: Table Recognition Module

Classes | Typedefs | Enumerations | Functions
Table Recognition Module
KernelAPI » Zone Handling Module

Table detection and working with tables. More...

Classes

struct CELL_INFO
Structure of a cell in a table. More...

Typedefs

typedef CELL_INFO * | LPCELL_INFO
Pointer to a structure CELL_INFO.
typedef const CELL_INFO * | LPCCELL_INFO
Const pointer to a structure CELL_INFO.

Enumerations

enum BORDERINDEX {
LEFT_BORDER = 1 ,
TOP_BORDER = 2 ,
RIGHT_BORDER = 3 ,
BOTTOM_BORDER = 4
}
Index of the border element of a table or a cell. More...
enum RLSTYLE {
LS_NO ,
LS_SOLID ,
LS_DOUBLE ,
LS_DASHED ,
LS_DOTTED ,
LS_OTHER
}
Possible types of lines. More...

Functions

RECERR RECAPIKRN | kRecLocateTableColumns (int sid, HPAGE hPage, int zone)
Cell detection.
RECERR RECAPIKRN | kRecLocateTable (int sid, HPAGE hPage, int zone, INTBOOL bForce)
RECERR RECAPIKRN | kRecCreateTableInfo (HPAGE hPage, int xZone)
Creating table information.
RECERR RECAPIKRN | kRecGetCellCount (HPAGE hPage, int xZone, int *pnCells)
Getting cell number.
RECERR RECAPIKRN | kRecGetOCRCellCount (HPAGE hPage, int xZone, int *pnCells)
Getting cell number.
RECERR RECAPIKRN | kRecGetCellInfo (HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, LPCELL_INFO pCellInfo)
Getting cell information.
RECERR RECAPIKRN | kRecGetOCRCellInfo (HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, LPCELL_INFO pCellInfo)
Getting cell information.
RECERR RECAPIKRN | kRecSplitCells (HPAGE hPage, IMAGEINDEX iiImg, int xZone, INTBOOL bVertical, const RECT *pRect, POINT Position, int LineWidth, int LineStyle, REC_COLOR lineColor)
Splitting the selected cells.
RECERR RECAPIKRN | kRecMergeCells (HPAGE hPage, IMAGEINDEX iiImg, int xZone, const RECT *pRect)
Merging selected cells.
RECERR RECAPIKRN | kRecGetPointInfoFromTable (HPAGE hPage, IMAGEINDEX iiImg, int xZone, POINT Point, int xDist, int yDist, int *pCellIndex, BORDERINDEX *pBorderIndex)
Getting the index of the nearest border.
RECERR RECAPIKRN | kRecMoveCellBorder (HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, BORDERINDEX BorderIndex, POINT NewPosition)
Moving a cell border.
RECERR RECAPIKRN | kRecDragCellBorder (HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, BORDERINDEX BorderIndex, POINT *xy, POINT *from, POINT *to, POINT *mmin, POINT *mmax)
Getting the limits of a border.
RECERR RECAPIKRN | kRecGetTabPositionInTable (HPAGE hPage, IMAGEINDEX iiImg, int xZone, POINT Point, POINT *pTab)
Getting the next tabulator.
RECERR RECAPIKRN | kRecSetCells (HPAGE hPage, IMAGEINDEX iiImg, int xZone, LPCCELL_INFO pCells, int nCells)
Setting cells.
RECERR RECAPIKRN | kRecSetCellColor (HPAGE hPage, int xZone, int CellIndex, REC_COLOR color)
Setting the color of a cell.
RECERR RECAPIKRN | kRecGetCellColor (HPAGE hPage, int xZone, int CellIndex, REC_COLOR *pcolor)
Getting the color of a cell.
RECERR RECAPIKRN | kRecGetHSplitters (HPAGE hPage, IMAGEINDEX iiImg, int xZone, int **pSplitters, int *nSplitter)
Getting the horizontal splitters.
RECERR RECAPIKRN | kRecGetVSplitters (HPAGE hPage, IMAGEINDEX iiImg, int xZone, int **pSplitters, int *nSplitter)
Getting the vertical splitters.
RECERR RECAPIKRN | kRecSetCellName (HPAGE hPage, int xZone, int xCell, LPCTSTR pCellName)
Changing the name of a table-cell.
RECERR RECAPIKRN | kRecGetCellName (HPAGE hPage, int xZone, int xCell, LPTSTR *ppCellName)
Querying the name of a table-cell.
RECERR RECAPIKRN | kRecSetOCRCellName (HPAGE hPage, int xZone, int xCell, LPCTSTR pCellName)
Changing the name of a table-cell.
RECERR RECAPIKRN | kRecGetOCRCellName (HPAGE hPage, int xZone, int xCell, LPTSTR *ppCellName)
Querying the name of a table-cell.
RECERR RECAPIKRN | kRecGetTableDimensions (HPAGE hPage, int xZone, int *pnRows, int *pnColumns)
Querying the dimensions of a table.
RECERR RECAPIKRN | kRecGetOCRTableDimensions (HPAGE hPage, int xZone, int *pnRows, int *pnColumns)
Querying the dimensions of a table.

Detailed Description

Table detection and working with tables.

This module detects tables on the page and connects the recognition result and the table information to each other.

A table is described by the list of its cells in reading order (from left to right and top to bottom) ordered by their top-left coordinates. A cell is always a rectangle, thus a table is a sequence of rectangles.

All cell operations must adhere to the following restrictions:

  • cells cannot have blank spaces in between,
  • cells cannot intersect each other
  • all cells must have a rectangular shape.

NOTE: In both the SDK and its documentation, coordinates refer to grid-coordinates - i.e. the top or left borders of pixels. Thus a rectangle does not contain the pixels according to its right and bottom coordinates.

Table information in a table zone (WT_TABLE) contains the above mentioned table description. (See CELL_INFO.) The structure of a table zone can be determined in three different ways:

  • User-defined: creating a one-cell table structure (kRecCreateTableInfo) into a WT_TABLE user zone. Having such table information the User can insert splitters into it (kRecSplitCells), or can replace the cell list with a User-defined cell sequence (kRecSetCells). Note that kRecSetCells creates the table information, if kRecCreateTableInfo has not run before.
  • User-started: calling kRecLocateTable for a WT_TABLE user zone before recognition. The module automatically detects the structure of the table covered by the given zone and creates the table information.
  • Engine-controlled: the recognition process automatically detects and creates the table information for all such WT_TABLE user zones that have not been processed by the previous two methods and for all the automatically detected table type OCR zones.

The User-started method is less accurate than the Engine-controlled one, thus it may be useful only when automatic cell detection is required before recognition (mainly for displaying on the UI).

The Engine-controlled method leaves the existing cell sequence, if any. In contrast, the User-started method recreates the cell sequence of the user zone even if the zone contains previous table information.

It follows from the above that the Engine-controlled method can be disabled by calling kRecCreateTableInfo.

The table detection algorithm can recognize tables both with (gridded table) and without visible grid lines (non-gridded table). While the algorithm can unconditionally detect gridded tables, detecting non-gridded tables is not supported when applying any of the following recognition languages: Arabic, Simplified Chinese, Traditional Chinese, Hebrew, Japanese, and Korean. The application can control whether non-gridded tables should also be detected by the function kRecSetNongriddedTableDetect.

Enumeration Type Documentation

◆ BORDERINDEX

enum BORDERINDEX

Index of the border element of a table or a cell.

Enumerator
LEFT_BORDER | Index of left border.
TOP_BORDER | Index of top border.
RIGHT_BORDER | Index of right border.
BOTTOM_BORDER | Index of bottom border.

◆ RLSTYLE

enum RLSTYLE

Possible types of lines.

Enumerator
LS_NO | There is no line. (E.g. a cell without visible borders, or a frame indicated by only a different background color.)
LS_SOLID | Solid line.
LS_DOUBLE | Double line.
LS_DASHED | Dashed line.
LS_DOTTED | Dotted line.
LS_OTHER | Not used.

Function Documentation

◆ kRecCreateTableInfo()

RECERR RECAPIKRN kRecCreateTableInfo | ( | HPAGE | hPage,
 |  | int | xZone )

Creating table information.

The kRecCreateTableInfo function creates table information for a user zone. The resulting table info has only one cell with the size of the whole table. This is required, because the cell manipulating functions work for user zones having table information (kRecSplitCells, kRecMergeCells, kRecMoveCellBorder, kRecDragCellBorder, kRecSetCellColor).

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the zone in the user zone list.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
See the description of table info creation.
The specification of this function in C# is:
RECERR kRecCreateTableInfo(IntPtr hPage, int xZone);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecCreateTableInfo
RECERR RECAPIKRN kRecCreateTableInfo(HPAGE hPage, int xZone)
Creating table information.
The specification of this function in Java is:
int kRecCreateTableInfo(HPAGE hPage, int xZone)
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
The specification of this function in Python is:
def kRecCreateTableInfo(hPage: "HPAGE", xZone: int) -> int

◆ kRecDragCellBorder()

RECERR RECAPIKRN kRecDragCellBorder | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | int | xZone,
 |  | int | CellIndex,
 |  | BORDERINDEX | BorderIndex,
 |  | POINT * | xy,
 |  | POINT * | from,
 |  | POINT * | to,
 |  | POINT * | mmin,
 |  | POINT * | mmax )

Getting the limits of a border.

The kRecDragCellBorder function gets the moving limits of the border.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image whose coordinate system is to be used to report the limits.
[in] | xZone | Index of the zone in the user zone list.
[in] | CellIndex | Index of the cell within the given zone.
[in] | BorderIndex | The index of the inquired border.
[out] | xy | Pointer of a variable to store the old position of the border. For a horizontal border, this is the old vertical position and vice versa.
[out] | from | Pointer of a variable to store the start of the line. For a horizontal border this is the starting x-coordinate of the border and vice versa.
[out] | to | Pointer of a variable to store the end of the line. For a horizontal border this is the ending x-coordinate of the border and vice versa.
[out] | mmin | Pointer of a variable to store the minimum limit. For a horizontal border this is the minimum y-coordinate the border can move to and vice versa.
[out] | mmax | Pointer of a variable to store the maximum limit. For a horizontal border this is the maximum y-coordinate the border can move to and vice versa.
Return values
RECERR
Note
The index of the first zone and of the first cell in the zone list and in the cell list is zero (0).
The specification of this function in C# is:
RECERR kRecDragCellBorder(IntPtr hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, BORDERINDEX BorderIndex, out POINT xy, out POINT from, out POINT to, out POINT mmin, out POINT mmax);
IMAGEINDEX
IMAGEINDEX
Index of each image type in HPAGE.
Definition KernelApi.h:991
BORDERINDEX
BORDERINDEX
Index of the border element of a table or a cell.
Definition KernelApi.h:5230
kRecDragCellBorder
RECERR RECAPIKRN kRecDragCellBorder(HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, BORDERINDEX BorderIndex, POINT *xy, POINT *from, POINT *to, POINT *mmin, POINT *mmax)
Getting the limits of a border.
The specification of this function in Java is:
int kRecDragCellBorder(HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, BORDERINDEX BorderIndex, POINT xy, POINT from, POINT to, POINT mmin, POINT mmax)
The specification of this function in Python is:
def kRecDragCellBorder(hPage: "HPAGE", iiImg: int, xZone: int, CellIndex: int, BorderIndex: int, xy: "POINT") -> Tuple[int, "POINT", "POINT", "POINT", "POINT"]

◆ kRecGetCellColor()

RECERR RECAPIKRN kRecGetCellColor | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | int | CellIndex,
 |  | REC_COLOR * | pcolor )

Getting the color of a cell.

The kRecGetCellColor function gets the color of a cell.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the zone in the user zone list.
[in] | CellIndex | Index of the cell within the given zone.
[out] | pcolor | Pointer of a variable to store the color of the cell.
Return values
RECERR
Note
The index of the first zone and of the first cell in the zone list and in the cell list is zero (0).
The specification of this function in C# is:
RECERR kRecGetCellColor(IntPtr hPage, int xZone, int CellIndex, out uint color);
kRecGetCellColor
RECERR RECAPIKRN kRecGetCellColor(HPAGE hPage, int xZone, int CellIndex, REC_COLOR *pcolor)
Getting the color of a cell.
The specification of this function in Java is:
int kRecGetCellColor(HPAGE hPage, int xZone, int CellIndex, long[] pcolor)
The specification of this function in Python is:
def kRecGetCellColor(hPage: "HPAGE", xZone: int, CellIndex: int) -> Tuple[int, int]

◆ kRecGetCellCount()

RECERR RECAPIKRN kRecGetCellCount | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | int * | pnCells )

Getting cell number.

The kRecGetCellCount function gets the number of cells in a user zone.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the zone in the user zone list.
[out] | pnCells | Pointer to a variable to get the number of cells.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
RECERR kRecGetCellCount(IntPtr hPage, int xZone, out int pnCells);
kRecGetCellCount
RECERR RECAPIKRN kRecGetCellCount(HPAGE hPage, int xZone, int *pnCells)
Getting cell number.
The specification of this function in Java is:
int kRecGetCellCount(HPAGE hPage, int xZone, int[] pnCells)
The specification of this function in Python is:
def kRecGetCellCount(hPage: "HPAGE", xZone: int) -> Tuple[int, int]

◆ kRecGetCellInfo()

RECERR RECAPIKRN kRecGetCellInfo | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | int | xZone,
 |  | int | CellIndex,
 |  | LPCELL_INFO | pCellInfo )

Getting cell information.

The kRecGetCellInfo function gets the parameters of a cell in a user zone.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image, in which the coordinates of the cell information are given.
[in] | xZone | Index of the zone in the user zone list.
[in] | CellIndex | Index of the cell within the given zone.
[out] | pCellInfo | Pointer to a variable to get the structure of cell information.
Return values
RECERR
Note
The index of the first zone and of the first cell in the zone list and cell list is zero (0).
The specification of this function in C# is:
RECERR kRecGetCellInfo(IntPtr hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, out CELL_INFO pCellInfo);
kRecGetCellInfo
RECERR RECAPIKRN kRecGetCellInfo(HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, LPCELL_INFO pCellInfo)
Getting cell information.
CELL_INFO
Structure of a cell in a table.
Definition KernelApi.h:5250
The specification of this function in Java is:
int kRecGetCellInfo(HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, CELL_INFO pCellInfo)
The specification of this function in Python is:
def kRecGetCellInfo(hPage: "HPAGE", iiImg: int, xZone: int, CellIndex: int) -> Tuple[int, "CELL_INFO"]

◆ kRecGetCellName()

RECERR RECAPIKRN kRecGetCellName | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | int | xCell,
 |  | LPTSTR * | ppCellName )

Querying the name of a table-cell.

The kRecGetCellName queries the name of a cell of a table type user zone.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the user zone to be queried.
[in] | xCell | Index of the cell to be queried.
[out] | ppCellName | Address of a pointer to a string which will be allocated and filled by the API-call and will contain the name characters. (The string will be terminated with a null character.)
Return values
RECERR
Note
The index of the first zone and of the first cell in the zone list and cell list is zero (0).
Cell-name is used in form templates: it can be defined with Form Template Editor.
The memory allocated for *ppCellName can be released using kRecFree.
The specification of this function in C# is:
RECERR kRecGetCellName(IntPtr hPage, int xZone, int xCell, out string ppCellName);
kRecGetCellName
RECERR RECAPIKRN kRecGetCellName(HPAGE hPage, int xZone, int xCell, LPTSTR *ppCellName)
Querying the name of a table-cell.
The specification of this function in Java is:
int kRecGetCellName(HPAGE hPage, int xZone, int xCell, String[] ppCellName)
The specification of this function in Python is:
def kRecGetCellName(hPage: "HPAGE", xZone: int, xCell: int) -> Tuple[int, str]

◆ kRecGetHSplitters()

RECERR RECAPIKRN kRecGetHSplitters | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | int | xZone,
 |  | int ** | pSplitters,
 |  | int * | nSplitter )

Getting the horizontal splitters.

The kRecGetHSplitters function gets the number and position of horizontal splitters.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image whose coordinate system is used to report the splitters.
[in] | xZone | Index of the zone in the user zone list.
[out] | pSplitters | Pointer of a variable to store the address of an array with the y positions of the splitters.
[out] | nSplitter | Pointer of a variable to store the number of splitters in the retrieved array.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
Since this function creates a new memory object containing the recognized data, the application should call kRecFree to free this memory area after evaluating the result.
The specification of this function in C# is:
RECERR kRecGetHSplitters(IntPtr hPage, IMAGEINDEX iiImg, int xZone, out int[] splitters);
kRecGetHSplitters
RECERR RECAPIKRN kRecGetHSplitters(HPAGE hPage, IMAGEINDEX iiImg, int xZone, int **pSplitters, int *nSplitter)
Getting the horizontal splitters.
The specification of this function in Java is:
int kRecGetHSplitters(HPAGE hPage, IMAGEINDEX iiImg, int xZone, IntOutputArray pSplitters)
The specification of this function in Python is:
def kRecGetHSplitters(hPage: "HPAGE", iiImg: int, xZone: int) -> Tuple[int, "IntArray"]

◆ kRecGetOCRCellCount()

RECERR RECAPIKRN kRecGetOCRCellCount | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | int * | pnCells )

Getting cell number.

The kRecGetOCRCellCount function gets the number of cells in a OCR zone.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the zone in the OCR zone list.
[out] | pnCells | Pointer to a variable to get the number of cells.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
RECERR kRecGetOCRCellCount(IntPtr hPage, int xZone, out int pnCells);
kRecGetOCRCellCount
RECERR RECAPIKRN kRecGetOCRCellCount(HPAGE hPage, int xZone, int *pnCells)
Getting cell number.
The specification of this function in Java is:
int kRecGetOCRCellCount(HPAGE hPage, int xZone, int[] pnCells)
The specification of this function in Python is:
def kRecGetOCRCellCount(hPage: "HPAGE", xZone: int) -> Tuple[int, int]

◆ kRecGetOCRCellInfo()

RECERR RECAPIKRN kRecGetOCRCellInfo | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | int | xZone,
 |  | int | CellIndex,
 |  | LPCELL_INFO | pCellInfo )

Getting cell information.

The kRecGetOCRCellInfo function gets the parameters of a cell in an OCR zone.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image, in which the coordinates of the cell information are given.
[in] | xZone | Index of the zone in the OCR zone list.
[in] | CellIndex | Index of the cell within the given zone.
[out] | pCellInfo | Pointer to a variable to get the structure of cell information.
Return values
RECERR
Note
The index of the first zone and of the first cell in the zone list and cell list is zero (0).
The specification of this function in C# is:
RECERR kRecGetOCRCellInfo(IntPtr hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, out CELL_INFO pCellInfo);
kRecGetOCRCellInfo
RECERR RECAPIKRN kRecGetOCRCellInfo(HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, LPCELL_INFO pCellInfo)
Getting cell information.
The specification of this function in Java is:
int kRecGetOCRCellInfo(HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, CELL_INFO pCellInfo)
The specification of this function in Python is:
def kRecGetOCRCellInfo(hPage: "HPAGE", iiImg: int, xZone: int, CellIndex: int) -> Tuple[int, "CELL_INFO"]

◆ kRecGetOCRCellName()

RECERR RECAPIKRN kRecGetOCRCellName | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | int | xCell,
 |  | LPTSTR * | ppCellName )

Querying the name of a table-cell.

The kRecGetOCRCellName queries the name of a cell of a table type OCR zone.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the OCR zone to be queried.
[in] | xCell | Index of the cell to be queried.
[out] | ppCellName | Address of a pointer to a string which will be allocated and filled by the API-call and will contain the name characters. (The string will be terminated with a null character.)
Return values
RECERR
Note
The index of the first zone and of the first cell in the zone list and cell list is zero (0).
Cell-name is used in form templates: it can be defined with Form Template Editor.
The memory allocated for *ppCellName can be released using kRecFree.
The specification of this function in C# is:
RECERR kRecGetOCRCellName(IntPtr hPage, int xZone, int xCell, out string ppCellName);
kRecGetOCRCellName
RECERR RECAPIKRN kRecGetOCRCellName(HPAGE hPage, int xZone, int xCell, LPTSTR *ppCellName)
Querying the name of a table-cell.
The specification of this function in Java is:
int kRecGetOCRCellName(HPAGE hPage, int xZone, int xCell, String[] ppCellName)
The specification of this function in Python is:
def kRecGetOCRCellName(hPage: "HPAGE", xZone: int, xCell: int) -> Tuple[int, str]

◆ kRecGetOCRTableDimensions()

RECERR RECAPIKRN kRecGetOCRTableDimensions | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | int * | pnRows,
 |  | int * | pnColumns )

Querying the dimensions of a table.

The kRecGetOCRTableDimensions queries the number of rows and columns of a table type OCR zone.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the OCR zone to be queried.
[out] | pnRows | Pointer to a variable for storing the number of rows.
[out] | pnColumns | Pointer to a variable for storing the number of columns.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
The dimensions are returned only if the table is regular, otherwise (0, 0) will be returned. Regular table is a table in which each horizontal splitter lasts from the left to the right of the table and each vertical splitter lasts from the top to the bottom of the table, so the table contains nRows * nColumns cells.
The specification of this function in C# is:
RECERR kRecGetOCRTableDimensions(IntPtr hPage, int xZone, int xCell, out int pnRows, out int pnColumns);
kRecGetOCRTableDimensions
RECERR RECAPIKRN kRecGetOCRTableDimensions(HPAGE hPage, int xZone, int *pnRows, int *pnColumns)
Querying the dimensions of a table.
The specification of this function in Java is:
int kRecGetOCRTableDimensions(HPAGE hPage, int xZone, int[] pnRows, int[] pnColumns)
The specification of this function in Python is:
def kRecGetOCRTableDimensions(hPage: "HPAGE", xZone: int) -> Tuple[int, int, int]

◆ kRecGetPointInfoFromTable()

RECERR RECAPIKRN kRecGetPointInfoFromTable | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | int | xZone,
 |  | POINT | Point,
 |  | int | xDist,
 |  | int | yDist,
 |  | int * | pCellIndex,
 |  | BORDERINDEX * | pBorderIndex )

Getting the index of the nearest border.

The kRecGetPointInfoFromTable function gets the cell index and the nearest border's index for a given point.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image, in which the coordinates of the point are given.
[in] | xZone | Index of the zone in the user zone list.
[in] | Point | The point inquired.
[in] | xDist | If the distance of the point from the left or right border is less then this, the output border index will be the index of the nearest one. See pBorderIndex.
[in] | yDist | If the distance of the point from the top or bottom border is less then this, the output border index will be the index of the nearest one. See pBorderIndex.
[out] | pCellIndex | Pointer of a variable to store the index of the cell, in which the given point is localized.
[out] | pBorderIndex | Pointer of a variable to store the index of the nearest border to the given point. Its value is always zero when the distance is greater than xDist and yDist from the proper border.
Return values
RECERR
Note
The index of the first zone and of the first cell in the zone list and in the cell list is zero (0).
The specification of this function in C# is:
RECERR kRecGetPointInfoFromTable(IntPtr hPage, IMAGEINDEX iiImg, int xZone, POINT Point, int xDist, int yDist, out int pCellIndex, out BORDERINDEX pBorderIndex);
kRecGetPointInfoFromTable
RECERR RECAPIKRN kRecGetPointInfoFromTable(HPAGE hPage, IMAGEINDEX iiImg, int xZone, POINT Point, int xDist, int yDist, int *pCellIndex, BORDERINDEX *pBorderIndex)
Getting the index of the nearest border.
The specification of this function in Java is:
int kRecGetPointInfoFromTable(HPAGE hPage, IMAGEINDEX iiImg, int xZone, POINT Point, int xDist, int yDist, int[] pCellIndex, BORDERINDEX[] pBorderIndex)
The specification of this function in Python is:
def kRecGetPointInfoFromTable(hPage: "HPAGE", iiImg: int, xZone: int, Point: "POINT", xDist: int, yDist: int) -> Tuple[int, int, int]

◆ kRecGetTableDimensions()

RECERR RECAPIKRN kRecGetTableDimensions | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | int * | pnRows,
 |  | int * | pnColumns )

Querying the dimensions of a table.

The kRecGetTableDimensions queries the number of rows and columns of a table type user zone.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the user zone to be queried.
[out] | pnRows | Pointer to a variable for storing the number of rows.
[out] | pnColumns | Pointer to a variable for storing the number of columns.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
The dimensions are returned only if the table is regular, otherwise (0, 0) will be returned. Regular table is a table in which each horizontal splitter lasts from the left to the right of the table and each vertical splitter lasts from the top to the bottom of the table, so the table contains nRows * nColumns cells.
The specification of this function in C# is:
RECERR kRecGetTableDimensions(IntPtr hPage, int xZone, int xCell, out int pnRows, out int pnColumns);
kRecGetTableDimensions
RECERR RECAPIKRN kRecGetTableDimensions(HPAGE hPage, int xZone, int *pnRows, int *pnColumns)
Querying the dimensions of a table.
The specification of this function in Java is:
int kRecGetTableDimensions(HPAGE hPage, int xZone, int[] pnRows, int[] pnColumns)
The specification of this function in Python is:
def kRecGetTableDimensions(hPage: "HPAGE", xZone: int) -> Tuple[int, int, int]

◆ kRecGetTabPositionInTable()

RECERR RECAPIKRN kRecGetTabPositionInTable | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | int | xZone,
 |  | POINT | Point,
 |  | POINT * | pTab )

Getting the next tabulator.

The kRecGetTabPositionInTable function gets the first tabulator position after the given position. The tabulator has only a horizontal position.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image, in which the coordinates of the points are given.
[in] | xZone | Index of the zone in the user zone list.
[in] | Point | The point inquired.
[out] | pTab | Pointer of a variable to store the position of the tabulator following Point.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
RECERR kRecGetTabPositionInTable(IntPtr hPage, IMAGEINDEX iiImg, int xZone, POINT Point, out POINT pTab);
kRecGetTabPositionInTable
RECERR RECAPIKRN kRecGetTabPositionInTable(HPAGE hPage, IMAGEINDEX iiImg, int xZone, POINT Point, POINT *pTab)
Getting the next tabulator.
The specification of this function in Java is:
int kRecGetTabPositionInTable(HPAGE hPage, IMAGEINDEX iiImg, int xZone, POINT Point, POINT pTab)
The specification of this function in Python is:
def kRecGetTabPositionInTable(hPage: "HPAGE", iiImg: int, xZone: int, Point: "POINT") -> Tuple[int, "POINT"]

◆ kRecGetVSplitters()

RECERR RECAPIKRN kRecGetVSplitters | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | int | xZone,
 |  | int ** | pSplitters,
 |  | int * | nSplitter )

Getting the vertical splitters.

The kRecGetVSplitters function gets the number and position of vertical splitters.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image whose coordinate system is used to report the splitters.
[in] | xZone | Index of the zone in the user zone list.
[out] | pSplitters | Pointer of a variable to store the address of an array with the x positions of the splitters.
[out] | nSplitter | Pointer of a variable to store the number of splitters in the retrieved array.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
Since this function creates a new memory object containing the recognized data, the application should call kRecFree to free this memory area after evaluating the result.
The specification of this function in C# is:
RECERR kRecGetVSplitters(IntPtr hPage, IMAGEINDEX iiImg, int xZone, out int[] splitters);
kRecGetVSplitters
RECERR RECAPIKRN kRecGetVSplitters(HPAGE hPage, IMAGEINDEX iiImg, int xZone, int **pSplitters, int *nSplitter)
Getting the vertical splitters.
The specification of this function in Java is:
int kRecGetVSplitters(HPAGE hPage, IMAGEINDEX iiImg, int xZone, IntOutputArray pSplitters)
The specification of this function in Python is:
def kRecGetVSplitters(hPage: "HPAGE", iiImg: int, xZone: int) -> Tuple[int, "IntArray"]

◆ kRecLocateTable()

RECERR RECAPIKRN kRecLocateTable | ( | int | sid,
 |  | HPAGE | hPage,
 |  | int | zone,
 |  | INTBOOL | bForce )

This function detects the columns within a table type user zone (WT_TABLE) of the page.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | zone | The index of the zone in the user zone list.
[in] | bForce | Force the zone type to be table. If it is FALSE the zone type may be changed to WT_GRAPHIC.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
See the description of table info creation.
The specification of this function in C# is:
RECERR kRecLocateTable(int sid, IntPtr hPage, int zone, bool bForce);
kRecLocateTable
RECERR RECAPIKRN kRecLocateTable(int sid, HPAGE hPage, int zone, INTBOOL bForce)
.
The specification of this function in Java is:
int kRecLocateTable(int sid, HPAGE hPage, int zone, int bForce)
The specification of this function in Python is:
def kRecLocateTable(sid: int, hPage: "HPAGE", zone: int, bForce: bool) -> int

◆ kRecLocateTableColumns()

RECERR RECAPIKRN kRecLocateTableColumns | ( | int | sid,
 |  | HPAGE | hPage,
 |  | int | zone )

Cell detection.

This function detects the cells within a table type user zone (WT_TABLE) of the page.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | zone | The index of the zone in the user zone list.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
See the description of table info creation.
The specification of this function in C# is:
RECERR kRecLocateTableColumns(int sid, IntPtr hPage, int zone);
kRecLocateTableColumns
RECERR RECAPIKRN kRecLocateTableColumns(int sid, HPAGE hPage, int zone)
Cell detection.
.
The specification of this function in Java is:
int kRecLocateTableColumns(int sid, HPAGE hPage, int zone)
The specification of this function in Python is:
def kRecLocateTableColumns(sid: int, hPage: "HPAGE", zone: int) -> int

◆ kRecMergeCells()

RECERR RECAPIKRN kRecMergeCells | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | int | xZone,
 |  | const RECT * | pRect )

Merging selected cells.

The kRecMergeCells function merges the selected cells if they make up a rectangle.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image, in which the coordinates of the selecting rectangle are to be given.
[in] | xZone | Index of the zone in the user zone list.
[in] | pRect | The cells intersected or contained by this rectangle are selected for this function.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
RECERR kRecMergeCells(IntPtr hPage, IMAGEINDEX iiImg, int xZone, RECT pRect);
kRecMergeCells
RECERR RECAPIKRN kRecMergeCells(HPAGE hPage, IMAGEINDEX iiImg, int xZone, const RECT *pRect)
Merging selected cells.
The specification of this function in Java is:
int kRecMergeCells(HPAGE hPage, IMAGEINDEX iiImg, int xZone, RECT pRect)
The specification of this function in Python is:
def kRecMergeCells(hPage: "HPAGE", iiImg: int, xZone: int, pRect: "RECT") -> int

◆ kRecMoveCellBorder()

RECERR RECAPIKRN kRecMoveCellBorder | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | int | xZone,
 |  | int | CellIndex,
 |  | BORDERINDEX | BorderIndex,
 |  | POINT | NewPosition )

Moving a cell border.

The kRecMoveCellBorder function moves a border.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image, in which the coordinates of the point are given.
[in] | xZone | Index of the zone in the user zone list.
[in] | CellIndex | Index of the cell within the given zone.
[in] | BorderIndex | The index of the border to be moved.
[in] | NewPosition | The new position of the given border.
Return values
RECERR
Note
The index of the first zone and of the first cell in the zone list and in the cell list is zero (0).
The specification of this function in C# is:
RECERR kRecMoveCellBorder(IntPtr hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, BORDERINDEX BorderIndex, POINT NewPosition);
kRecMoveCellBorder
RECERR RECAPIKRN kRecMoveCellBorder(HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, BORDERINDEX BorderIndex, POINT NewPosition)
Moving a cell border.
The specification of this function in Java is:
int kRecMoveCellBorder(HPAGE hPage, IMAGEINDEX iiImg, int xZone, int CellIndex, BORDERINDEX BorderIndex, POINT NewPosition)
The specification of this function in Python is:
def kRecMoveCellBorder(hPage: "HPAGE", iiImg: int, xZone: int, CellIndex: int, BorderIndex: int, NewPosition: "POINT") -> int

◆ kRecSetCellColor()

RECERR RECAPIKRN kRecSetCellColor | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | int | CellIndex,
 |  | REC_COLOR | color )

Setting the color of a cell.

The kRecSetCellColor function sets the color of a cell.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the zone in the user zone list.
[in] | CellIndex | Index of the cell within the given zone.
[in] | color | The color to be set.
Return values
RECERR
Note
The index of the first zone and of the first cell in the zone list and in the cell list is zero (0).
The specification of this function in C# is:
RECERR kRecSetCellColor(IntPtr hPage, int xZone, int CellIndex, uint color);
kRecSetCellColor
RECERR RECAPIKRN kRecSetCellColor(HPAGE hPage, int xZone, int CellIndex, REC_COLOR color)
Setting the color of a cell.
The specification of this function in Java is:
int kRecSetCellColor(HPAGE hPage, int xZone, int CellIndex, long color)
The specification of this function in Python is:
def kRecSetCellColor(hPage: "HPAGE", xZone: int, CellIndex: int, color: int) -> int

◆ kRecSetCellName()

RECERR RECAPIKRN kRecSetCellName | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | int | xCell,
 |  | LPCTSTR | pCellName )

Changing the name of a table-cell.

The kRecSetCellName changes the name of a cell of a table type user zone.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the user zone to be updated.
[in] | xCell | Index of the cell to be updated.
[in] | pCellName | Pointer to a string containing the name characters to be set. (The string is terminated with a null character.)
Return values
RECERR
Note
The index of the first zone and of the first cell in the zone list and cell list is zero (0).
Cell-name is used in form templates: it can be defined with Form Template Editor.
The specification of this function in C# is:
RECERR kRecSetCellName(IntPtr hPage, int xZone, int xCell, string pCellName);
kRecSetCellName
RECERR RECAPIKRN kRecSetCellName(HPAGE hPage, int xZone, int xCell, LPCTSTR pCellName)
Changing the name of a table-cell.
The specification of this function in Java is:
int kRecSetCellName(HPAGE hPage, int xZone, int xCell, String pCellName)
The specification of this function in Python is:
def kRecSetCellName(hPage: "HPAGE", xZone: int, xCell: int, pCellName: str) -> int

◆ kRecSetCells()

RECERR RECAPIKRN kRecSetCells | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | int | xZone,
 |  | LPCCELL_INFO | pCells,
 |  | int | nCells )

Setting cells.

The kRecSetCells function puts the given cell sequence into a WT_TABLE user zone. If the given zone does not have table information this function creates it. If the zone has any cell sequence the former one is replaced by the new one.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image whose coordinate system you have used in defining the cell borders.
[in] | xZone | Index of the zone in the user zone list.
[in] | pCells | Pointer to the array of cells to be set in the table.
[in] | nCells | The number of cells in the array.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
See the description of table info creation.
The function may rearrange the inserted cells.
When calling this function, ensure that the attributes of the splitters between cells are consistent: i.e. the same splitter attributes are specified by the neighboring cells. This is not checked by CSDK.
The specification of this function in C# is:
RECERR kRecSetCells(IntPtr hPage, IMAGEINDEX iiImg, int xZone, CELL_INFO[] pCells);
kRecSetCells
RECERR RECAPIKRN kRecSetCells(HPAGE hPage, IMAGEINDEX iiImg, int xZone, LPCCELL_INFO pCells, int nCells)
Setting cells.
The specification of this function in Java is:
int kRecSetCells(HPAGE hPage, IMAGEINDEX iiImg, int xZone, CELL_INFO pCells, int nCells)
The specification of this function in Python is:
def kRecSetCells(hPage: "HPAGE", iiImg: int, xZone: int, pCells: "CELL_INFO") -> int

◆ kRecSetOCRCellName()

RECERR RECAPIKRN kRecSetOCRCellName | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | int | xCell,
 |  | LPCTSTR | pCellName )

Changing the name of a table-cell.

The kRecSetOCRCellName changes the name of a cell of a table type OCR zone.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the OCR zone to be updated.
[in] | xCell | Index of the cell to be updated.
[in] | pCellName | Pointer to a string containing the name characters to be set. (The string is terminated with a null character.)
Return values
RECERR
Note
The index of the first zone and of the first cell in the zone list and cell list is zero (0).
Cell-name is used in form templates: it can be defined with Form Template Editor.
The specification of this function in C# is:
RECERR kRecSetOCRCellName(IntPtr hPage, int xZone, int xCell, string pCellName);
kRecSetOCRCellName
RECERR RECAPIKRN kRecSetOCRCellName(HPAGE hPage, int xZone, int xCell, LPCTSTR pCellName)
Changing the name of a table-cell.
The specification of this function in Java is:
int kRecSetOCRCellName(HPAGE hPage, int xZone, int xCell, String pCellName)
The specification of this function in Python is:
def kRecSetOCRCellName(hPage: "HPAGE", xZone: int, xCell: int, pCellName: str) -> int

◆ kRecSplitCells()

RECERR RECAPIKRN kRecSplitCells | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | int | xZone,
 |  | INTBOOL | bVertical,
 |  | const RECT * | pRect,
 |  | POINT | Position,
 |  | int | LineWidth,
 |  | int | LineStyle,
 |  | REC_COLOR | lineColor )

Splitting the selected cells.

The kRecSplitCells function splits the cells (if the cut is in a selected area, only the selected cells are affected). This function supposes that the given user zone already has table information.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image, in which the position coordinates and the selecting rectangle must be given.
[in] | xZone | Index of the zone in the user zone list.
[in] | bVertical | This determines whether the splitter is vertical or not.
[in] | pRect | The cells intersected or contained by this rectangle are selected for this function.
[in] | Position | The position of the splitter.
[in] | LineWidth | The width of the splitter.
[in] | LineStyle | The style of the splitter.
[in] | lineColor | The color of the line.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
RECERR kRecSplitCells(IntPtr hPage, IMAGEINDEX iiImg, int xZone, bool bVertical, RECT pRect, POINT Position, int LineWidth, RLSTYLE LineStyle, int lineColor);
RLSTYLE
RLSTYLE
Possible types of lines.
Definition KernelApi.h:5238
kRecSplitCells
RECERR RECAPIKRN kRecSplitCells(HPAGE hPage, IMAGEINDEX iiImg, int xZone, INTBOOL bVertical, const RECT *pRect, POINT Position, int LineWidth, int LineStyle, REC_COLOR lineColor)
Splitting the selected cells.
The specification of this function in Java is:
int kRecSplitCells(HPAGE hPage, IMAGEINDEX iiImg, int xZone, int bVertical, RECT pRect, POINT Position, int LineWidth, int LineStyle, long lineColor)
The specification of this function in Python is:
def kRecSplitCells(hPage: "HPAGE", iiImg: int, xZone: int, bVertical: bool, pRect: "RECT", Position: "POINT", LineWidth: int, LineStyle: int, lineColor: "REC_COLOR") -> int


RecAPI: CELL_INFO Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
CELL_INFO Struct Reference
KernelAPI » Zone Handling Module » Table Recognition Module

Structure of a cell in a table. More...

#include <KernelApi.h>

Public Attributes

RECT | rect
Coordinates of the cell.
ZONETYPE | type
Cell type (WT_FLOW, WT_VERTTEXT, WT_LEFTTEXT, WT_RIGHTTEXT).
REC_COLOR | cellcolor
Background color of the cell.
REC_COLOR | lcolor
Left border color of the cell.
REC_COLOR | tcolor
Top border color of the cell.
REC_COLOR | rcolor
Right border color of the cell.
REC_COLOR | bcolor
Bottom border color of the cell.
RLSTYLE | lstyle
Left border style.
RLSTYLE | tstyle
Top border style.
RLSTYLE | rstyle
Right border style.
RLSTYLE | bstyle
Bottom border style.
BYTE | lwidth
Left border width in pixels.
BYTE | twidth
Top border width in pixels.
BYTE | rwidth
Right border width in pixels.
BYTE | bwidth
Bottom border width in pixels.
int | ref
Internal use only.
UINT | flags
Internal use only.

Detailed Description

Structure of a cell in a table.

This contains all the accessible information about a table cell. See kRecGetCellInfo.


RecAPI: _ZONE Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
_ZONE Struct Reference
KernelAPI » Zone Handling Module

ZONE structure. More...

#include <KernelApi.h>

Public Attributes

RECT | rectBBox
ZONETYPE type
DWORD | userdata
DWORD | chk_control
FILLINGMETHOD fm
RECOGNITIONMODULE rm
CHR_FILTER filter
LPCHECKWORD_CB chk_fn
char | chk_sect [MAXSECTNAMELEN]

Detailed Description

ZONE structure.

The ZONE structure contains all the necessary information for describing a zone. A zone is a rectangular or pizza-box shaped area on an image (Only OMR zones can be non-pizza-box shaped; and table zones and vertical text zones must be rectangular), but ZONE contains only its bounding box. It contains a feature of interest to the user. The image data covered by each zone is handled and processed (typically recognized) separately. A very first classification of the zones is their type: whether a zone's area is to be recognized or it should be treated as graphic. Zones containing textual information can be either flowed type or table type zones. This basic classification of zones helps the Engine to handle the textual information correctly. Zones are always associated with a FILLINGMETHOD filling method and one of the available RECOGNITIONMODULE recognition modules. These determine what kind of recognition algorithm is applied to the zone during its processing. For possible RM-FM pairs see Filling method - Recognition module combinations.

Note
Zones in a page are built into a sequential list, called the zone list. Each zone receives an internal index number, reflecting its position in this list. In some cases this zone order even determines the zone content order in the final output document. The index of the first zone in the zone list is zero (0).
It is recommended to create homogeneous user zones as much as possible, because they may give better results. It is especially important in the case of Asian languages. WT_AUTO zones can be inhomogeneous.

Member Data Documentation

◆ chk_control

DWORD _ZONE::chk_control

Checking control bit mask flag. It controls how the checking module checks the recognized result for the zone.

◆ chk_fn

LPCHECKWORD_CB _ZONE::chk_fn

Deprecated. Set it to NULL.

◆ chk_sect

char _ZONE::chk_sect[MAXSECTNAMELEN]

Deprecated. Set it to an empty string.

◆ filter

CHR_FILTER _ZONE::filter

Character Set filter for the zone (CHR_FILTER). It is used to modify the set of valid characters for recognition of the zone. Specifying the Character Set correctly is a recognition accuracy issue.

◆ fm

FILLINGMETHOD _ZONE::fm

Zone filling method (FILLINGMETHOD).

◆ rectBBox

RECT _ZONE::rectBBox

Bounding box of the rects. To obtain the exact layout of the zone call kRecGetZoneLayout or kRecGetOCRZoneLayout.

◆ rm

RECOGNITIONMODULE _ZONE::rm

Recognition module associated with the zone (RECOGNITIONMODULE).

◆ type

ZONETYPE _ZONE::type

Zone type.

◆ userdata

DWORD _ZONE::userdata

User-defined content. This field can be freely used by the application for storing zone-specific information. Additional user-defined zone attributes can be set by kRecSetZoneAttribute.


RecAPI: ZONEDATA Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
ZONEDATA Struct Reference
KernelAPI » Zone Handling Module

ZONEDATA structure. More...

#include <KernelApi.h>

Public Attributes

REC_COLOR color

Detailed Description

ZONEDATA structure.

Member Data Documentation

◆ color

REC_COLOR ZONEDATA::color

Color of the zone.


RecAPI: Form Recognition Module

Classes | Typedefs | Enumerations | Functions
Form Recognition Module
KernelAPI

Form recognition module. Supported on: Windows, Linux, Embedded Linux, MacOS. More...

Classes

struct COMB_CELL_INFO
Structure of a comb-cell in a comb. More...

Typedefs

typedef void * | HFORMTEMPLATEPAGE
Handle of a form template page in memory.
typedef void * | HFORMTEMPLATECOLLECTION
Handle of a Form Template Collection in memory.
typedef void * | FORMTEMPLATEMATCHINGID
Id of a matching form template. This ID identifies a matching in Form Template Collection.

Enumerations

enum ANCHORCONTENT {
AC_TEXT ,
AC_BITMAP ,
AC_BARCODE ,
AC_LINE ,
AC_LETTERS ,
AC_SIZE
}
Content of the anchor zone. More...
enum ANCHORTYPE {
AT_POSITIONAL ,
AT_SELECTOR ,
AT_REFERENCE ,
AT_CHECK ,
AT_SIZE
}
Type of anchor zone. More...
enum ANCHORFLAG {
AF_REGEXP ,
AF_RECOGNIZE ,
AF_REGEXPDIDNTMATCH ,
AF_CHECKED
}
Flags of anchor zones. More...
enum ANCHOR_REF_POINT {
REF_AUTO ,
REF_CENTRE ,
REF_TOP_LEFT ,
REF_TOP_RIGHT ,
REF_BOTTOM_LEFT ,
REF_BOTTOM_RIGHT
}
Reference point of the anchor. More...
enum REF_ANCHOR_MODE {
REF_ANCHOR_0 ,
REF_ANCHOR_1 ,
REF_ANCHOR_2 ,
REF_ANCHOR_4
}
Zone attribute that specifies how the zone is anchored to reference anchors(s). More...
enum COMB_SPLITTER_HEIGHT {
HALF_HEIGHT ,
FULL_HEIGHT
}
comb attributes More...
enum FORMRECOGNITIONSTATE {
FRS_OK ,
FRS_NOTPOSITIONED ,
FRS_DATARULENOTMATCHED
}
Form recognition state. More...

Functions

RECERR RECAPIKRN | kRecCreateFormTemplate (int sid, HPAGE hPage)
Creating form template for processing filled forms.
RECERR RECAPIKRN | kRecSaveFormTemplate (int sid, HPAGE hPage, LPCTSTR pTemplateFilename)
Saving user zones in a form template file.
RECERR RECAPIKRN | kRecLoadFormTemplate (int sid, HFORMTEMPLATEPAGE *phFormTemplatePage, LPCTSTR pTemplateFilename)
Loading a form template from a form template file.
RECERR RECAPIKRN | kRecApplyFormTemplate (int sid, HPAGE hPage, HFORMTEMPLATEPAGE hFormTemplatePage)
Applying a form template - based on a preloaded form template.
RECERR RECAPIKRN | kRecFreeFormTemplate (HFORMTEMPLATEPAGE hFormTemplatePage)
Removing a form template page.
RECERR RECAPIKRN | kRecApplyFormTemplateFile (int sid, HPAGE hPage, LPCTSTR pTemplateFilename)
Applying a form template - directly based on a form template file.
RECERR RECAPIKRN | kRecSetZoneFormFieldName (HPAGE hPage, int nZone, LPCWSTR pFormFieldName)
Changing the name of a form-field attached to a user-zone.
RECERR RECAPIKRN | kRecSetOCRZoneFormFieldName (HPAGE hPage, int nZone, LPCWSTR pFormFieldName)
Changing the name of a form-field attached to an OCR-zone.
RECERR RECAPIKRN | kRecGetZoneFormFieldName (HPAGE hPage, int nZone, LPWSTR *ppFormFieldName)
Querying the name of a user-zone.
RECERR RECAPIKRN | kRecGetOCRZoneFormFieldName (HPAGE hPage, int nZone, LPWSTR *ppFormFieldName)
Querying the name of an OCR-zone.
RECERR RECAPIKRN | kRecSetZoneName (HPAGE hPage, int nZone, LPCTSTR pZoneName)
Changing the name of a user-zone.
RECERR RECAPIKRN | kRecSetOCRZoneName (HPAGE hPage, int nZone, LPCTSTR pZoneName)
Changing the name of an OCR-zone.
RECERR RECAPIKRN | kRecGetZoneName (HPAGE hPage, int nZone, LPTSTR *ppZoneName)
Querying the name of a user-zone.
RECERR RECAPIKRN | kRecGetOCRZoneName (HPAGE hPage, int nZone, LPTSTR *ppZoneName)
Querying the name of an OCR-zone.
RECERR RECAPIKRN | kRecGetNextZoneByName (HPAGE hPage, LPCTSTR pZoneName, int nPrevZone, int *nZone)
Querying the next zone with the given name.
RECERR RECAPIKRN | kRecInsertAnchorZone (int sid, HPAGE hPage, ANCHORCONTENT aContent, ANCHORTYPE aType, int nZone)
Inserting anchor zone.
RECERR RECAPIKRN | kRecUpdateAnchorZone (int sid, HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pRect, int nZone)
Updating anchor zone info.
RECERR RECAPIKRN | kRecGetAnchorInfo (HPAGE hPage, int nZone, ANCHORCONTENT *aContent, ANCHORTYPE *aType)
Returning anchor content and type.
RECERR RECAPIKRN | kRecSetAnchorContent (HPAGE hPage, int nZone, ANCHORCONTENT aContent)
Setting anchor content.
RECERR RECAPIKRN | kRecSetAnchorType (HPAGE hPage, int nZone, ANCHORTYPE aType)
Setting anchor type.
RECERR RECAPIKRN | kRecSetAnchorFlag (HPAGE hPage, int nZone, ANCHORFLAG flag, INTBOOL value)
Changing anchor zone flags.
RECERR RECAPIKRN | kRecGetAnchorFlag (HPAGE hPage, int nZone, ANCHORFLAG flag, INTBOOL *value)
Getting anchor zone flag.
RECERR RECAPIKRN | kRecSetAnchorText (HPAGE hPage, int nZone, LPCWSTR pText)
Setting the text attribute of text and barcode anchors.
RECERR RECAPIKRN | kRecGetAnchorText (HPAGE hPage, int nZone, LPWSTR *ppText)
Getting the text attribute of text and barcode anchors.
RECERR RECAPIKRN | kRecSetAnchorRegExp (HPAGE hPage, int nZone, LPCWSTR pRegExp)
Setting regular expression of text and barcode anchors.
RECERR RECAPIKRN | kRecGetAnchorRegExp (HPAGE hPage, int nZone, LPWSTR *ppRegExp)
Getting regular expression of text and barcode anchors.
RECERR RECAPIKRN | kRecSetAnchorDrift (HPAGE hPage, IMAGEINDEX iiImg, int nZone, SIZE drift)
Setting the drift area of text and barcode anchors.
RECERR RECAPIKRN | kRecGetAnchorDrift (HPAGE hPage, IMAGEINDEX iiImg, int nZone, SIZE *pDrift)
Getting the drift area of text and barcode anchors.
RECERR RECAPIKRN | kRecSetZoneBarTypes (HPAGE hPage, int nZone, LPCBAR_ENA pBarEna, INTBOOL BarBinary)
Enabling barcode types for a zone.
RECERR RECAPIKRN | kRecGetZoneBarTypes (int sid, HPAGE hPage, int nZone, LPBAR_ENA pBarEnaOut, INTBOOL *pBarBinary, INTBOOL *pZoneLevel)
Getting the enabled barcode types for a zone.
RECERR RECAPIKRN | kRecGetOCRZoneBarTypes (int sid, HPAGE hPage, int nZone, LPBAR_ENA pBarEnaOut, INTBOOL *pBarBinary, INTBOOL *pZoneLevel)
Getting the enabled barcode types for an OCR zone.
RECERR RECAPIKRN | kRecSetAnchorRefPoint (HPAGE hPage, int nZone, ANCHOR_REF_POINT ref)
Setting the reference point of the anchor zone.
RECERR RECAPIKRN | kRecGetAnchorRefPoint (HPAGE hPage, int nZone, ANCHOR_REF_POINT *pref)
Getting the reference point of the anchor zone.
RECERR RECAPIKRN | kRecInsertDropOutColorZone (HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pRect, int nZone)
Inserting dropout color zone.
RECERR RECAPIKRN | kRecGetDropOutColorZoneIndex (HPAGE hPage, int *pnZone)
Getting the index of the dropout color zone.
RECERR RECAPIKRN | kRecSetFormTemplateName (HPAGE hPage, LPCTSTR pTemplateName)
Setting the name of the form template.
RECERR RECAPIKRN | kRecGetFormTemplateName (HPAGE hPage, LPTSTR *pTemplateName)
Getting the name of the form template.
RECERR RECAPIKRN | kRecCheckFormTemplate (int sid, HPAGE hPage)
Checking the form template.
RECERR RECAPIKRN | kRecSetZoneRefAnchors (HPAGE hPage, int nZone, REF_ANCHOR_MODE mode, const int *refAnchors)
Setting the reference anchor(s) of the zone.
RECERR RECAPIKRN | kRecGetZoneRefAnchors (HPAGE hPage, int nZone, REF_ANCHOR_MODE *pmode, int *refAnchorsOut)
Getting the reference anchor(s) of the zone.
RECERR RECAPIKRN | kRecSetTemplateAttribute (HPAGE hPage, LPCTSTR key, LPCTSTR value)
Setting user defined attribute of a form template.
RECERR RECAPIKRN | kRecGetTemplateAttribute (HPAGE hPage, LPCTSTR key, LPTSTR *pValue)
Getting user defined attribute of a form template.
RECERR RECAPIKRN | kRecGetNextTemplateAttribute (HPAGE hPage, LPCTSTR prevkey, LPTSTR *key, LPTSTR *value)
Querying the names and the values of the user defined attributes of a form template.
RECERR RECAPIKRN | kRecSetZoneAttribute (HPAGE hPage, int nZone, LPCTSTR key, LPCTSTR value)
Setting user defined attribute of a user zone.
RECERR RECAPIKRN | kRecGetZoneAttribute (HPAGE hPage, int nZone, LPCTSTR key, LPTSTR *pValue)
Getting user defined attribute of a user zone.
RECERR RECAPIKRN | kRecGetOCRZoneAttribute (HPAGE hPage, int nZone, LPCTSTR key, LPTSTR *pValue)
Getting user defined attribute of an OCR zone.
RECERR RECAPIKRN | kRecGetNextZoneAttribute (HPAGE hPage, int nZone, LPCTSTR prevkey, LPTSTR *key, LPTSTR *value)
Querying the names and the values of the user defined attributes of a user zone.
RECERR RECAPIKRN | kRecGetNextOCRZoneAttribute (HPAGE hPage, int nZone, LPCTSTR prevkey, LPTSTR *key, LPTSTR *value)
Querying the names and the values of the user defined attributes of an OCR zone.
RECERR RECAPIKRN | kRecSetZoneOrder (HPAGE hPage, const int *order)
Changing the order of the user zones.
RECERR RECAPIKRN | kRecGetOCRZoneText (int sid, HPAGE hPage, int nZone, LPTSTR *pBuffer, int *len)
Getting the recognized text in the given OCR zone.
RECERR RECAPIKRN | kRecGetOCRTableCellText (int sid, HPAGE hPage, int nZone, int nCellInd, LPTSTR *pBuffer, int *len)
Getting the recognized text in the given cell of the given OCR zone.
RECERR RECAPIKRN | kRecLoadFormTemplateLibrary (int sid, LPCTSTR pTmplLib, INTBOOL bLoadSTS, HFORMTEMPLATEPAGE **pphFormTmplArray, int *pLength)
Loading form template library.
RECERR RECAPIKRN | kRecFreeFormTemplateArray (HFORMTEMPLATEPAGE *phFormTmplArray, int Length, INTBOOL bFreeArray)
Freeing the array of form template handles.
RECERR RECAPIKRN | kRecGetFormTemplateInfo (HFORMTEMPLATEPAGE hFormTmpl, LPTSTR *pFullName, LPTSTR *pFormPath, int *pFormPage)
Getting information about a form template.
RECERR RECAPIKRN | kRecFindFormTemplate (int sid, HPAGE hPage, HFORMTEMPLATEPAGE *phFormTmplArray, int Length, LPCTSTR FormPath, int FirstPage, int LastPage, HFORMTEMPLATECOLLECTION *phFormTmplCollection, FORMTEMPLATEMATCHINGID *pBestMatchingId, int *pConfidence, int *pnMatching)
Finding the matching template(s).
RECERR RECAPIKRN | kRecGetFindFormTemplateInfo (HFORMTEMPLATECOLLECTION hFormTmplCollection, LPTSTR *pInfo)
Getting info about the previous kRecFindFormTemplate call.
RECERR RECAPIKRN | kRecGetNextMatchingTemplate (FORMTEMPLATEMATCHINGID PrevMatchingId, FORMTEMPLATEMATCHINGID *pNextMatchingId, int *pConfidence)
Querying the matching form templates.
RECERR RECAPIKRN | kRecGetMatchingInfo (FORMTEMPLATEMATCHINGID MatchId, LPTSTR *pFullName, LPTSTR *pName, int *pPageNumber, int *pPageCount)
Getting information about a matching.
RECERR RECAPIKRN | kRecApplyFormTemplateEx (int sid, HPAGE hPage, FORMTEMPLATEMATCHINGID MatchingId)
Applying form template - based on a previous kRecFindFormTemplate call.
RECERR RECAPIKRN | kRecFreeFormTemplateCollection (HFORMTEMPLATECOLLECTION hFormTmplCollection)
Freeing a Form Template Collection.
RECERR RECAPIKRN | kRecLocateComb (int sid, HPAGE hPage, int xZone)
Analyzing image and detecting comb cells.
RECERR RECAPIKRN | kRecCreateCombInfo (HPAGE hPage, int xZone, INTBOOL hasTopBorder, COMB_SPLITTER_HEIGHT splitterHeight)
Creating comb info.
RECERR RECAPIKRN | kRecDeleteCombInfo (HPAGE hPage, int xZone)
Deleting comb info.
RECERR RECAPIKRN | kRecIsComb (HPAGE hPage, int xZone, INTBOOL *isComb)
Returning whether the zone has comb info.
RECERR RECAPIKRN | kRecGetCombCellCount (HPAGE hPage, int xZone, int *pnCells)
Returning the number of cells in a comb.
RECERR RECAPIKRN | kRecSetCombInfo (HPAGE hPage, int xZone, INTBOOL hasTopBorder, COMB_SPLITTER_HEIGHT splitterHeight)
Setting comb attributes.
RECERR RECAPIKRN | kRecGetCombInfo (HPAGE hPage, int xZone, INTBOOL *hasTopBorder, COMB_SPLITTER_HEIGHT *splitterHeight)
Getting comb attributes.
RECERR RECAPIKRN | kRecSetCombCells (HPAGE hPage, IMAGEINDEX iiImg, int xZone, const COMB_CELL_INFO *pCells, int nCells)
Setting the cells of a comb.
RECERR RECAPIKRN | kRecGetCombCells (HPAGE hPage, IMAGEINDEX iiImg, int xZone, COMB_CELL_INFO **ppCells, int *pnCells)
Getting the cells of a comb.
RECERR RECAPIKRN | kRecGetOCRZoneFormRecognitionState (HPAGE hPage, int xZone, FORMRECOGNITIONSTATE *pInfo, int *pNumModChar, LPTSTR *ppDataRuleName)
Retrieving information about the result of the form recognition.

Detailed Description

Form recognition module. Supported on: Windows, Linux, Embedded Linux, MacOS.

The form recognition module supports two form processing workflows:

  • Analyzing empty non-filled forms and converting them into one of several active (fillable) digital form document formats.
  • Recognizing the contents of filled forms based on pre-constructed form templates and outputting the respondent data contents in some kind of digital format that can be easily processed.

Analysis and activation of empty forms

IMPORTANT NOTE: LFR is not designed to handle character layouts of non-Latin (such as Simplified Chinese, Traditional Chinese, Japanese, Korean, Arabic, Thai, or Hebrew) alphabets. Using LFR with these languages is not supported and can cause unexpected behavior.

The current empty form recognition core is mainly based on the Logical Form Recognition™ (LFR) technology which was the backbone of OmniForm, and is now an integrated part of the OmniPage Capture SDK. LFR recognizes textual and non-textual elements in empty forms - like check boxes, circle texts, comb fields, tables/cells, graphics, lines and boxes. These detected form field zones cannot be modified programmatically, but the page can be viewed and modified in the Text Editor Visual control (TEC). (TEC cannot be accessed from the RecAPI layer of CSDK, it is a part of the Visual Toolbox. For more information, see the separated help system of the Visual Toolbox.)

The aim is to turn a form image into a fillable electronic form that can be distributed to respondents or posted on a website. The data in the returned forms can then be processed by any suitable means, outside the scope of the CSDK. It is expected that the filled form data will be returned electronically, so there is no need here for anchor zones.

Typical processing workflow:

  1. Load a single-page image of a form.
  2. Specify the whole page as a single form page (by setting the page descriptor flag LZ_FORM) or define one or more separate form type user zones (WT_FORM) manually.
  3. Perform page decomposition. LFR will run inside the defined form zone(s), as part of the Zone Handling Module, auto-detecting form elements and creating active form controls. (kRecLocateZones, or implicitly during kRecRecognize)
  4. Inspect the auto-detected form objects in the TEC visual control. Move, resize or delete them as required. Add new objects if needed. TEC also lets you view and modify form object attributes. As we mentioned above, these modifications cannot be performed through the RecAPI layer of CSDK.
  5. Save the results to a format that supports active form elements: formatted XML, RTF (Microsoft Word) and PDF (optionally with Acro-Form-like fillable field definitions).
  6. Form object attributes can also be modified in the target application.
Note
When processing empty forms using a drop-out color, it is recommended to apply auto-deskewing (if desired) when the original image enters into the Engine’s responsibility, or at least before the OCR image is created. Typically with forms, auto-deskew relies on finding printed lines or text lines that are usually form labels. Precisely these elements are removed by applying a drop-out color, so calling auto-deskew when the OCR image is already created is liable to fail. A possible workaround may be the following:
  1. Set drop-out color weights to default (77,150,29).
  2. Detect skew (kRecDetectImgSkew)
  3. Set drop-out color weights
  4. Set slope and rotation (kRecSetImgDeskew, kRecSetImgSlope, kRecSetImgRotation)
  5. Preprocess the image
Furthermore, it is not recommended to apply deskew (or kRecPreprocessImg) when the filled form is processed with kRecApplyFormTemplate, because this function itself performs the necessary image transformations (rotation, deskew, scaling in order to fit the image to the template).

Recognition of filled forms

The main steps of filled form recognition are:

  • Template definition step: define form template(s) with form-field and anchor zone placement and save the template(s) to form template file or form template library. Use the Form Template Editor (supported on: Windows) to create, edit and test form template libraries.
  • Processing step:
    • template selection: The appropriate template for each scanned image is selected automatically during form processing. Template selection happens with the help of selector, positional and reference anchors.
    • template registration/ application: The selected template is matched on the image. The image and/or the zones are deskewed, shifted, enlarged or compressed to match one another. This is also called form registration. Template matching happens with the help of positional and reference anchors.
    • recognition of form contents, using the usual recognition tool-set.

The form template is a set of form-field zones (fill zones) and anchor definitions (anchor zones). Form-field zones are normal input zones with some additional layout information attached; they identify the areas where we require fill-in data on a specific form-page (e.g. fill-texts, combs, checkboxes). Anchor definitions are specified as ignore zones during template definition, and receive some additional information when the template is saved, to assist the matching of the template to incoming forms.

The form template library is a ZIP file that may contain one or more form templates in hierarchical directory structure.

The template library contains template files (*.zon), and may contain a setting file in the root directory (Settings.sts), the other files in the ZIP files are ignored by OPSDK.

The structure of the library can be arbitrary, but there are two proposed structures that are supported by Form Template Editor.

  1. Library that contains templates of single-page forms. In this case each template is in the root of the ZIP file and the file does not contain more folders.
    The typical structure of a single-page form template library is:
    • Setting.sts
    • TemplateA.zon
    • TemplateB.zon
    • ...
  2. Library that contains templates of multi-page forms. In this case 2-level library is created: the ZIP file contains container folders, and the container folders contain the templates. The name of the templates contain the number of the page in the form: <name>.<page-number>.zon
    The page-number of the first page is 0.
    The typical structure of a multi-page form template library is:
    • Setting.sts
    • TemplateA
      • TemplateA.0.zon
      • TemplateA.1.zon
      • TemplateA.2.zon
      • ...
    • TemplateB
      • TemplateB.0.zon
      • TemplateB.1.zon
      • TemplateB.2.zon
      • ...
    • ...

Creating a form template definition file

The most convenient way is to use the Form Template Editor (supported on: Windows) for creating and editing form templates and form template libraries.

You can create and save form templates using the OPSDK API functions as well, but there is no OPSDK API for saving form template library.

Typical workflows to create a form template using OPSDK API functions (step two has four alternatives):

  1. A single-page empty form image is loaded. (kRecLoadImg) If it is scanned, automatic deskewing is recommended. If from file, any supported image file format is acceptable, including any flavor of PDF – these are all treated as imaged input. The input can also be an active PDF form (see how it is handled under 2d). In all cases, the form should contain distinctive shapes (preferably four) to be used as anchors for incoming forms. These shapes should not be printed in a color that is to be dropped-out programmatically.
  2. Form objects
    1. Manual zoning
      User inserts flow text zones (kRecInsertZone, WT_FLOW) if their exact position on the page is known and also specifies up to four ignore zones (WT_IGNORE) that contain the shapes to be used as anchors.
    2. Auto-detection of form objects
      User calls LFR to identify form objects (page descriptor is LZ_FORM, kRecLocateZones, or page descriptor is not LZ_FORM, one or some WT_FORM zones are drawn, kRecLocateZones), then calls the Create Template function to create user zones from the form objects (kRecCreateFormTemplate). This may also detect the anchor shapes and create ignore zones for them.
    3. XML form object definition
      User loads the XML output from OmniPage 15 or later (kRecLoadZones), having used it to process the empty form, optionally having changed the LFR output in the OmniPage Text Editor and exported the page to XML output. This output contains information about form objects. The loading process parses the XML file and creates user zones and anchors based on the file.
    4. Active PDF form
      User opens an active PDF form, containing suitable Acro-Form controls for both form objects and anchors. In this case LFR does not need to run, just call the Create Template function.
  3. In all cases, User can access or modify the user zones before they are saved. This can be done in the Text Editor visual control as already described or by KernelAPI calls. In cases 2a-2c, the anchor zones may also be modified. In case 2d (active PDF forms) the anchor zones must not be modified. KernelAPI functions allow form-field identifiers and attributes to be attached to the user zones. These include restrictions to zone content from the checking subsystem – such as regular expressions, dictionaries, character filters like ‘numbers-only’, or other user-defined checking routines.
  4. The Save Template function saves the zone set (kRecSaveFormTemplate), including the attached items and the anchor bitmaps into a template file. This is a standard CSDK zone file extended with anchor data.

Processing filled forms

Using form template library:

  1. Load form template library (kRecLoadFormTemplateLibrary). An array of form template handles is returned.
  2. For each filled form image:
    1. Load the image (kRecLoadImg). An HPAGE is returned.
    2. Preprocess the image (kRecPreprocessImg).
    3. Find matching template (kRecFindFormTemplate). A Form Template Collection handle is returned.
    4. Apply form template (kRecApplyFormTemplateEx)
    5. Call recognition (kRecRecognize).
    6. Query or export recognized text (kRecGetOCRZoneText, kRecGetLetters, kRecConvert2DTXT, ...)
    7. Free Form Template Collection handle.
    8. Free HPAGE (kRecFreeImg)
  3. Free the array of form template handles (kRecFreeFormTemplateArray).

Using single form template:

  1. User loads a filled form image (kRecLoadImg).
  2. Preprocess the image (kRecPreprocessImg).
  3. The function registers the form using anchor information (kRecApplyFormTemplate) from the template file (created by the steps above). The function transforms the image to fit to form objects and puts form zones on the image.
  4. User calls recognition (kRecRecognize).
  5. Recognition result
    1. Hardcore form application gets the letters and processes them somehow (kRecGetLetters).
    2. User exports the result into a CSV file (kRecConvert2DTXT).
    3. User inserts the page into a RecAPIPlus document and later exports the page into a proper output (RecInsertPage).
Note
The working of the Form Recognition Module can also be adjusted with settings in some points.
See also the topic Retrieved data format of kRecGetFindFormTemplateInfo

Tables in form templates

Starting with version 20.3, form template can contain table type zones as well. When defining a table with Form Template Editor, only the vertical splitters can be defined. When the form template is applied to the image, the horizontal rows will be determined and the horizontal splitters will be inserted into the table. The created table will be regular in the sense that each horizontal splitter lasts from the left to the right of the table and each vertical splitter lasts from the top to the bottom of the table. You can query the dimensions (the number of cell rows and columns) of the table with kRecGetTableDimensions and kRecGetOCRTableDimensions functions.

When defining the table cell names can be given. When the form template is applied to the image, the initial cells will be split, and each cell inherits the name of the initial cell. You can query the names of the cells with kRecGetCellName kRecGetOCRCellName.

Form Data Extraction

This form processing is based on Logical Form Recognition technology (LFR). CSDK 16 introduced a new method of extracting form data, called FDE (Form Data Extraction). It can be considered a simplified method for collating form data to the CSV format within a workflow. Please consult the RecAPIPlus module Form Data Extraction Module for a description of FDE and a comparison table on the advantages and limitations of FDE and LFR.

Enumeration Type Documentation

◆ ANCHOR_REF_POINT

enum ANCHOR_REF_POINT

Reference point of the anchor.

Each anchor zone has a reference point. The reference point can be the center or a corner of the bounding box. The reference point is more relevant if the text length can vary (with regular expressions).

Enumerator
REF_AUTO | if no regexp: centre, else top-left
REF_CENTRE | centre of the bounding box
REF_TOP_LEFT | top-left corner of the bounding box
REF_TOP_RIGHT | top-right corner of the bounding box
REF_BOTTOM_LEFT | bottom-left corner of the bounding box
REF_BOTTOM_RIGHT | bottom-right corner of the bounding box

◆ ANCHORCONTENT

enum ANCHORCONTENT

Content of the anchor zone.

Content determines what the actual information sought is.

Enumerator
AC_TEXT | The anchor contains static text. It is word based with a bounding box. It may contain fixed text or regular expression filter. Text can be positional, reference, selector and check anchor.
AC_BITMAP | Anchor contains bitmap (deprecated).
AC_BARCODE | The anchor contains static barcode. The barcode type must be specified. It may contain fixed text or regular expression filter. Barcode can be positional, reference, selector and check anchor.
AC_LINE | Anchor contains rule line (for future realization).
AC_LETTERS | Anchor contains letters (deprecated).

◆ ANCHORFLAG

enum ANCHORFLAG

Flags of anchor zones.

Enumerator
AF_REGEXP | Use regular expression during matching (read only).
AF_RECOGNIZE | Recognize anchor zone.
AF_REGEXPDIDNTMATCH | Regexp did not match (read only).
AF_CHECKED | Anchor checked (read only).

◆ ANCHORTYPE

enum ANCHORTYPE

Type of anchor zone.

Type defines what the anchor's function is in form recognition and template creation

Enumerator
AT_POSITIONAL | Positional anchor: Use these anchor zones to align all zones on the page. Since images can get distorted (especially digital camera pictures of documents taken from a steep angle) using four of such anchors is recommended. It is a page-level operation.
AT_SELECTOR | Selector anchor: Selector anchors do not have role in form alignment and positioning; they are used only for selecting the template (whether the template matches the document or not). It is a template-level operation.
AT_REFERENCE | Reference anchor: Use reference anchors (or reference zones) to more precisely align the zones on the page. It is always preceded by the positional anchor alignment. A zone can have one, two or four reference anchors. It is a zone-level operation.
AT_CHECK | Check anchor: Check anchors are used for checking the form alignment. After positioning, it checks whether each setting is proper (texts not overflowing zones, and so on), otherwise it returns an error. It is a template-level operation.

◆ COMB_SPLITTER_HEIGHT

enum COMB_SPLITTER_HEIGHT

comb attributes

It is used by comb handling functions (see also kRecCreateCombInfo)

Enumerator
HALF_HEIGHT | heights of the splitters: half height of the zone
FULL_HEIGHT | heights of the splitters: same as height of the zone

◆ FORMRECOGNITIONSTATE

enum FORMRECOGNITIONSTATE

Form recognition state.

Enumerator
FRS_OK | Ok.
FRS_NOTPOSITIONED | One or more reference anchors to which the zone is anchored was not found.
FRS_DATARULENOTMATCHED | The text of the zone is not matching to the data rule selected for it. See the notes of kRecLoadFormTemplateLibrary for details about data rules.

◆ REF_ANCHOR_MODE

enum REF_ANCHOR_MODE

Zone attribute that specifies how the zone is anchored to reference anchors(s).

Enumerator
REF_ANCHOR_0 | no reference anchor: the zone is not anchored to reference anchor
REF_ANCHOR_1 | one reference anchor: the zone is anchored to the specified reference zone
REF_ANCHOR_2 | two reference anchors: one for horizontal and one for vertical alignment
REF_ANCHOR_4 | four reference anchors: left, top, right and bottom edges of the zone are aligned independently

Function Documentation

◆ kRecApplyFormTemplate()

RECERR RECAPIKRN kRecApplyFormTemplate | ( | int | sid,
 |  | HPAGE | hPage,
 |  | HFORMTEMPLATEPAGE | hFormTemplatePage )

Applying a form template - based on a preloaded form template.

The kRecApplyFormTemplate function applies a form template onto a filled form image. This is called form registration: the function uses the anchors defined by the preloaded form template to fit the loaded zones onto the current filled form. The image (hPage) can be a printed and scanned (filled) form or a filled PDF. It must contain the same form fields and layout that appears on the form the form template is created from. In order to fit the template zones onto the current image the function generally transforms the II_CURRENT image using the combination of shifting, scaling, deskewing and rotation. It may also need to transform the template zones using the combination of shifting and scaling. In certain cases, when deskew and rotation are not required (e.g. when hPage is loaded from a non-image-only PDF) only the zones are transformed (shifted and scaled) and not the II_CURRENT image. The function automatically rotates the image if the current IMG_ROTATE setting is ROT_AUTO (except if the image is non-image-only PDF), otherwise the image is not rotated. The function also creates a new II_BW image, and removes the horizontal and vertical rule lines from it. The function updates the user zone list. After calling this function the image can be recognized as usual, using the kRecRecognize function.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page which contains the filled form.
[in] | hFormTemplatePage | The handle of the form template.
Return values
ZONE_SIZE_WARN | At least one zone was truncated, because it extends beyond the image.
ZONE_SIZE_ERR | At least one zone was not loaded, because it extends beyond the image.
IMG_ANCHOR_WARN | Some of the anchors were not found.
IMG_ANCHOR_NOT_FOUND | No anchor was found or the template does not contain anchor zones.
RECERR | Other errors.
Note
The template may contain either bitmap or text anchors (see: ANCHORCONTENT), but cannot contain both.
The specification of this function in C# is:
RECERR kRecApplyFormTemplate(int sid, IntPtr hPage, IntPtr hTemplate);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecApplyFormTemplate
RECERR RECAPIKRN kRecApplyFormTemplate(int sid, HPAGE hPage, HFORMTEMPLATEPAGE hFormTemplatePage)
Applying a form template - based on a preloaded form template.
The specification of this function in Java is:
int kRecApplyFormTemplate(int sid, HPAGE hPage, HFORMTEMPLATEPAGE hFormTemplatePage)
HFORMTEMPLATEPAGE
void * HFORMTEMPLATEPAGE
Handle of a form template page in memory.
Definition KernelApi.h:3451
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
The specification of this function in Python is:
def kRecApplyFormTemplate(sid: int, hPage: "HPAGE", hFormTemplatePage: "HFORMTEMPLATEPAGE") -> int

◆ kRecApplyFormTemplateEx()

RECERR RECAPIKRN kRecApplyFormTemplateEx | ( | int | sid,
 |  | HPAGE | hPage,
 |  | FORMTEMPLATEMATCHINGID | MatchingId )

Applying form template - based on a previous kRecFindFormTemplate call.

The kRecApplyFormTemplateEx function applies the given form template onto a filled form image.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | MatchingId | The ID of the matched form template, returned by kRecFindFormTemplate or kRecGetNextMatchingTemplate.
Return values
RECERR
Note
kRecApplyFormTemplateEx can be called after kRecFindFormTemplate has found the matching form template(s) and has returned the matching ID. The function deletes user and OCR zone lists, and inserts the zones to the user zone list from the matched template. In order to fit the template zones onto the image the function generally transforms the II_CURRENT image and/or the template zones using geometric transformations. The function prepares the hPage for recognition: it creates a new II_BW image, removes the horizontal and vertical rule lines and the rule lines of the combs on it.
The zone type of the anchor zones is WT_IGNORE, unless AF_RECOGNIZE flag is set, in this case the zone type is WT_FLOW.
The specification of this function in C# is:
RECERR kRecApplyFormTemplateEx(int sid, IntPtr hPage, IntPtr MatchingId);
kRecApplyFormTemplateEx
RECERR RECAPIKRN kRecApplyFormTemplateEx(int sid, HPAGE hPage, FORMTEMPLATEMATCHINGID MatchingId)
Applying form template - based on a previous kRecFindFormTemplate call.
The specification of this function in Java is:
int kRecApplyFormTemplateEx(int sid, HPAGE hPage, FORMTEMPLATEMATCHINGID MatchingId)
FORMTEMPLATEMATCHINGID
void * FORMTEMPLATEMATCHINGID
Id of a matching form template. This ID identifies a matching in Form Template Collection.
Definition KernelApi.h:4783
The specification of this function in Python is:
def kRecApplyFormTemplateEx(sid: int, hPage: "HPAGE", MatchingId: "FORMTEMPLATEMATCHINGID") -> int

◆ kRecApplyFormTemplateFile()

RECERR RECAPIKRN kRecApplyFormTemplateFile | ( | int | sid,
 |  | HPAGE | hPage,
 |  | LPCTSTR | pTemplateFilename )

Applying a form template - directly based on a form template file.

The kRecApplyFormTemplateFile function applies a form template onto a filled form image. This is called form registration. The function loads the template file (saved by kRecSaveFormTemplate) and uses the anchors to fit the loaded zones onto the current filled form image. See also the comments on kRecApplyFormTemplate. The function updates the user zone list.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page which contains the filled form.
[in] | pTemplateFilename | Path to the form template file.
Return values
RECERR
Note
Calling kRecApplyFormTemplateFile is a single-step version of the following alternative workflow - if we do not want to re-use the loaded form template page in multiple kRecApplyFormTemplate calls:
HFORMTEMPLATEPAGE hFormTemplatePage;
HPAGE hPage;
int sid = 0;
LPSTR pTemplateFilename;
...
kRecLoadFormTemplate(sid, &hFormTemplatePage, pTemplateFileName);
kRecApplyFormTemplate(sid, hPage, hFormTemplate);
...
kRecFreeFormTemplate(hFormTemplatePage);
The specification of this function in C# is:
RECERR kRecApplyFormTemplateFile(int sid, IntPtr hPage, string pTemplateFilename);
kRecApplyFormTemplateFile
RECERR RECAPIKRN kRecApplyFormTemplateFile(int sid, HPAGE hPage, LPCTSTR pTemplateFilename)
Applying a form template - directly based on a form template file.
The specification of this function in Java is:
int kRecApplyFormTemplateFile(int sid, HPAGE hPage, String pTemplateFilename)
The specification of this function in Python is:
def kRecApplyFormTemplateFile(sid: int, hPage: "HPAGE", pTemplateFilename: str) -> int

◆ kRecCheckFormTemplate()

RECERR RECAPIKRN kRecCheckFormTemplate | ( | int | sid,
 |  | HPAGE | hPage )

Checking the form template.

The kRecCheckFormTemplate checks the form template and creates a list of warnings and errors. It can be used during the template definition step.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
Note
After calling this function call kRecGetLastErrorEx to obtain the list of warnings and errors.
It is recommended to check the form template at the end of the definition phase.
The specification of this function in C# is:
RECERR kRecCheckFormTemplate(int sid, IntPtr hPage);
kRecCheckFormTemplate
RECERR RECAPIKRN kRecCheckFormTemplate(int sid, HPAGE hPage)
Checking the form template.
The specification of this function in Java is:
int kRecCheckFormTemplate(int sid, HPAGE hPage)
The specification of this function in Python is:
def kRecCheckFormTemplate(sid: int, hPage: "HPAGE") -> int

◆ kRecCreateCombInfo()

RECERR RECAPIKRN kRecCreateCombInfo | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | INTBOOL | hasTopBorder,
 |  | COMB_SPLITTER_HEIGHT | splitterHeight )

Creating comb info.

The kRecCreateCombInfo creates comb description for the given user zone.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the zone in the user zone list.
[in] | hasTopBorder | Specifies whether the comb has an upper border or not.
[in] | splitterHeight | Determines the splitter height of the comb.
Return values
RECERR
Note
Comb is a horizontal line and a set of vertical lines or a set of rectangles within a fill zone for separating the characters. If you want to recognize the text in a comb, you should define the structure of the comb, this helps to improve accuracy. Comb info is used by kRecApplyFormTemplate, kRecApplyFormTemplateEx and kRecRecognize. Comb info contains the following comb attributes:
  • whether the comb has a top line or not,
  • the height of the vertical splitters,
  • the left and right coordinates of the cells. Comb info is used during the processing of filled forms: kRecApplyFormTemplate and kRecApplyFormTemplateEx removes the comb lines from the II_BW image if comb info specified. Comb info helps kRecRecognize to detect spaces as well. Note that kRecRecognize does not take strict cell information: a cell may contain more characters and characters between cells may be recognized. Only zone of WT_FLOW type may contain comb info.
The specification of this function in C# is:
RECERR kRecCreateCombInfo(IntPtr hPage, int xZone, [MarshalAs(UnmanagedType.Bool)] bool hasTopBorder, COMB_SPLITTER_HEIGHT splitterHeight);
kRecCreateCombInfo
RECERR RECAPIKRN kRecCreateCombInfo(HPAGE hPage, int xZone, INTBOOL hasTopBorder, COMB_SPLITTER_HEIGHT splitterHeight)
Creating comb info.
COMB_SPLITTER_HEIGHT
COMB_SPLITTER_HEIGHT
comb attributes
Definition KernelApi.h:5012
The specification of this function in Java is:
int kRecCreateCombInfo(HPAGE hPage, int xZone, int hasTopBorder, COMB_SPLITTER_HEIGHT splitterHeight)
The specification of this function in Python is:
def kRecCreateCombInfo(hPage: "HPAGE", xZone: int, hasTopBorder: bool, splitterHeight: int) -> int

◆ kRecCreateFormTemplate()

RECERR RECAPIKRN kRecCreateFormTemplate | ( | int | sid,
 |  | HPAGE | hPage )

Creating form template for processing filled forms.

A form template is a set of user zones, which contains process zones and anchor zones. Process zones in the form template contain a field name and may contain additional information about the field. Anchor zones are stored in the user zone list as ignore zones and are used by kRecApplyFormTemplate to adjust the filled form to the zone template. The usage of this function depends on the hPage origin type:

  1. if the hPage is loaded from an active non-image-only PDF form: there is no need to perform any processing steps before calling this function: simply load the image and call kRecCreateFormTemplate, it can process the meta-data of the PDF directly, and creates process and anchor zones;
  2. otherwise the image must be an empty form, in this case the form template should be created in the following way:
    1. load the empty form image;
    2. pre-process it as usual;
    3. set PAGEDESCRIPTOR to LZ_FORM OR insert user zone(s) of type WT_FORM; Do not perform both of these!
    4. call kRecLocateZones;
    5. call kRecCreateFromTemplate: it creates process zones from the form objects detected by the previous kRecLocateZones, and creates anchor zones as well.

The function creates user zones from either the meta-data of the active PDF, or the form objects previously detected by kRecLocateZones. The function also creates anchor zones, used by kRecApplyFormTemplate to adjust the filled form to the zone template. Anchor zones are stored in the user zone list as ignore zones. Generally four anchor zones are created.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
Return values
RECERR
Note
If the form template was created from an active PDF form, the anchor zones contain additional hidden information which is used by kRecApplyFormTemplate, therefore anchor zones should not be modified.
If a user manually creates a form template (inserts WT_FLOW and WT_IGNORE user zones for anchors), the function kRecSaveFormTemplate should be called instead of kRecCreateFormTemplate. See the notes under kRecSaveFormTemplate.
In order to use this form template for processing filled forms, first it must be saved by kRecSaveFormTemplate and then applied by kRecApplyFormTemplateFile or kRecApplyFormTemplate.
The specification of this function in C# is:
RECERR kRecCreateFormTemplate(int sid, IntPtr hPage);
kRecCreateFormTemplate
RECERR RECAPIKRN kRecCreateFormTemplate(int sid, HPAGE hPage)
Creating form template for processing filled forms.
The specification of this function in Java is:
int kRecCreateFormTemplate(int sid, HPAGE hPage)
The specification of this function in Python is:
def kRecCreateFormTemplate(sid: int, hPage: "HPAGE") -> int

◆ kRecDeleteCombInfo()

RECERR RECAPIKRN kRecDeleteCombInfo | ( | HPAGE | hPage,
 |  | int | xZone )

Deleting comb info.

The kRecDeleteCombInfo deletes comb description of the given user zone. About combs see: kRecCreateCombInfo.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the zone in the user zone list.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecDeleteCombInfo(IntPtr hPage, int xZone);
kRecDeleteCombInfo
RECERR RECAPIKRN kRecDeleteCombInfo(HPAGE hPage, int xZone)
Deleting comb info.
The specification of this function in Java is:
int kRecDeleteCombInfo(HPAGE hPage, int xZone)
The specification of this function in Python is:
def kRecDeleteCombInfo(hPage: "HPAGE", xZone: int) -> int

◆ kRecFindFormTemplate()

RECERR RECAPIKRN kRecFindFormTemplate | ( | int | sid,
 |  | HPAGE | hPage,
 |  | HFORMTEMPLATEPAGE * | phFormTmplArray,
 |  | int | Length,
 |  | LPCTSTR | FormPath,
 |  | int | FirstPage,
 |  | int | LastPage,
 |  | HFORMTEMPLATECOLLECTION * | phFormTmplCollection,
 |  | FORMTEMPLATEMATCHINGID * | pBestMatchingId,
 |  | int * | pConfidence,
 |  | int * | pnMatching )

Finding the matching template(s).

The kRecFindFormTemplate finds the matching templates in relevance from the given template set, if any.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | phFormTmplArray | Array of form template handles.
[in] | Length | Length of the array.
[in] | FormPath | Optional filter for multi-page templates: only the templates below the FormPath folder are enabled. Set it to NULL if you do not want to specify it.
[in] | FirstPage | Optional filter for multi-page templates: only the templates between FirstPage and Lastpage are enabled. Set it to -1 if you do not want to specify it.
[in] | LastPage | Optional filter for multi-page templates: only the templates between FirstPage and Lastpage are enabled. Set it to -1 if you do not want to specify it.
[out] | phFormTmplCollection | Address of a variable to store the template collection handle. Note that template collection handle may be returned even if an error code is returned.
[out] | pBestMatchingId | Address of a variable to store the ID of the best matching template.
[out] | pConfidence | Address of a variable to store the confidence of the matching. The confidence is between 0 and 100. Greater value means higher confidence.
[out] | pnMatching | Address of a variable to store the number of successful matchings.
Return values
RECERR
Note
Input is an actual form page and an array of form template handles. The array of handles can be obtained by loading a form template library (kRecLoadFormTemplateLibrary).
The function uses the anchors defined in the form templates to fit the loaded zones onto the current filled form. This process is also called form registration. In the case of text and barcode anchors the regular expression filter works the following way:
  • If regular expression filter is not specified: The anchor is found if the Levenshtein distance (minimum number of single-character edits (insertion, deletion, substitution) required to change one word into the other) of the recognized text and the anchor text is less than a given threshold.
  • If regular expression filter is specified: The anchor is found if the recognized text matches the regular expression.
The matching of a particular template is successful when
  • each selector anchor is found, and
  • if the template contains positional anchor: at least one positional anchor is found, and
  • each reference anchor is found (see also the comment below), and
  • each check anchor is found, and
  • the confidence value is greater than or equal to the threshold specified by Kernel.Form.MatchingConfidence setting.
The calculation of the confidence. The function finds all possible matchings, and calculates a confidence value for each one. The confidence value is between 0 and 100, 100 means the highest confidence. The matchings having confidence less than the actual value of the Kernel.Form.MatchingConfidence setting (default is 65) are dropped. The successful matchings are sorted by confidence. The calculation of the confidence value is based on the positional and on the reference anchors. If the template contains positional anchors, the (geometric) similarity between the polygon formed by the positional anchors found on the image and the polygon formed by the positional anchors on the template is measured. When not all positional anchors are found on the image, the confidence is reduced proportionately. If the template contains reference anchors as well, a confidence factor is calculated for each reference anchor based on the Levenshtein distance between the defined and the recognized text. If one or more reference anchors were not found and Kernel.Form.ContinueOnMissingRefAnchors is TRUE, then the confidence value is multiplied by the ratio of the found to total reference anchors. The final confidence is the multiplication of the above values.
If any reference anchor was not found, the template matching fails. This behavior can be changed by setting Kernel.Form.ContinueOnMissingRefAnchors to true: in this case the confidence is reduced as mentioned above and if the confidence value is greater than or equal to the threshold specified by Kernel.Form.MatchingConfidence setting then the matching succeeds. The zone(s) that is/are anchored to reference anchor which is not found are flagged (see: FORMRECOGNITIONSTATE), and the FILLINGMETHOD of the zone is set to FM_NO_OCR.
If HPAGE does not contain letters when the function is called, it recognizes those parts of the image, where anchors may occur (i.e. the union of the anchor locations including drifts). If HPAGE contains letters, the function does not recognize these image areas, but uses the existing letters instead (see Kernel.Form.UseLetters).
The form template handles (phFormTmplArray array) remain unchanged during the whole process. kRecFindFormTemplate creates a new object (called Form Template Collection), all the data collected by this function is stored internally in this object and the handle of this object (HFORMTEMPLATECOLLECTION) is returned. Each successful matching is identified by an ID called matching ID. The function returns the ID of the best matching as well. This ID is input parameter of the next processing step: kRecApplyFormTemplateEx. The function may return HFORMTEMPLATECOLLECTION handle even if an error code is returned! If the phFormTmplCollection output parameter contains a NULL value, a fatal error occurred. If the function returns an error but phFormTmplCollection is not NULL then further information can be asked by calling kRecGetFindFormTemplateInfo. The function also returns the the number of the successful matchings.
If none of the templates matched, the function returns IMG_TEMPLATENOTMATCHED_ERR error. The Form Template Collection stores an error code for each non-matching template, and kRecGetFindFormTemplateInfo can be called to query these individual error codes. kRecGetNextMatchingTemplate can be called on this collection handle to obtain (in relevance order) the additional registration results (ID and confidence of the matchings).
If the template collection handle is no longer needed, it should be freed by invoking the kRecFreeFormTemplateCollection function.
The given form template array may contain NULL handles, these elements are ignored.
The filter parameters (FormPath, FirstPage, LastPage) can be used to select a subset from the array of handles. They can be used when template library contains multi-page form templates (see: kRecLoadFormTemplateLibrary). In this case the name of the container folder can be specified in FormPath parameter, the first and last page can be specified in FirstPage and LastPage parameters.
The templates cannot contain bitmap anchors (ANCHORCONTENT). If any sample contains bitmap anchor the function returns IMG_ANCHOR_CONTENT_ERR error.
The specification of this function in C# is:
RECERR kRecFindFormTemplate(int sid, IntPtr hPage, [In] IntPtr[] hFormTmplArray, string FormPath, int FirstPage, int LastPage, out IntPtr hFormTmplCollection, out IntPtr BestMatchingId, out int Confidence, out int nMatching);
// or when FormPath is NULL, FirstPage and LastPage are -1 in C/C++
RECERR kRecFindFormTemplate(int sid, IntPtr hPage, [In] IntPtr[] hFormTmplArray, out IntPtr hFormTmplCollection, out IntPtr BestMatchingId, out int Confidence, out int nMatching);
kRecFindFormTemplate
RECERR RECAPIKRN kRecFindFormTemplate(int sid, HPAGE hPage, HFORMTEMPLATEPAGE *phFormTmplArray, int Length, LPCTSTR FormPath, int FirstPage, int LastPage, HFORMTEMPLATECOLLECTION *phFormTmplCollection, FORMTEMPLATEMATCHINGID *pBestMatchingId, int *pConfidence, int *pnMatching)
Finding the matching template(s).
The specification of this function in Java is:
int kRecFindFormTemplate(int sid, HPAGE hPage, HFORMTEMPLATEPAGE[] phFormTmplArray, String FormPath, int FirstPage, int LastPage, HFORMTEMPLATECOLLECTION phFormTmplCollection, FORMTEMPLATEMATCHINGID pBestMatchingId, int[] pConfidence, int[] pnMatching)
HFORMTEMPLATECOLLECTION
void * HFORMTEMPLATECOLLECTION
Handle of a Form Template Collection in memory.
Definition KernelApi.h:3789
The specification of this function in Python is:
def kRecFindFormTemplate(sid: int, hPage: "HPAGE", phFormTmplArray: "FormTemplatePageHandleArray", FormPath: str, FirstPage: int, LastPage: int) -> Tuple[int, "HFORMTEMPLATECOLLECTION", "FORMTEMPLATEMATCHINGID", int, int]

◆ kRecFreeFormTemplate()

RECERR RECAPIKRN kRecFreeFormTemplate ( HFORMTEMPLATEPAGE hFormTemplatePage )

Removing a form template page.

The kRecFreeFormTemplate function removes a form template page from the form handling module.

Parameters
[in] hFormTemplatePage Handle of the form template page to be removed.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecFreeFormTemplate(IntPtr hTemplate);
kRecFreeFormTemplate
RECERR RECAPIKRN kRecFreeFormTemplate(HFORMTEMPLATEPAGE hFormTemplatePage)
Removing a form template page.
The specification of this function in Java is:
int kRecFreeFormTemplate(HFORMTEMPLATEPAGE hFormTemplatePage)
The specification of this function in Python is:
def kRecFreeFormTemplate(hFormTemplatePage: "HFORMTEMPLATEPAGE") -> int

◆ kRecFreeFormTemplateArray()

RECERR RECAPIKRN kRecFreeFormTemplateArray | ( | HFORMTEMPLATEPAGE * | phFormTmplArray,
 |  | int | Length,
 |  | INTBOOL | bFreeArray )

Freeing the array of form template handles.

The kRecFreeFormTemplateArray frees the array of form template handles returned by kRecLoadFormTemplateLibrary

Parameters
[in] | phFormTmplArray | Array of handles.
[in] | Length | Length of the array.
[in] | bFreeArray | The function frees the memory object the phFormTmplArray array points to, if this parameter is TRUE, otherwise it is not freed.
Return values
RECERR
Note
This function can free both the HFORMTEMPLATEPAGE handles in the given array and the memory object the phFormTmplArray points to. If phFormTmplArray has been returned by kRecLoadFormTemplateLibrary, it should also be freed (bFreeArray = TRUE). The given array may contain NULL handles, this does not result in error.
The specification of this function in C# is:
RECERR kRecFreeFormTemplateArray([In][Out]IntPtr[] hFormTmplArray);
kRecFreeFormTemplateArray
RECERR RECAPIKRN kRecFreeFormTemplateArray(HFORMTEMPLATEPAGE *phFormTmplArray, int Length, INTBOOL bFreeArray)
Freeing the array of form template handles.
The specification of this function in Java is:
int kRecFreeFormTemplateArray(HFORMTEMPLATEPAGE[] phFormTmplArray);
The specification of this function in Python is:
def kRecFreeFormTemplateArray(phFormTmplArray: "FormTemplatePageHandleArray") -> int

◆ kRecFreeFormTemplateCollection()

RECERR RECAPIKRN kRecFreeFormTemplateCollection ( HFORMTEMPLATECOLLECTION hFormTmplCollection )

Freeing a Form Template Collection.

The kRecFreeFormTemplateCollection frees the given Form Template Collection.

Parameters
[in] hFormTmplCollection Handle of the Form Template Collection returned by a previous kRecFindFormTemplate.
Return values
RECERR
Note
kRecFreeFormTemplateCollection frees all data collected by the previous kRecFindFormTemplate call. The matching IDs stored in this collection handle becomes invalid.
The specification of this function in C# is:
RECERR kRecFreeFormTemplateCollection(IntPtr hFormTmplCollection);
kRecFreeFormTemplateCollection
RECERR RECAPIKRN kRecFreeFormTemplateCollection(HFORMTEMPLATECOLLECTION hFormTmplCollection)
Freeing a Form Template Collection.
The specification of this function in Java is:
int kRecFreeFormTemplateCollection(HFORMTEMPLATECOLLECTION hFormTmplCollection)
The specification of this function in Python is:
def kRecFreeFormTemplateCollection(hFormTmplCollection: "HFORMTEMPLATECOLLECTION") -> int

◆ kRecGetAnchorDrift()

RECERR RECAPIKRN kRecGetAnchorDrift | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | int | nZone,
 |  | SIZE * | pDrift )

Getting the drift area of text and barcode anchors.

The kRecGetAnchorDrift returns the drift area of text and barcode anchors.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image, where drift is specified.
[in] | nZone | Zone index.
[out] | pDrift | Address of a variable to return the drift.
Return values
RECERR
Note
The drift area specifies the environment where the anchor is searched. It is a rectangular area, the center of the area is the center of the zone, and the size of the rectangle is specified by the drift parameter. The drift area can be infinite: -1 means infinite area.
The specification of this function in C# is:
RECERR kRecGetAnchorDrift(IntPtr hPage, IMAGEINDEX iiImg, int nZone, out SIZE drift);
kRecGetAnchorDrift
RECERR RECAPIKRN kRecGetAnchorDrift(HPAGE hPage, IMAGEINDEX iiImg, int nZone, SIZE *pDrift)
Getting the drift area of text and barcode anchors.
IMAGEINDEX
IMAGEINDEX
Index of each image type in HPAGE.
Definition KernelApi.h:991
The specification of this function in Java is:
int kRecGetAnchorDrift(HPAGE hPage, IMAGEINDEX iiImg, int nZone, SIZE pDrift)
The specification of this function in Python is:
def kRecGetAnchorDrift(hPage: "HPAGE", iiImg: int, nZone: int) -> Tuple[int, int]

◆ kRecGetAnchorFlag()

RECERR RECAPIKRN kRecGetAnchorFlag | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | ANCHORFLAG | flag,
 |  | INTBOOL * | value )

Getting anchor zone flag.

The kRecGetAnchorFlag returns the current value of the specified anchor zone flag.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[in] | flag | Flag to ask (ANCHORFLAG).
[out] | value | Address of a variable to store the current value of the flag.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetAnchorFlag(IntPtr hPage, int nZone, ANCHORFLAG flag, [MarshalAs(UnmanagedType.Bool)] out bool value);
kRecGetAnchorFlag
RECERR RECAPIKRN kRecGetAnchorFlag(HPAGE hPage, int nZone, ANCHORFLAG flag, INTBOOL *value)
Getting anchor zone flag.
ANCHORFLAG
ANCHORFLAG
Flags of anchor zones.
Definition KernelApi.h:3826
The specification of this function in Java is:
int kRecGetAnchorFlag(HPAGE hPage, int nZone, ANCHORFLAG flag, int[] value)
The specification of this function in Python is:
def kRecGetAnchorFlag(hPage: "HPAGE", nZone: int, flag: int) -> Tuple[int, bool]

◆ kRecGetAnchorInfo()

RECERR RECAPIKRN kRecGetAnchorInfo | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | ANCHORCONTENT * | aContent,
 |  | ANCHORTYPE * | aType )

Returning anchor content and type.

The kRecGetAnchorInfo returns the anchor content and anchor type property of the zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[out] | aContent | Address of a variable to store the content of the anchor zone (ANCHORCONTENT). If the zone is not an anchor zone, AC_SIZE is returned.
[out] | aType | Address of a variable to store the type of the anchor zone (ANCHORTYPE). If the zone is not an anchor zone, AT_SIZE is returned.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetAnchorInfo(IntPtr hPage, int nZone, [In] ref ANCHORCONTENT aContent, [In] ref ANCHORTYPE aType);
kRecGetAnchorInfo
RECERR RECAPIKRN kRecGetAnchorInfo(HPAGE hPage, int nZone, ANCHORCONTENT *aContent, ANCHORTYPE *aType)
Returning anchor content and type.
ANCHORTYPE
ANCHORTYPE
Type of anchor zone.
Definition KernelApi.h:3812
ANCHORCONTENT
ANCHORCONTENT
Content of the anchor zone.
Definition KernelApi.h:3797
The specification of this function in Java is:
int kRecGetAnchorInfo(HPAGE hPage, int nZone, ANCHORCONTENT[] aContent, ANCHORTYPE[] aType)
The specification of this function in Python is:
def kRecGetAnchorInfo(hPage: "HPAGE", nZone: int) -> Tuple[int, int, int]

◆ kRecGetAnchorRefPoint()

RECERR RECAPIKRN kRecGetAnchorRefPoint | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | ANCHOR_REF_POINT * | pref )

Getting the reference point of the anchor zone.

The kRecGetAnchorRefPoint returns the reference point of the anchor zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[out] | pref | Address of a variable to return the reference point.
Return values
RECERR
Note
Each anchor zone has a reference point. The reference point can be set by kRecSetAnchorRefPoint.
The specification of this function in C# is:
RECERR kRecGetAnchorRefPoint(IntPtr hPage, int nZone, out ANCHOR_REF_POINT refpt);
kRecGetAnchorRefPoint
RECERR RECAPIKRN kRecGetAnchorRefPoint(HPAGE hPage, int nZone, ANCHOR_REF_POINT *pref)
Getting the reference point of the anchor zone.
ANCHOR_REF_POINT
ANCHOR_REF_POINT
Reference point of the anchor.
Definition KernelApi.h:3837
The specification of this function in Java is:
int kRecGetAnchorRefPoint(HPAGE hPage, int nZone, ANCHOR_REF_POINT[] pref)
The specification of this function in Python is:
def kRecGetAnchorRefPoint(hPage: "HPAGE", nZone: int) -> Tuple[int, int]

◆ kRecGetAnchorRegExp()

RECERR RECAPIKRN kRecGetAnchorRegExp | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPWSTR * | ppRegExp )

Getting regular expression of text and barcode anchors.

The kRecGetAnchorRegExp returns the regular expression of text and barcode anchors. It can be used during the template definition step.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[out] | ppRegExp | Address of a pointer to a string which is allocated and filled by the API-call and contains the ppRegExp.
Return values
RECERR
Note
The memory allocated for *ppRegExp can be released using kRecFree.
The specification of this function in C# is:
RECERR kRecGetAnchorRegExp(IntPtr hPage, int nZone, out string RegExp);
kRecGetAnchorRegExp
RECERR RECAPIKRN kRecGetAnchorRegExp(HPAGE hPage, int nZone, LPWSTR *ppRegExp)
Getting regular expression of text and barcode anchors.
The specification of this function in Java is:
int kRecGetAnchorRegExp(HPAGE hPage, int nZone, String[] ppRegExp)
The specification of this function in Python is:
def kRecGetAnchorRegExp(hPage: "HPAGE", nZone: int) -> Tuple[int, str]

◆ kRecGetAnchorText()

RECERR RECAPIKRN kRecGetAnchorText | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPWSTR * | ppText )

Getting the text attribute of text and barcode anchors.

The kRecGetAnchorText returns the text attribute of text and barcode anchors.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[out] | ppText | Address of a pointer to a string which is allocated and filled by the API-call and contains the text.
Return values
RECERR
Note
The memory allocated for *ppText can be released using kRecFree.
The specification of this function in C# is:
RECERR kRecGetAnchorText(IntPtr hPage, int nZone, out string Text);
kRecGetAnchorText
RECERR RECAPIKRN kRecGetAnchorText(HPAGE hPage, int nZone, LPWSTR *ppText)
Getting the text attribute of text and barcode anchors.
The specification of this function in Java is:
int kRecGetAnchorText(HPAGE hPage, int nZone, String[] ppText)
The specification of this function in Python is:
def kRecGetAnchorText(hPage: "HPAGE", nZone: int) -> Tuple[int, str]

◆ kRecGetCombCellCount()

RECERR RECAPIKRN kRecGetCombCellCount | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | int * | pnCells )

Returning the number of cells in a comb.

The kRecGetCombCellCount returns the number of cells in the comb. About combs see: kRecCreateCombInfo.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the zone in the user zone list.
[out] | pnCells | Address of a variable to store number of cells.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetCombCellCount(IntPtr hPage, int xZone, out int nCells);
kRecGetCombCellCount
RECERR RECAPIKRN kRecGetCombCellCount(HPAGE hPage, int xZone, int *pnCells)
Returning the number of cells in a comb.
The specification of this function in Java is:
int kRecGetCombCellCount(HPAGE hPage, int xZone, int[] pnCells)
The specification of this function in Python is:
def kRecGetCombCellCount(hPage: "HPAGE", xZone: int) -> Tuple[int, int]

◆ kRecGetCombCells()

RECERR RECAPIKRN kRecGetCombCells | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | int | xZone,
 |  | COMB_CELL_INFO ** | ppCells,
 |  | int * | pnCells )

Getting the cells of a comb.

The kRecGetCombCells returns the cells of a comb. About combs see: kRecCreateCombInfo.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image, in which the coordinates of the cells are given.
[in] | xZone | Index of the zone in the user zone list.
[out] | ppCells | Address of a variable to return array of COMB_CELL_INFO structures containing the left and right coordinates of the cells.
[out] | pnCells | Address of a variable to return the length of pCells array.
Return values
RECERR
Note
The application should call kRecFree to free the returned array.
The specification of this function in C# is:
RECERR kRecGetCombCells(IntPtr hPage, IMAGEINDEX iiImg, int xZone, out COMB_CELL_INFO[] pCells, out int pnCells);
kRecGetCombCells
RECERR RECAPIKRN kRecGetCombCells(HPAGE hPage, IMAGEINDEX iiImg, int xZone, COMB_CELL_INFO **ppCells, int *pnCells)
Getting the cells of a comb.
COMB_CELL_INFO
Structure of a comb-cell in a comb.
Definition KernelApi.h:5004
The specification of this function in Java is:
int kRecGetCombCells(HPAGE hPage, IMAGEINDEX iiImg, int xZone, CombCellInfoArray ppCells)
The specification of this function in Python is:
def kRecGetCombCells(hPage: "HPAGE", iiImg: int, xZone: int) -> Tuple[int, "CombCellInfoArray"]

◆ kRecGetCombInfo()

RECERR RECAPIKRN kRecGetCombInfo | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | INTBOOL * | hasTopBorder,
 |  | COMB_SPLITTER_HEIGHT * | splitterHeight )

Getting comb attributes.

The kRecGetCombInfo returns the attributes of a comb. About combs see: kRecCreateCombInfo.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the zone in the user zone list.
[out] | hasTopBorder | Address of a variable to return whether the comb has top border line.
[out] | splitterHeight | Address of a variable to return the height of the splitters.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetCombInfo(IntPtr hPage, int xZone, [MarshalAs(UnmanagedType.Bool)] out bool hasTopBorder, out COMB_SPLITTER_HEIGHT splitterHeight);
kRecGetCombInfo
RECERR RECAPIKRN kRecGetCombInfo(HPAGE hPage, int xZone, INTBOOL *hasTopBorder, COMB_SPLITTER_HEIGHT *splitterHeight)
Getting comb attributes.
The specification of this function in Java is:
int kRecGetCombInfo(HPAGE hPage, int xZone, int[] hasTopBorder, COMB_SPLITTER_HEIGHT[] splitterHeight)
The specification of this function in Python is:
def kRecGetCombInfo(hPage: "HPAGE", xZone: int) -> Tuple[int, bool, int]

◆ kRecGetDropOutColorZoneIndex()

RECERR RECAPIKRN kRecGetDropOutColorZoneIndex | ( | HPAGE | hPage,
 |  | int * | pnZone )

Getting the index of the dropout color zone.

The kRecGetDropOutColorZoneIndex returns the index of the dropout color zone.

Parameters
[in] | hPage | Handle of the page.
[out] | pnZone | Variable to store the index of the dropout color zone. If the HPAGE does not contain a dropout color zone, the function returns -1.
Return values
RECERR
Note
HPAGE may contain only one dropout color zone. If the HPAGE does not contain a dropout color zone, the function returns ZONE_NOTFOUND_WARN; A dropout color zone can be created by kRecInsertDropOutColorZone function.
The specification of this function in C# is:
RECERR kRecGetDropOutColorZoneIndex(IntPtr hPage, out int nZone);
kRecGetDropOutColorZoneIndex
RECERR RECAPIKRN kRecGetDropOutColorZoneIndex(HPAGE hPage, int *pnZone)
Getting the index of the dropout color zone.
The specification of this function in Java is:
int kRecGetDropOutColorZoneIndex(HPAGE hPage, int[] pnZone)
The specification of this function in Python is:
def kRecGetDropOutColorZoneIndex(hPage: "HPAGE") -> Tuple[int, int]

◆ kRecGetFindFormTemplateInfo()

RECERR RECAPIKRN kRecGetFindFormTemplateInfo | ( | HFORMTEMPLATECOLLECTION | hFormTmplCollection,
 |  | LPTSTR * | pInfo )

Getting info about the previous kRecFindFormTemplate call.

The kRecGetFindFormTemplateInfo returns information about the previous kRecFindFormTemplate.

Parameters
[in] | hFormTmplCollection | Handle of the Form Template Collection returned by a previous kRecFindFormTemplate.
[out] | pInfo | Address of a pointer to a string which is allocated and filled by the API-call and contains the information in XML format.
Return values
RECERR
Note
The memory allocated for *pInfo can be released using kRecFree.
See also the format of the data retrieved in pInfo.
The specification of this function in C# is:
RECERR kRecGetFindFormTemplateInfo(IntPtr hFormTmplCollection, out string pInfo);
kRecGetFindFormTemplateInfo
RECERR RECAPIKRN kRecGetFindFormTemplateInfo(HFORMTEMPLATECOLLECTION hFormTmplCollection, LPTSTR *pInfo)
Getting info about the previous kRecFindFormTemplate call.
The specification of this function in Java is:
int kRecGetFindFormTemplateInfo(HFORMTEMPLATECOLLECTION hFormTmplCollection, String[] pInfo)
The specification of this function in Python is:
def kRecGetFindFormTemplateInfo(hFormTmplCollection: "HFORMTEMPLATECOLLECTION") -> Tuple[int, str]

◆ kRecGetFormTemplateInfo()

RECERR RECAPIKRN kRecGetFormTemplateInfo | ( | HFORMTEMPLATEPAGE | hFormTmpl,
 |  | LPTSTR * | pFullName,
 |  | LPTSTR * | pFormPath,
 |  | int * | pFormPage )

Getting information about a form template.

The kRecGetFormTemplateInfo returns the name and the page number of a form template.

Parameters
[in] | hFormTmpl | Handle of form template.
[out] | pFullName | Address of a pointer to a string which is allocated and filled by the API-call and contains the full name (name including container folder and page-number as well) of the form template. (The string is terminated with a null character.)
[out] | pFormPath | Address of a pointer to a string which is allocated and filled by the API-call and contains the name of the form template. (The string is terminated with a null character.)
[out] | pFormPage | Address of a pointer for returning the page-number of a template of a multi-page form.
Return values
RECERR
Note
Form templates have name and page number attributes. These attributes can be specified during the form template definition.
The specification of this function in C# is:
RECERR kRecGetFormTemplateInfo(IntPtr hFormTmpl, out string FullName, out string FormPath, out int FormPage);
kRecGetFormTemplateInfo
RECERR RECAPIKRN kRecGetFormTemplateInfo(HFORMTEMPLATEPAGE hFormTmpl, LPTSTR *pFullName, LPTSTR *pFormPath, int *pFormPage)
Getting information about a form template.
The specification of this function in Java is:
int kRecGetFormTemplateInfo(HFORMTEMPLATEPAGE hFormTmpl, String[] pFullName, String[] pFormPath, int[] pFormPage)
The specification of this function in Python is:
def kRecGetFormTemplateInfo(hFormTmpl: "HFORMTEMPLATEPAGE") -> Tuple[int, str, str, int]

◆ kRecGetFormTemplateName()

RECERR RECAPIKRN kRecGetFormTemplateName | ( | HPAGE | hPage,
 |  | LPTSTR * | pTemplateName )

Getting the name of the form template.

The kRecGetFormTemplateName returns the name of the form template.

Parameters
[in] | hPage | Handle of the page.
[out] | pTemplateName | Address of a pointer to a string which will be allocated and filled by the API-call and will contain the name of the template. (The string will be terminated with a wide-character zero.)
Return values
RECERR
Note
The memory allocated for *pTemplateName can be released using kRecFree.
The specification of this function in C# is:
RECERR kRecGetFormTemplateName(IntPtr hPage, out string ppFormFieldName);
kRecGetFormTemplateName
RECERR RECAPIKRN kRecGetFormTemplateName(HPAGE hPage, LPTSTR *pTemplateName)
Getting the name of the form template.
The specification of this function in Java is:
int kRecGetFormTemplateName(HPAGE hPage, String[] pTemplateName)
The specification of this function in Python is:
def kRecGetFormTemplateName(hPage: "HPAGE") -> Tuple[int, str]

◆ kRecGetMatchingInfo()

RECERR RECAPIKRN kRecGetMatchingInfo | ( | FORMTEMPLATEMATCHINGID | MatchId,
 |  | LPTSTR * | pFullName,
 |  | LPTSTR * | pName,
 |  | int * | pPageNumber,
 |  | int * | pPageCount )

Getting information about a matching.

The kRecGetMatchingInfo returns information about a matching.

Parameters
[in] | MatchId | ID of the matching returned by kRecFindFormTemplate or kRecGetNextMatchingTemplate.
[out] | pFullName | Address of a pointer to a string which is allocated and filled by the API-call and contains the full name (name including container folder and page-number as well) of the form template. (The string is terminated with a null character.) Can be NULL.
[out] | pName | Address of a pointer to a string which is allocated and filled by the API-call and contains the name of the form template. (The string is terminated with a null character.) Can be NULL.
[out] | pPageNumber | Address of a variable to hold the page-number of the multi-page template. Can be NULL.
[out] | pPageCount | Address of a variable to hold the total number of pages of the multi-page template. Can be NULL.
Return values
RECERR
Note
The memory allocated for *pFullName and *pName can be released using kRecFree.
The specification of this function in C# is:
kRecGetMatchingInfo(IntPtr MatchId, out string FullName, out string FormPath, out int FormPage, out int PageCount);
// or when pPageCount is NULL in C/C++
kRecGetMatchingInfo(IntPtr MatchId, out string FullName, out string FormPath, out int FormPage);
// or when pPageCount, pPageNumber, and pName are NULL in C/C++
kRecGetMatchingInfo(IntPtr MatchId, out string FullName);
kRecGetMatchingInfo
RECERR RECAPIKRN kRecGetMatchingInfo(FORMTEMPLATEMATCHINGID MatchId, LPTSTR *pFullName, LPTSTR *pName, int *pPageNumber, int *pPageCount)
Getting information about a matching.
The specification of this function in Java is:
int kRecGetMatchingInfo(FORMTEMPLATEMATCHINGID MatchId, String[] pFullName, String[] pName, int[] pPageNumber, int[] pPageCount)
The specification of this function in Python is:
def kRecGetMatchingInfo(MatchId: "FORMTEMPLATEMATCHINGID") -> Tuple[int, str, str, int, int]

◆ kRecGetNextMatchingTemplate()

RECERR RECAPIKRN kRecGetNextMatchingTemplate | ( | FORMTEMPLATEMATCHINGID | PrevMatchingId,
 |  | FORMTEMPLATEMATCHINGID * | pNextMatchingId,
 |  | int * | pConfidence )

Querying the matching form templates.

The kRecGetNextMatchingTemplate returns the ID of the next matching form template.

Parameters
[in] | PrevMatchingId | Previous matching ID returned by kRecFindFormTemplate or kRecGetNextMatchingTemplate..
[out] | pNextMatchingId | Address of a variable to hold the ID of the next matching template.
[out] | pConfidence | Address of a variable to store the matching confidence. The confidence is between 0 and 100. Greater value means higher confidence.
Return values
RECERR
Note
This function can be called after invoking kRecFindFormTemplate. kRecFindFormTemplate finds all possible matchings and sorts them by their confidence. Each matching is identified by an ID called matching ID. kRecFindFormTemplate also returns the ID of the best matching. You can query the IDs of the matchings by calling kRecGetNextMatchingTemplate.
The specification of this function in C# is:
RECERR kRecGetNextMatchingTemplate(IntPtr PrevMatchingId, out IntPtr NextMatchingId, out int Confidence);
kRecGetNextMatchingTemplate
RECERR RECAPIKRN kRecGetNextMatchingTemplate(FORMTEMPLATEMATCHINGID PrevMatchingId, FORMTEMPLATEMATCHINGID *pNextMatchingId, int *pConfidence)
Querying the matching form templates.
The specification of this function in Java is:
int kRecGetNextMatchingTemplate(FORMTEMPLATEMATCHINGID PrevMatchingId, FORMTEMPLATEMATCHINGID pNextMatchingId, int[] pConfidence)
The specification of this function in Python is:
def kRecGetNextMatchingTemplate(PrevMatchingId: "FORMTEMPLATEMATCHINGID") -> Tuple[int, "FORMTEMPLATEMATCHINGID", int]

◆ kRecGetNextOCRZoneAttribute()

RECERR RECAPIKRN kRecGetNextOCRZoneAttribute | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPCTSTR | prevkey,
 |  | LPTSTR * | key,
 |  | LPTSTR * | value )

Querying the names and the values of the user defined attributes of an OCR zone.

The kRecGetNextOCRZoneAttribute returns the name and the value of the next user defined attribute of a zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[in] | prevkey | Pointer to a string containing the name of the previous attribute. (The string is terminated with a null character.)
[out] | key | Address of a pointer to a string which is allocated and filled by the API-call and contains the name of the next attribute. (The string is terminated with a null character.)
[out] | value | Address of a pointer to a string which is allocated and filled by the API-call and contains the value of the next attribute. (The string will be terminated with a wide-character zero.)
Return values
RECERR
Note
User-defined zone attributes are a set of dynamic named values assigned to the zones and maintained by the Engine. Each zone can have a list of user defined attributes. Use this function to query the attributes of a user zone. If prevkey is NULL, the function returns the name and value of the first attribute, otherwise it returns the name and value of the next attribute in the list.
The index of the first zone in the zone list is zero (0).
The memory allocated for *key and *value can be released using kRecFree.
The specification of this function in C# is:
RECERR kRecGetNextOCRZoneAttribute(IntPtr hPage, int nZone, string prevkey, out string key, out string value);
kRecGetNextOCRZoneAttribute
RECERR RECAPIKRN kRecGetNextOCRZoneAttribute(HPAGE hPage, int nZone, LPCTSTR prevkey, LPTSTR *key, LPTSTR *value)
Querying the names and the values of the user defined attributes of an OCR zone.
The specification of this function in Java is:
int kRecGetNextOCRZoneAttribute(HPAGE hPage, int nZone, String prevkey, String[] key, String[] value)
The specification of this function in Python is:
def kRecGetNextOCRZoneAttribute(hPage: "HPAGE", nZone: int, prevkey: str) -> Tuple[int, str, str]

◆ kRecGetNextTemplateAttribute()

RECERR RECAPIKRN kRecGetNextTemplateAttribute | ( | HPAGE | hPage,
 |  | LPCTSTR | prevkey,
 |  | LPTSTR * | key,
 |  | LPTSTR * | value )

Querying the names and the values of the user defined attributes of a form template.

The kRecGetNextTemplateAttribute returns the name and the value of the next user defined attribute of a form template.

Parameters
[in] | hPage | Handle of the page.
[in] | prevkey | Pointer to a string containing the name of the previous attribute. (The string is terminated with a null character.)
[out] | key | Address of a pointer to a string which is allocated and filled by the API-call and contains the name of the next attribute. (The string is terminated with a null character.)
[out] | value | Address of a pointer to a string which is allocated and filled by the API-call and contains the value of the next attribute. (The string is terminated with a null character.)
Return values
RECERR
Note
User defined template attributes are a set of dynamic named values that are assigned to the template and maintained by the Engine. Each form template have a list of user defined attributes. Typically the attributes are set during the template definition step, and can be queried during the form processing step.
You can query the attributes of a user zone by this function. If prevkey is NULL, the function returns the name and value of the first attribute, otherwise it returns the name and value of the next attribute in the list.
The memory allocated for *key and *value can be released using kRecFree.
If the attribute list does not contain more attributes, *key and *value are set to NULL.
The specification of this function in C# is:
RECERR kRecGetNextTemplateAttribute(IntPtr hPage, string prevkey, out string key, out string value);
kRecGetNextTemplateAttribute
RECERR RECAPIKRN kRecGetNextTemplateAttribute(HPAGE hPage, LPCTSTR prevkey, LPTSTR *key, LPTSTR *value)
Querying the names and the values of the user defined attributes of a form template.
The specification of this function in Java is:
int kRecGetNextTemplateAttribute(HPAGE hPage, String prevkey, String[] key, String[] value)
The specification of this function in Python is:
def kRecGetNextTemplateAttribute(hPage: "HPAGE", prevkey: str) -> Tuple[int, str, str]

◆ kRecGetNextZoneAttribute()

RECERR RECAPIKRN kRecGetNextZoneAttribute | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPCTSTR | prevkey,
 |  | LPTSTR * | key,
 |  | LPTSTR * | value )

Querying the names and the values of the user defined attributes of a user zone.

The kRecGetNextZoneAttribute returns the name and the value of the next user defined attribute of a zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[in] | prevkey | Pointer to a string containing the name of the previous attribute. (The string is terminated with a null character.)
[out] | key | Address of a pointer to a string which is allocated and filled by the API-call and contains the name of the next attribute. (The string is terminated with a null character.)
[out] | value | Address of a pointer to a string which is allocated and filled by the API-call and contains the value of the next attribute. (The string is terminated with a null character.)
Return values
RECERR
Note
User-defined zone attributes are a set of dynamic named values assigned to the zones and maintained by the Engine. Each zone can have a list of user defined attributes. Use this function to query the attributes of a user zone. If prevkey is NULL, the function returns the name and value of the first attribute, otherwise it returns the name and value of the next attribute in the list.
The index of the first zone in the zone list is zero (0).
The memory allocated for *key and *value can be released using kRecFree.
If the attribute list does not contain more attributes, *key and *value are set to NULL.
The specification of this function in C# is:
RECERR kRecGetNextZoneAttribute(IntPtr hPage, int nZone, string prevkey, out string key, out string value);
kRecGetNextZoneAttribute
RECERR RECAPIKRN kRecGetNextZoneAttribute(HPAGE hPage, int nZone, LPCTSTR prevkey, LPTSTR *key, LPTSTR *value)
Querying the names and the values of the user defined attributes of a user zone.
The specification of this function in Java is:
int kRecGetNextZoneAttribute(HPAGE hPage, int nZone, String prevkey, String[] key, String[] value)
The specification of this function in Python is:
def kRecGetNextZoneAttribute(hPage: "HPAGE", nZone: int, prevkey: str) -> Tuple[int, str, str]

◆ kRecGetNextZoneByName()

RECERR RECAPIKRN kRecGetNextZoneByName | ( | HPAGE | hPage,
 |  | LPCTSTR | pZoneName,
 |  | int | nPrevZone,
 |  | int * | nZone )

Querying the next zone with the given name.

The kRecGetNextZoneByName returns the index of the next zone having the given name.

Parameters
[in] | hPage | Handle of the page.
[in] | pZoneName | Pointer to a string containing the name. (The string is terminated with a null character.)
[in] | nPrevZone | Specifies the start of the query. The function returns the index of the first zone with an index greater than nPrevZone. If nPrevZone < 0 the function returns the index of the first zone that has the given name.
[out] | nZone | Address of a variable to hold the index of the first zone with an index greater than nPrevZone and having the given name.
Return values
RECERR
Note
The zones can have a name. More zones can have the same name. You can query the indexes of the zones having the given name. If no such zone is found, the function returns IMG_NOMORE_WARN and *nZone is set to -1 .
The specification of this function in C# is:
RECERR kRecGetNextZoneByName(IntPtr hPage, string pFormFieldName, int PrevZone, out int nZone);
kRecGetNextZoneByName
RECERR RECAPIKRN kRecGetNextZoneByName(HPAGE hPage, LPCTSTR pZoneName, int nPrevZone, int *nZone)
Querying the next zone with the given name.
The specification of this function in Java is:
int kRecGetNextZoneByName(HPAGE hPage, String pZoneName, int nPrevZone, int[] nZone)
The specification of this function in Python is:
def kRecGetNextZoneByName(hPage: "HPAGE", pZoneName: str, nPrevZone: int) -> Tuple[int, int]

◆ kRecGetOCRTableCellText()

RECERR RECAPIKRN kRecGetOCRTableCellText | ( | int | sid,
 |  | HPAGE | hPage,
 |  | int | nZone,
 |  | int | nCellInd,
 |  | LPTSTR * | pBuffer,
 |  | int * | len )

Getting the recognized text in the given cell of the given OCR zone.

The kRecGetOCRTableCellText returns the text recognized in the given cell of the given OCR zone.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | nZone | OCR zone index. The function returns error if the given zone is not a table (WT_TABLE) zone;
[in] | nCellInd | Cell index.
[out] | pBuffer | Address of a pointer to a string which is allocated and filled by the API-call and contains the recognized text. (The string is terminated with a null character.)
[out] | len | Address of a variable to hold the length of text.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
The returned buffer contains a null-terminated string, and len is the length of the string;
The memory allocated for *pBuffer can be released using kRecFree.
The specification of this function in C# is:
RECERR kRecGetOCRTableCellText(int sid, IntPtr hPage, int nZone, int nCell, out string cellText);
kRecGetOCRTableCellText
RECERR RECAPIKRN kRecGetOCRTableCellText(int sid, HPAGE hPage, int nZone, int nCellInd, LPTSTR *pBuffer, int *len)
Getting the recognized text in the given cell of the given OCR zone.
The specification of this function in Java is:
int kRecGetOCRTableCellText(int sid, HPAGE hPage, int nZone, int nCellInd, String[] pBuffer)
The specification of this function in Python is:
def kRecGetOCRTableCellText(sid: int, hPage: "HPAGE", nZone: int, nCellInd: int) -> Tuple[int, str]

◆ kRecGetOCRZoneAttribute()

RECERR RECAPIKRN kRecGetOCRZoneAttribute | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPCTSTR | key,
 |  | LPTSTR * | pValue )

Getting user defined attribute of an OCR zone.

The kRecGetZoneAttribute returns the value of a user defined attribute of the given OCR zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[in] | key | Pointer to a string containing the name of the attribute. (The string is terminated with a null character.)
[out] | pValue | Address of a pointer to a string which is allocated and filled by the API-call and contains the value of the attribute. (The string is terminated with a null character.)
Return values
RECERR
Note
User-defined zone attributes are a set of dynamic named values assigned to the zones and maintained by the Engine, see also kRecSetZoneAttribute.
The index of the first zone in the zone list is zero (0).
The memory allocated for *pValue can be released using kRecFree.
The attributes of an OCR zone cannot be changed. They are set by the Engine when the OCR zone is created. OCR zones inherit the attribute(s) of the parent user zone.
The specification of this function in C# is:
RECERR kRecGetOCRZoneAttribute(IntPtr hPage, int nZone, string key, out string value);
kRecGetOCRZoneAttribute
RECERR RECAPIKRN kRecGetOCRZoneAttribute(HPAGE hPage, int nZone, LPCTSTR key, LPTSTR *pValue)
Getting user defined attribute of an OCR zone.
The specification of this function in Java is:
int kRecGetOCRZoneAttribute(HPAGE hPage, int nZone, String key, String[] pValue)
The specification of this function in Python is:
def kRecGetOCRZoneAttribute(hPage: "HPAGE", nZone: int, key: str) -> Tuple[int, str]

◆ kRecGetOCRZoneBarTypes()

RECERR RECAPIKRN kRecGetOCRZoneBarTypes | ( | int | sid,
 |  | HPAGE | hPage,
 |  | int | nZone,
 |  | LPBAR_ENA | pBarEnaOut,
 |  | INTBOOL * | pBarBinary,
 |  | INTBOOL * | pZoneLevel )

Getting the enabled barcode types for an OCR zone.

The kRecGetOCRZoneBarTypes function inquires the barcode types enabled for recognition for the given zone.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[out] | pBarEnaOut | Address of a buffer sized BAR_SIZE that receives the barcode type enable/disable array.
[out] | pBarBinary | Address of a variable to return whether the zone is recognized in binary mode.
[out] | pZoneLevel | Address of a variable to indicate whether the zone-level or the global settings are returned.
Return values
RECERR
Note
The only differences between this function and kRecGetZoneBarTypes is that the zone index at this function indexes the OCR zone array. The OCR zones inherit the bartype setting from their parent user zone. See also the notes at the kRecGetZoneBarTypes function.
The specification of this function in C# is:
RECERR kRecGetOCRZoneBarTypes(int sid, IntPtr hPage, int nZone, out BAR_ENA[] pBarEnaOut, out bool BarBinary, out bool bZonelevel);
BAR_ENA
BAR_ENA
Barcode enabling.
Definition KernelApi.h:1499
kRecGetOCRZoneBarTypes
RECERR RECAPIKRN kRecGetOCRZoneBarTypes(int sid, HPAGE hPage, int nZone, LPBAR_ENA pBarEnaOut, INTBOOL *pBarBinary, INTBOOL *pZoneLevel)
Getting the enabled barcode types for an OCR zone.
The specification of this function in Java is:
int kRecGetOCRZoneBarTypes(int sid, HPAGE hPage, int nZone, int[] pBarEnaOut, int[] pBarBinary, int[] pZoneLevel)
The specification of this function in Python is:
def kRecGetOCRZoneBarTypes(sid: int, hPage: "HPAGE", nZone: int) -> Tuple[int, "IntArray", bool, bool]

◆ kRecGetOCRZoneFormFieldName()

RECERR RECAPIKRN kRecGetOCRZoneFormFieldName | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPWSTR * | ppFormFieldName )

Querying the name of an OCR-zone.

The kRecGetOCRZoneFormFieldName queries the name of an OCR-zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Index of the OCR-zone to be queried.
[out] | ppFormFieldName | Address of a pointer to a string which will be allocated and filled by the API-call and will contain the form-field name characters. (The string will be terminated with a wide-character zero.)
Return values
RECERR
Note
This function is deprecated, use kRecGetOCRZoneName instead.
The index of the first zone in the zone list is zero (0).
The memory allocated for *ppFormFieldName can be released using kRecFree.
The specification of this function in C# is:
RECERR kRecGetOCRZoneFormFieldName(IntPtr hPage, int nZone, out string ppFormFieldName);
kRecGetOCRZoneFormFieldName
RECERR RECAPIKRN kRecGetOCRZoneFormFieldName(HPAGE hPage, int nZone, LPWSTR *ppFormFieldName)
Querying the name of an OCR-zone.
The specification of this function in Java is:
int kRecGetOCRZoneFormFieldName(HPAGE hPage, int nZone, String[] ppFormFieldName)
The specification of this function in Python is:
def kRecGetOCRZoneFormFieldName(hPage: "HPAGE", nZone: int) -> Tuple[int, str]

◆ kRecGetOCRZoneFormRecognitionState()

RECERR RECAPIKRN kRecGetOCRZoneFormRecognitionState | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | FORMRECOGNITIONSTATE * | pInfo,
 |  | int * | pNumModChar,
 |  | LPTSTR * | ppDataRuleName )

Retrieving information about the result of the form recognition.

This function gets the result of the form recognition on the specified OCR zone.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the OCR zone to be queried.
[out] | pInfo | Pointer of a variable receiving the result of the recognition (see: FORMRECOGNITIONSTATE).
[out] | pNumModChar | Reserved for later use. It can be NULL.
[out] | ppDataRuleName | If this parameter is not NULL, it is the address of a pointer to a string which is allocated and filled by this function and contains the name of the data rule defined for the specified zone. The string is null-terminated.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
See the notes of kRecLoadFormTemplateLibrary for details about data rules.
The memory allocated for *ppDataRuleName should be released using kRecFree after use.
The specification of this function in C# is:
RECERR kRecGetOCRZoneFormRecognitionState(IntPtr hPage, int xZone, out FORMRECOGNITIONSTATE pInfo, out int pNumModChar, out string ppDataRuleName);
// or
RECERR kRecGetOCRZoneFormRecognitionState(IntPtr hPage, int xZone, out FORMRECOGNITIONSTATE pInfo, out int pNumModChar);
// or
RECERR kRecGetOCRZoneFormRecognitionState(IntPtr hPage, int xZone, out FORMRECOGNITIONSTATE pInfo);
kRecGetOCRZoneFormRecognitionState
RECERR RECAPIKRN kRecGetOCRZoneFormRecognitionState(HPAGE hPage, int xZone, FORMRECOGNITIONSTATE *pInfo, int *pNumModChar, LPTSTR *ppDataRuleName)
Retrieving information about the result of the form recognition.
FORMRECOGNITIONSTATE
FORMRECOGNITIONSTATE
Form recognition state.
Definition KernelApi.h:5174
The specification of this function in Java is:
int kRecGetOCRZoneFormRecognitionState(HPAGE hPage, int xZone, FORMRECOGNITIONSTATE[] pInfo, int[] pNumModChar, String[] ppDataRuleName);
The specification of this function in Python is:
def kRecGetOCRZoneFormRecognitionState(hPage: "HPAGE", xZone: int) -> Tuple[int, int, int, str]

◆ kRecGetOCRZoneName()

RECERR RECAPIKRN kRecGetOCRZoneName | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPTSTR * | ppZoneName )

Querying the name of an OCR-zone.

The kRecGetOCRZoneName queries the name of the OCR-zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Index of the OCR-zone to be queried.
[out] | ppZoneName | Address of a pointer to a string which will be allocated and filled by the API-call and will contain the name characters. (The string is terminated with a wide-character zero.)
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
The memory allocated for *ppZoneName can be released using kRecFree.
The specification of this function in C# is:
RECERR kRecGetOCRZoneName(IntPtr hPage, int nZone, out string ppZoneName);
kRecGetOCRZoneName
RECERR RECAPIKRN kRecGetOCRZoneName(HPAGE hPage, int nZone, LPTSTR *ppZoneName)
Querying the name of an OCR-zone.
The specification of this function in Java is:
int kRecGetOCRZoneName(HPAGE hPage, int nZone, String[] ppZoneName)
The specification of this function in Python is:
def kRecGetOCRZoneName(hPage: "HPAGE", nZone: int) -> Tuple[int, str]

◆ kRecGetOCRZoneText()

RECERR RECAPIKRN kRecGetOCRZoneText | ( | int | sid,
 |  | HPAGE | hPage,
 |  | int | nZone,
 |  | LPTSTR * | pBuffer,
 |  | int * | len )

Getting the recognized text in the given OCR zone.

The kRecGetOCRZoneText returns the text recognized in the given OCR zone.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | nZone | OCR zone index.
[out] | pBuffer | Address of a pointer to a string which is allocated and filled by the API-call and contains the recognized text. (The string is terminated with a null character.)
[out] | len | Address of a variable to hold the length of text.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
The returned buffer contains a null-terminated string, and len is the length of the string;
If the zone is a normal barcode zone (not a binary one; see: kRecSetZoneBarTypes) any character codes below 0x20 or between 0x7f and 0xa0 are modified according to the setting Kernel.OcrMgr.Codes.CtrlOffset. If the zone is a binary barcode zone the character codes below 0x20 or between 0x7f and 0xff are converted to escape sequences of the form '\xNN' (NN: two hexadecimal characters). The '\' characters are converted to '\\'.
There is a new-line code (0x0a, '\n') after each text line. In case of barcodes there is one additional '\n' (that is not part of the barcode's data) at the end of a barcode's text even if the barcode's data ends in a new-line code. Note that some barcodes may contain more than one line, too. Multiple barcodes in the same zone are separated with an extra 0x0c ('\f') code.
The memory allocated for *pBuffer can be released using kRecFree.
The specification of this function in C# is:
RECERR kRecGetOCRZoneText(int sid, IntPtr hPage, int nZone, out string Buffer);
kRecGetOCRZoneText
RECERR RECAPIKRN kRecGetOCRZoneText(int sid, HPAGE hPage, int nZone, LPTSTR *pBuffer, int *len)
Getting the recognized text in the given OCR zone.
The specification of this function in Java is:
int kRecGetOCRZoneText(int sid, HPAGE hPage, int nZone, String[] pBuffer)
The specification of this function in Python is:
def kRecGetOCRZoneText(sid: int, hPage: "HPAGE", nZone: int) -> Tuple[int, str]

◆ kRecGetTemplateAttribute()

RECERR RECAPIKRN kRecGetTemplateAttribute | ( | HPAGE | hPage,
 |  | LPCTSTR | key,
 |  | LPTSTR * | pValue )

Getting user defined attribute of a form template.

The kRecGetTemplateAttribute returns the value of a user defined attribute of the template. It can be used during the template definition step.

Parameters
[in] | hPage | Handle of the page.
[in] | key | Pointer to a string containing the name of the attribute. (The string is terminated with a null character.)
[out] | pValue | Address of a pointer to a string which is allocated and filled by the API-call and contains the value of the attribute. (The string is terminated with a null character.) kRecSetZoneAttribute. Address of a pointer to a string which is allocated and filled by the API-call and contains the name characters. (The string is terminated with a null character.)
Return values
RECERR
Note
User defined template attributes are a set of dynamic named values that are assigned to the template and maintained by the Engine. Typically the attributes are set during the template definition step, and can be queried during the form processing step. The attributes are saved when the zone list of the HPAGE is saved into a zone file, and loaded when the zone file is loaded and the template is applied.
The memory allocated for *pValue can be released using kRecFree.
The specification of this function in C# is:
RECERR kRecGetTemplateAttribute(IntPtr hPage, string key, out string value);
kRecGetTemplateAttribute
RECERR RECAPIKRN kRecGetTemplateAttribute(HPAGE hPage, LPCTSTR key, LPTSTR *pValue)
Getting user defined attribute of a form template.
The specification of this function in Java is:
int kRecGetTemplateAttribute(HPAGE hPage, String key, String[] pValue)
The specification of this function in Python is:
def kRecGetTemplateAttribute(hPage: "HPAGE", key: str) -> Tuple[int, str]

◆ kRecGetZoneAttribute()

RECERR RECAPIKRN kRecGetZoneAttribute | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPCTSTR | key,
 |  | LPTSTR * | pValue )

Getting user defined attribute of a user zone.

The kRecGetZoneAttribute returns the value of a user defined attribute of the given user zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[in] | key | Pointer to a string containing the name of the attribute. (The string is terminated with a null character.)
[out] | pValue | Address of a pointer to a string which is allocated and filled by the API-call and will contain the value of the attribute. (The string is terminated with a null character.) kRecSetZoneAttribute. Address of a pointer to a string which is allocated and filled by the API-call and will contain the name characters. (The string is terminated with a null character.)
Return values
RECERR
Note
User-defined zone attributes are a set of dynamic named values assigned to the zones and maintained by the Engine.
The index of the first zone in the zone list is zero (0).
The memory allocated for *pValue can be released using kRecFree.
The specification of this function in C# is:
RECERR kRecGetZoneAttribute(IntPtr hPage, int nZone, string key, out string value);
kRecGetZoneAttribute
RECERR RECAPIKRN kRecGetZoneAttribute(HPAGE hPage, int nZone, LPCTSTR key, LPTSTR *pValue)
Getting user defined attribute of a user zone.
The specification of this function in Java is:
int kRecGetZoneAttribute(HPAGE hPage, int nZone, String key, String[] pValue)
The specification of this function in Python is:
def kRecGetZoneAttribute(hPage: "HPAGE", nZone: int, key: str) -> Tuple[int, str]

◆ kRecGetZoneBarTypes()

RECERR RECAPIKRN kRecGetZoneBarTypes | ( | int | sid,
 |  | HPAGE | hPage,
 |  | int | nZone,
 |  | LPBAR_ENA | pBarEnaOut,
 |  | INTBOOL * | pBarBinary,
 |  | INTBOOL * | pZoneLevel )

Getting the enabled barcode types for a zone.

The kRecGetZoneBarTypes function inquires the barcode types enabled for recognition for the given zone.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[out] | pBarEnaOut | Address of a buffer sized BAR_SIZE that receives the barcode type enable/disable array.
[out] | pBarBinary | Address of a variable to return whether the zone is recognized in binary mode.
[out] | pZoneLevel | Address of a variable to indicate whether the zone-level or the global settings are returned.
Return values
RECERR
Note
The enabled barcode types can be set globally (kRecSetBarTypes) and zone by zone (kRecSetZoneBarTypes). This function returns the barcode types enabled for the given zone whether zone-level setting has been set or not. If the zone-level setting has not been set, the function returns the globally enabled barcode types (kRecGetBarTypes) and the global binary mode (Kernel.OcrMgr.BarBinary setting), while sets *pZoneLevel to FALSE.
The specification of this function in C# is:
RECERR kRecGetZoneBarTypes(int sid, IntPtr hPage, int nZone, out BAR_ENA[] pBarEnaOut, out bool BarBinary, out bool bZonelevel);
kRecGetZoneBarTypes
RECERR RECAPIKRN kRecGetZoneBarTypes(int sid, HPAGE hPage, int nZone, LPBAR_ENA pBarEnaOut, INTBOOL *pBarBinary, INTBOOL *pZoneLevel)
Getting the enabled barcode types for a zone.
The specification of this function in Java is:
int kRecGetZoneBarTypes(int sid, HPAGE hPage, int nZone, int[] pBarEnaOut, int[] pBarBinary, int[] pZoneLevel)
The specification of this function in Python is:
def kRecGetZoneBarTypes(sid: int, hPage: "HPAGE", nZone: int) -> Tuple[int, "IntArray", bool, bool]

◆ kRecGetZoneFormFieldName()

RECERR RECAPIKRN kRecGetZoneFormFieldName | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPWSTR * | ppFormFieldName )

Querying the name of a user-zone.

The kRecGetZoneFormFieldName queries the name of a user-zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Index of the user-zone to be queried.
[out] | ppFormFieldName | Address of a pointer to a 16-bit UNICODE string which will be allocated and filled by the API-call and will contain the form-field name characters. (The string will be terminated with a wide-character zero.)
Return values
RECERR
Note
This function is deprecated, use kRecGetZoneName instead.
The index of the first zone in the zone list is zero (0).
The memory allocated for *ppFormFieldName can be released using kRecFree.
The specification of this function in C# is:
RECERR kRecGetZoneFormFieldName(IntPtr hPage, int nZone, out string ppFormFieldName);
kRecGetZoneFormFieldName
RECERR RECAPIKRN kRecGetZoneFormFieldName(HPAGE hPage, int nZone, LPWSTR *ppFormFieldName)
Querying the name of a user-zone.
The specification of this function in Java is:
int kRecGetZoneFormFieldName(HPAGE hPage, int nZone, String[] ppFormFieldName)
The specification of this function in Python is:
def kRecGetZoneFormFieldName(hPage: "HPAGE", nZone: int) -> Tuple[int, str]

◆ kRecGetZoneName()

RECERR RECAPIKRN kRecGetZoneName | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPTSTR * | ppZoneName )

Querying the name of a user-zone.

The kRecGetZoneName queries the name of a user-zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Index of the user-zone to be queried.
[out] | ppZoneName | Address of a pointer to a string which will be allocated and filled by the API-call and will contain the name characters. (The string will be terminated with a wide-character zero.)
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
The memory allocated for *ppZoneName can be released using kRecFree.
The specification of this function in C# is:
RECERR kRecGetZoneName(IntPtr hPage, int nZone, out string ppZoneName);
kRecGetZoneName
RECERR RECAPIKRN kRecGetZoneName(HPAGE hPage, int nZone, LPTSTR *ppZoneName)
Querying the name of a user-zone.
The specification of this function in Java is:
int kRecGetZoneName(HPAGE hPage, int nZone, String[] ppZoneName)
The specification of this function in Python is:
def kRecGetZoneName(hPage: "HPAGE", nZone: int) -> Tuple[int, str]

◆ kRecGetZoneRefAnchors()

RECERR RECAPIKRN kRecGetZoneRefAnchors | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | REF_ANCHOR_MODE * | pmode,
 |  | int * | refAnchorsOut )

Getting the reference anchor(s) of the zone.

The kRecGetZoneRefAnchors returns the reference anchor(s) of the zone. It can be used during the template definition step.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[out] | pmode | Address of a variable to hold the number of the reference anchors.
[out] | refAnchorsOut | Address of a four-element array to hold the indexes of the reference anchors. The index(es) of the reference anchors are returned here.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetZoneRefAnchors(IntPtr hPage, int nZone, out int[] refAnchorsOut);
kRecGetZoneRefAnchors
RECERR RECAPIKRN kRecGetZoneRefAnchors(HPAGE hPage, int nZone, REF_ANCHOR_MODE *pmode, int *refAnchorsOut)
Getting the reference anchor(s) of the zone.
The specification of this function in Java is:
int kRecGetZoneRefAnchors(HPAGE hPage, int nZone, REF_ANCHOR_MODE[] pmode, int[] refAnchorsOut)
REF_ANCHOR_MODE
REF_ANCHOR_MODE
Zone attribute that specifies how the zone is anchored to reference anchors(s).
Definition KernelApi.h:4291
The specification of this function in Python is:
def kRecGetZoneRefAnchors(hPage: "HPAGE", nZone: int) -> Tuple[int, int, "IntArray"]

◆ kRecInsertAnchorZone()

RECERR RECAPIKRN kRecInsertAnchorZone | ( | int | sid,
 |  | HPAGE | hPage,
 |  | ANCHORCONTENT | aContent,
 |  | ANCHORTYPE | aType,
 |  | int | nZone )

Inserting anchor zone.

The kRecInsertAnchorZone inserts a new anchor zone in the user zone list of the page. It can be used during the template definition step.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | aContent | Content of the anchor.
[in] | aType | Type of the anchor.
[in] | nZone | Index in the user zone list where the new zone should be inserted. Use zero (0) to insert the zone as the first element of the zone list. To insert a zone as the last element of the zone list, use -1.
Return values
RECERR
Note
Anchor zones are defined during template definition step and used during form processing step for template selection and form registration (ANCHORTYPE). Anchor zones are defined by their types and content. Types define what their function is in form recognition and template creation. Content determines what the actual information sought is. The anchor can be text, barcode, bitmap and letter anchor (see: ANCHORCONTENT). If the anchor is text, letter or barcode anchor, the image is recognized and the anchor value is searched in the recognized text. If the anchor is bitmap anchor, the bitmap attached to the anchor is searched using a template matching algorithm. Each anchor zone has a reference point (ANCHOR_REF_POINT). Anchor zones are ignore zones that have additional information for matching the template to the incoming forms. Additional attributes of the anchor zones can be specified later by kRecUpdateAnchorZone, kRecSetAnchorFlag, kRecSetAnchorText, kRecSetAnchorRegExp, kRecSetAnchorDrift, kRecSetZoneBarTypes, kRecSetAnchorRefPoint.
The specification of this function in C# is:
RECERR kRecInsertAnchorZone(int sid, IntPtr hPage, ANCHORCONTENT aContent, ANCHORTYPE aType, int nZone);
kRecInsertAnchorZone
RECERR RECAPIKRN kRecInsertAnchorZone(int sid, HPAGE hPage, ANCHORCONTENT aContent, ANCHORTYPE aType, int nZone)
Inserting anchor zone.
The specification of this function in Java is:
int kRecInsertAnchorZone(int sid, HPAGE hPage, ANCHORCONTENT aContent, ANCHORTYPE aType, int nZone)
The specification of this function in Python is:
def kRecInsertAnchorZone(sid: int, hPage: "HPAGE", aContent: "ANCHORCONTENT", aType: int, nZone: int) -> int

◆ kRecInsertDropOutColorZone()

RECERR RECAPIKRN kRecInsertDropOutColorZone | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPCRECT | pRect,
 |  | int | nZone )

Inserting dropout color zone.

The kRecInsertDropOutColorZone inserts a dropout color zone. It can be used during the template definition step.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image in the page whose coordinate system you used in defining the boundary box for the new zone. It is recommended to use II_CURRENT coordinates, if possible.
[in] | pRect | Pointer to the rectangle containing the bounding box of the zone.
[in] | nZone | Index in the user zone list where the new zone should be inserted. Use zero (0) to insert the zone as the first element of the zone list. To insert a zone as the last element of the zone list, use -1.
Return values
RECERR
Note
Dropout color zone is used by the form processing function kRecApplyFormTemplateEx. The type of the zone is WT_IGNORE. Internally the zone contains a flag which indicates that this zone must be processed by kRecApplyFormTemplateEx. HPAGE may contain only one dropout color zone. If it already contains a dropout color zone, the function returns API_PARAMETER_ERR. The index of the dropout color zone can be queried by kRecGetDropOutColorZoneIndex.
The specification of this function in C# is:
RECERR kRecInsertDropOutColorZone(IntPtr hPage, IMAGEINDEX iiImg, [In] ref RECT pRect, int nZone);
kRecInsertDropOutColorZone
RECERR RECAPIKRN kRecInsertDropOutColorZone(HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pRect, int nZone)
Inserting dropout color zone.
The specification of this function in Java is:
int kRecInsertDropOutColorZone(HPAGE hPage, IMAGEINDEX iiImg, RECT pRect, int nZone)
The specification of this function in Python is:
def kRecInsertDropOutColorZone(hPage: "HPAGE", iiImg: int, pRect: "RECT", nZone: int) -> int

◆ kRecIsComb()

RECERR RECAPIKRN kRecIsComb | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | INTBOOL * | isComb )

Returning whether the zone has comb info.

The kRecIsComb returns whether the user zone has comb info. About combs see: kRecCreateCombInfo.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the zone in the user zone list.
[out] | isComb | Address of a variable to return whether the zone has comb info.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecIsComb(IntPtr hPage, int xZone, [MarshalAs(UnmanagedType.Bool)] out bool isComb);
kRecIsComb
RECERR RECAPIKRN kRecIsComb(HPAGE hPage, int xZone, INTBOOL *isComb)
Returning whether the zone has comb info.
The specification of this function in Java is:
int kRecIsComb(HPAGE hPage, int xZone, int[] isComb)
The specification of this function in Python is:
def kRecIsComb(hPage: "HPAGE", xZone: int) -> Tuple[int, bool]

◆ kRecLoadFormTemplate()

RECERR RECAPIKRN kRecLoadFormTemplate | ( | int | sid,
 |  | HFORMTEMPLATEPAGE * | phFormTemplatePage,
 |  | LPCTSTR | pTemplateFilename )

Loading a form template from a form template file.

The kRecLoadFormTemplate function loads a form template from a form template file into the form handling module and returns its handle. After loading the form template it can be applied on several pages without loading it from file again (see: kRecApplyFormTemplate).

Parameters
[in] | sid | Settings Collection ID.
[in] | phFormTemplatePage | Address of a variable to store the handle of the created form template page.
[in] | pTemplateFilename | Path to the form template file.
Return values
RECERR
Note
The caller should free the returned HFORMTEMPLATEPAGE by kRecFreeFormTemplate.
The specification of this function in C# is:
RECERR kRecLoadFormTemplate(int sid, out IntPtr hTemplate, string pTemplateFilename);
kRecLoadFormTemplate
RECERR RECAPIKRN kRecLoadFormTemplate(int sid, HFORMTEMPLATEPAGE *phFormTemplatePage, LPCTSTR pTemplateFilename)
Loading a form template from a form template file.
The specification of this function in Java is:
int kRecLoadFormTemplate(int sid, HFORMTEMPLATEPAGE phFormTemplatePage, String pTemplateFilename)
The specification of this function in Python is:
def kRecLoadFormTemplate(sid: int, pTemplateFilename: str) -> Tuple[int, "HFORMTEMPLATEPAGE"]

◆ kRecLoadFormTemplateLibrary()

RECERR RECAPIKRN kRecLoadFormTemplateLibrary | ( | int | sid,
 |  | LPCTSTR | pTmplLib,
 |  | INTBOOL | bLoadSTS,
 |  | HFORMTEMPLATEPAGE ** | pphFormTmplArray,
 |  | int * | pLength )

Loading form template library.

The kRecLoadFormTemplateLibrary function loads a form template library from a form template library file and returns the array of form template handles. The returned array can be used to find the matching templates on several pages without loading it from file again (see: kRecFindFormTemplate).

Parameters
[in] | sid | Settings Collection ID.
[in] | pTmplLib | Path to the form template library file.
[in] | bLoadSTS | If this parameter is TRUE, the function loads the settings from the form template library.
[out] | pphFormTmplArray | Address of a variable to store the handles of the created form templates.
[out] | pLength | Address of a variable to store the number of handles in the returned array.
Return values
RECERR
Note
The form template library contains a set of form templates. A form template library can be created using the Form Template Editor. The form template library is a ZIP file that may contain one or more form templates in hierarchical directory structure. Although the structure of the library can be arbitrary, there are two proposed structures supported by Form Template Editor: one for single-page forms and the other for multi-page forms. For single-page forms, a flat library can be created, which does not contain page numbers. In this case, the forms are identified by name. For multi-page forms, 2-level libraries can be created: the template library contains container folders, and the folders contain the templates. The folders are identified by name, and the templates are identified by page-numbers. The name and page-number of the loaded form templates can be queried by kRecGetFormTemplateInfo.
A form template library may contain a setting file (Settings.sts in the root). If bLoadSTS parameter is TRUE, the function loads this file from the form template library.
The function opens the library file, loads all files with .zon extension, and if the root contains a file named Setting.sts, it is loaded as well. In addition, if a data rule file exists, it is loaded as well. The other files are ignored.
The data rules are grammatical rules, which can be defined in the Form Template Editor and can be assigned to form fields. Data rule is useful when a form field does not contain free format data (e.g. comment, detailed description, etc.) but it follows some regularity (e.g. telephone number, name of a city, capital letters, etc.). Data rules take part in the form processing after the text recognition. So they do not change the recognition result and the result of data extraction. The fields having text that is not matching to the assigned data rule are flagged. In such a way data rules can pick out the fields that are misfilled or misrecognized. The state of matching can be queried by kRecGetOCRZoneFormRecognitionState.
The evaluation of the form field text against the assigned data rule is performed at the end of the recognition. Since kRecLoadFormTemplateLibrary loads the data rule dictionary into Settings Collection sid, the recognition should be run in the same Setings Collection or one of its children (see kRecCreateSettingsCollection).
Detailed information about the data rules can be found in the Reference of Form Template Editor.
The templates cannot contain bitmap anchors (ANCHORCONTENT). If any sample contains bitmap anchor the function returns IMG_ANCHOR_CONTENT_ERR error.
The returned form template array is the input of the next processing step (kRecFindFormTemplate).
More images can be processed using the same form template array. If the form template array is no longer needed, it should be freed by invoking the kRecFreeFormTemplateArray function.
The specification of this function in C# is:
RECERR kRecLoadFormTemplateLibrary(int sid, string pTmplLib, bool bLoadSTS, out IntPtr[] pphFormTmplArray);
kRecLoadFormTemplateLibrary
RECERR RECAPIKRN kRecLoadFormTemplateLibrary(int sid, LPCTSTR pTmplLib, INTBOOL bLoadSTS, HFORMTEMPLATEPAGE **pphFormTmplArray, int *pLength)
Loading form template library.
The specification of this function in Java is:
int kRecLoadFormTemplateLibrary(int sid, String pTmplLib, int bLoadSTS, FormTemplatePageHandleArray pphFormTmplArray)
The specification of this function in Python is:
def kRecLoadFormTemplateLibrary(sid: int, pTmplLib: str, bLoadSTS: bool) -> Tuple[int, "FormTemplatePageHandleArray"]

◆ kRecLocateComb()

RECERR RECAPIKRN kRecLocateComb | ( | int | sid,
 |  | HPAGE | hPage,
 |  | int | xZone )

Analyzing image and detecting comb cells.

The kRecLocateComb detects the comb cells within a user zone. It can be used during the template definition step. About combs see: kRecCreateCombInfo.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | xZone | Index of the zone in the user zone list.
Return values
RECERR
Note
The function analyses the image area inside the given user zone. It detects whether it contains a comb, and if so, it creates comb info. The function may change the size of the user zone: the zone is applied to the comb. The comb info can be queried by calling kRecGetCombCellCount, kRecGetCombInfo, kRecGetCombCells.
The specification of this function in C# is:
RECERR kRecLocateComb(int sid, IntPtr hPage, int xZone);
kRecLocateComb
RECERR RECAPIKRN kRecLocateComb(int sid, HPAGE hPage, int xZone)
Analyzing image and detecting comb cells.
The specification of this function in Java is:
int kRecLocateComb(int sid, HPAGE hPage, int xZone)
The specification of this function in Python is:
def kRecLocateComb(sid: int, hPage: "HPAGE", xZone: int) -> int

◆ kRecSaveFormTemplate()

RECERR RECAPIKRN kRecSaveFormTemplate | ( | int | sid,
 |  | HPAGE | hPage,
 |  | LPCTSTR | pTemplateFilename )

Saving user zones in a form template file.

A form template file is a special zone file which contains additional information. It contains anchor information (anchor zones) and the process zones also contain additional zone information. The template file is used either by kRecLoadFormTemplate or kRecApplyFormTemplateFile.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | pTemplateFilename | Path to the form template file.
Return values
RECERR
Note
There are several possibilities for creating form templates:
  1. Manual form template creation:
    • load an empty form image;
    • use kRecInsertZone to insert process zones (type WT_FLOW) and anchor zones (the anchor zones can be inserted as WT_IGNORE zone types);
    • save the form template with kRecSaveFormTemplate;
  2. Automatic form template creation from a scanned form image:
    • load an empty form image;
    • set page descriptor to LZ_FORM (or insert one or more WT_FORM zones, but do not use LZ_FORM in this case);
    • call kRecLocateZones;
    • call kRecCreateFormTemplate;
    • save the form template with kRecSaveFormTemplate;
  3. Form template generation with OmniPage 2025:
    • load an empty form image into OmniPage 2025;
    • recognize it as a form. Modify the fields in the editor if necessary;
    • save the output in XML format;
    • load an empty form image into CSDK;
    • load the OmniPage 2025 XML output with the kRecLoadZones function;
    • save the form template with kRecSaveFormTemplate;
  4. Automatic form template creation from a fillable PDF Form:
    • load an active non-image-only PDF form;
    • call kRecCreateFormTemplate;
    • save the form template with kRecSaveFormTemplate.
The User zone list must contain anchor zones. There is no distinct zone type for the anchor zones: their type is WT_IGNORE. Anchors are simply rectangles. Anchors can be placed on fix static texts which can be identified on the filled forms. It is recommended to define four anchors near the four corners of the page. kRecSaveFormTemplate also saves the bitmap inside the anchors. This information is used by kRecApplyFormTemplate and kRecApplyFormTemplateFile. When the form template is created from an active PDF form - differently from the previous - the anchor zones contain textual information and not a bitmap. Therefore anchor zones should not be modified before kRecSaveFormTemplate.
The specification of this function in C# is:
RECERR kRecSaveFormTemplate(int sid, IntPtr hPage, string pTemplateFilename);
kRecSaveFormTemplate
RECERR RECAPIKRN kRecSaveFormTemplate(int sid, HPAGE hPage, LPCTSTR pTemplateFilename)
Saving user zones in a form template file.
The specification of this function in Java is:
int kRecSaveFormTemplate(int sid, HPAGE hPage, String pTemplateFilename)
The specification of this function in Python is:
def kRecSaveFormTemplate(sid: int, hPage: "HPAGE", pTemplateFilename: str) -> int

◆ kRecSetAnchorContent()

RECERR RECAPIKRN kRecSetAnchorContent | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | ANCHORCONTENT | aContent )

Setting anchor content.

The kRecSetAnchorContent sets the content of the anchor zone. It can be used during the template definition step.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[in] | aContent | Content of the anchor (ANCHORCONTENT).
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecSetAnchorContent(IntPtr hPage, int nZone, ANCHORCONTENT aContent);
kRecSetAnchorContent
RECERR RECAPIKRN kRecSetAnchorContent(HPAGE hPage, int nZone, ANCHORCONTENT aContent)
Setting anchor content.
The specification of this function in Java is:
int kRecSetAnchorContent(HPAGE hPage, int nZone, ANCHORCONTENT aContent)
The specification of this function in Python is:
def kRecSetAnchorContent(hPage: "HPAGE", nZone: int, aContent: "ANCHORCONTENT") -> int

◆ kRecSetAnchorDrift()

RECERR RECAPIKRN kRecSetAnchorDrift | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | int | nZone,
 |  | SIZE | drift )

Setting the drift area of text and barcode anchors.

The kRecSetAnchorDrift sets the drift area of text and barcode anchors. It can be used during the template definition step.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image, where drift is specified.
[in] | nZone | Zone index.
[in] | drift | Drift attribute.
Return values
RECERR
Note
The drift area specifies the environment where the anchor is searched. It is a rectangular area, the center of the area is the center of the zone, and the size of the rectangle is specified by the drift parameter. The drift area can be infinite: specify -1 in order to set an infinite area.
The specification of this function in C# is:
RECERR kRecSetAnchorDrift(IntPtr hPage, IMAGEINDEX iiImg, int nZone, SIZE drift);
kRecSetAnchorDrift
RECERR RECAPIKRN kRecSetAnchorDrift(HPAGE hPage, IMAGEINDEX iiImg, int nZone, SIZE drift)
Setting the drift area of text and barcode anchors.
The specification of this function in Java is:
int kRecSetAnchorDrift(HPAGE hPage, IMAGEINDEX iiImg, int nZone, SIZE drift)
The specification of this function in Python is:
def kRecSetAnchorDrift(hPage: "HPAGE", iiImg: int, nZone: int, drift: "SIZE") -> int

◆ kRecSetAnchorFlag()

RECERR RECAPIKRN kRecSetAnchorFlag | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | ANCHORFLAG | flag,
 |  | INTBOOL | value )

Changing anchor zone flags.

The kRecSetAnchorFlag sets or resets the given anchor zone flag. It can be used during the template definition step.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[in] | flag | Flag to set or reset (ANCHORFLAG).
[in] | value | The specified flag is set if its value is TRUE, otherwise it is reset. Read only flags cannot be changed.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecSetAnchorFlag(IntPtr hPage, int nZone, ANCHORFLAG flag, [MarshalAs(UnmanagedType.Bool)] bool value);
kRecSetAnchorFlag
RECERR RECAPIKRN kRecSetAnchorFlag(HPAGE hPage, int nZone, ANCHORFLAG flag, INTBOOL value)
Changing anchor zone flags.
The specification of this function in Java is:
int kRecSetAnchorFlag(HPAGE hPage, int nZone, ANCHORFLAG flag, int value)
The specification of this function in Python is:
def kRecSetAnchorFlag(hPage: "HPAGE", nZone: int, flag: int, value: bool) -> int

◆ kRecSetAnchorRefPoint()

RECERR RECAPIKRN kRecSetAnchorRefPoint | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | ANCHOR_REF_POINT | ref )

Setting the reference point of the anchor zone.

The kRecSetAnchorRefPoint sets the reference point of the anchor zone. It can be used during the template definition step.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[in] | ref | Reference point setting.
Return values
RECERR
Note
Each anchor zone has a reference point. The reference point can be:
  • the center of the bounding box,
  • top-left, top-right, bottom-left or bottom-right corner of the bounding box. The reference point is more relevant if the text length can vary (with regular expressions). The default is REF_AUTO: this means that the reference point is the center of the zone if regular expression is not specified, and the top-left of the zone if regular expression is specified.
The specification of this function in C# is:
RECERR kRecSetAnchorRefPoint(IntPtr hPage, int nZone, ANCHOR_REF_POINT refpt);
kRecSetAnchorRefPoint
RECERR RECAPIKRN kRecSetAnchorRefPoint(HPAGE hPage, int nZone, ANCHOR_REF_POINT ref)
Setting the reference point of the anchor zone.
The specification of this function in Java is:
int kRecSetAnchorRefPoint(HPAGE hPage, int nZone, ANCHOR_REF_POINT ref)
The specification of this function in Python is:
def kRecSetAnchorRefPoint(hPage: "HPAGE", nZone: int, ref: int) -> int

◆ kRecSetAnchorRegExp()

RECERR RECAPIKRN kRecSetAnchorRegExp | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPCWSTR | pRegExp )

Setting regular expression of text and barcode anchors.

The kRecSetAnchorRegExp sets the regular expression of text and barcode anchors. It can be used during the template definition step.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[in] | pRegExp | The regular expression to set.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecSetAnchorRegExp(IntPtr hPage, int nZone, string pRegExp);
kRecSetAnchorRegExp
RECERR RECAPIKRN kRecSetAnchorRegExp(HPAGE hPage, int nZone, LPCWSTR pRegExp)
Setting regular expression of text and barcode anchors.
The specification of this function in Java is:
int kRecSetAnchorRegExp(HPAGE hPage, int nZone, String pRegExp)
The specification of this function in Python is:
def kRecSetAnchorRegExp(hPage: "HPAGE", nZone: int, pRegExp: str) -> int

◆ kRecSetAnchorText()

RECERR RECAPIKRN kRecSetAnchorText | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPCWSTR | pText )

Setting the text attribute of text and barcode anchors.

The kRecSetAnchorText sets the text attribute of text and barcode anchors. It can be used during the template definition step.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[in] | pText | Text attribute of the anchor zone.
Return values
RECERR
Note
If the anchor is not a text or bitmap anchor, the function returns an error.
The specification of this function in C# is:
RECERR kRecSetAnchorText(IntPtr hPage, int nZone, string Text);
kRecSetAnchorText
RECERR RECAPIKRN kRecSetAnchorText(HPAGE hPage, int nZone, LPCWSTR pText)
Setting the text attribute of text and barcode anchors.
The specification of this function in Java is:
int kRecSetAnchorText(HPAGE hPage, int nZone, String pText)
The specification of this function in Python is:
def kRecSetAnchorText(hPage: "HPAGE", nZone: int, pText: str) -> int

◆ kRecSetAnchorType()

RECERR RECAPIKRN kRecSetAnchorType | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | ANCHORTYPE | aType )

Setting anchor type.

The kRecSetAnchorType sets the type of the anchor zone. It can be used during the template definition step.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[in] | aType | Type of the anchor (ANCHORTYPE).
Return values
RECERR
Note
There are four anchor types both for text and barcode, see ANCHORTYPE.
The specification of this function in C# is:
RECERR kRecSetAnchorType(IntPtr hPage, int nZone, ANCHORTYPE aType);
kRecSetAnchorType
RECERR RECAPIKRN kRecSetAnchorType(HPAGE hPage, int nZone, ANCHORTYPE aType)
Setting anchor type.
The specification of this function in Java is:
int kRecSetAnchorType(HPAGE hPage, int nZone, ANCHORTYPE aType)
The specification of this function in Python is:
def kRecSetAnchorType(hPage: "HPAGE", nZone: int, aType: int) -> int

◆ kRecSetCombCells()

RECERR RECAPIKRN kRecSetCombCells | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | int | xZone,
 |  | const COMB_CELL_INFO * | pCells,
 |  | int | nCells )

Setting the cells of a comb.

The kRecSetCombCells sets the cells of a comb. About combs see: kRecCreateCombInfo.

Parameters
[in] | hPage | Handle of the page.
[in] | iiImg | Index of the image, in which the coordinates of the cells are given.
[in] | xZone | Index of the zone in the user zone list.
[in] | pCells | Array of COMB_CELL_INFO structures containing the left and right coordinates of the cells.
[in] | nCells | Length of pCells array.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecSetCombCells(IntPtr hPage, IMAGEINDEX iiImg, int xZone, COMB_CELL_INFO[] pCells);
kRecSetCombCells
RECERR RECAPIKRN kRecSetCombCells(HPAGE hPage, IMAGEINDEX iiImg, int xZone, const COMB_CELL_INFO *pCells, int nCells)
Setting the cells of a comb.
The specification of this function in Java is:
int kRecSetCombCells(HPAGE hPage, IMAGEINDEX iiImg, int xZone, COMB_CELL_INFO[] pCells)
The specification of this function in Python is:
def kRecSetCombCells(hPage: "HPAGE", iiImg: int, xZone: int, pCells: "CombCellInfoArray") -> int

◆ kRecSetCombInfo()

RECERR RECAPIKRN kRecSetCombInfo | ( | HPAGE | hPage,
 |  | int | xZone,
 |  | INTBOOL | hasTopBorder,
 |  | COMB_SPLITTER_HEIGHT | splitterHeight )

Setting comb attributes.

The kRecSetCombInfo sets the attributes of a comb. About combs see: kRecCreateCombInfo.

Parameters
[in] | hPage | Handle of the page.
[in] | xZone | Index of the zone in the user zone list.
[in] | hasTopBorder | Specifies whether the comb has top border line.
[in] | splitterHeight | Specifies the height of the splitter lines.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecSetCombInfo(IntPtr hPage, int xZone, [MarshalAs(UnmanagedType.Bool)] bool hasTopBorder, COMB_SPLITTER_HEIGHT splitterHeight);
kRecSetCombInfo
RECERR RECAPIKRN kRecSetCombInfo(HPAGE hPage, int xZone, INTBOOL hasTopBorder, COMB_SPLITTER_HEIGHT splitterHeight)
Setting comb attributes.
The specification of this function in Java is:
int kRecSetCombInfo(HPAGE hPage, int xZone, int hasTopBorder, COMB_SPLITTER_HEIGHT splitterHeight)
The specification of this function in Python is:
def kRecSetCombInfo(hPage: "HPAGE", xZone: int, hasTopBorder: bool, splitterHeight: int) -> int

◆ kRecSetFormTemplateName()

RECERR RECAPIKRN kRecSetFormTemplateName | ( | HPAGE | hPage,
 |  | LPCTSTR | pTemplateName )

Setting the name of the form template.

The kRecSetFormTemplateName sets the name of the form template. It can be used during the template definition step.

Parameters
[in] | hPage | Handle of the page.
[in] | pTemplateName | Name of the template.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecSetFormTemplateName(IntPtr hPage, string pTemplateName);
kRecSetFormTemplateName
RECERR RECAPIKRN kRecSetFormTemplateName(HPAGE hPage, LPCTSTR pTemplateName)
Setting the name of the form template.
The specification of this function in Java is:
int kRecSetFormTemplateName(HPAGE hPage, String pTemplateName)
The specification of this function in Python is:
def kRecSetFormTemplateName(hPage: "HPAGE", pTemplateName: str) -> int

◆ kRecSetOCRZoneFormFieldName()

RECERR RECAPIKRN kRecSetOCRZoneFormFieldName | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPCWSTR | pFormFieldName )

Changing the name of a form-field attached to an OCR-zone.

The kRecSetOCRZoneFormFieldName changes the name of an OCR-zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Index of the OCR-zone to be updated.
[in] | pFormFieldName | Pointer to a 16-bit UNICODE string containing the name characters to be set. (The string is terminated with a wide-character zero.)
Return values
RECERR
Note
This function is deprecated, use kRecSetOCRZoneName instead.
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
RECERR kRecSetOCRZoneFormFieldName(IntPtr hPage, int nZone, string pFormFieldName);
kRecSetOCRZoneFormFieldName
RECERR RECAPIKRN kRecSetOCRZoneFormFieldName(HPAGE hPage, int nZone, LPCWSTR pFormFieldName)
Changing the name of a form-field attached to an OCR-zone.
The specification of this function in Java is:
int kRecSetOCRZoneFormFieldName(HPAGE hPage, int nZone, String pFormFieldName)
The specification of this function in Python is:
def kRecSetOCRZoneFormFieldName(hPage: "HPAGE", nZone: int, pFormFieldName: str) -> int

◆ kRecSetOCRZoneName()

RECERR RECAPIKRN kRecSetOCRZoneName | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPCTSTR | pZoneName )

Changing the name of an OCR-zone.

The kRecSetOCRZoneName changes the name of an OCR-zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Index of the OCR-zone to be updated.
[in] | pZoneName | Pointer to a string containing the name characters to be set. (The string is terminated with a null character.)
Return values
RECERR
Note
The zones can have a name. More zones can have the same name. When the OCR zones are created by the Engine, they inherit the name of the parent user zone.
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
RECERR kRecSetOCRZoneName(IntPtr hPage, int nZone, string pZoneName);
kRecSetOCRZoneName
RECERR RECAPIKRN kRecSetOCRZoneName(HPAGE hPage, int nZone, LPCTSTR pZoneName)
Changing the name of an OCR-zone.
The specification of this function in Java is:
int kRecSetOCRZoneName(HPAGE hPage, int nZone, String pZoneName)
The specification of this function in Python is:
def kRecSetOCRZoneName(hPage: "HPAGE", nZone: int, pZoneName: str) -> int

◆ kRecSetTemplateAttribute()

RECERR RECAPIKRN kRecSetTemplateAttribute | ( | HPAGE | hPage,
 |  | LPCTSTR | key,
 |  | LPCTSTR | value )

Setting user defined attribute of a form template.

The kRecSetTemplateAttribute inserts, changes or deletes a user defined attribute of a form template. It can be used during the template definition step.

Parameters
[in] | hPage | Handle of the page.
[in] | key | Pointer to a string containing the name of the attribute. (The string is terminated with a null character.) If the template does not have an attribute by that name, a new attribute is inserted. If the template already has an attribute with the same name and the value parameter is null or an empty string, the attribute is deleted; otherwise the value of the attribute is changed.
[in] | value | Pointer to a string containing the value of the attribute. (The string is terminated with a null character.) If value is NULL pointer or the given string is empty, the attribute is deleted.
Return values
RECERR
Note
User defined template attributes are a set of dynamic named values that are assigned to the template and maintained by the Engine. Typically the attributes are set during the template definition step, and can be queried during the form processing step. The attributes are saved when the zone list of the HPAGE is saved into a zone file, and loaded when the zone file is loaded and the template is applied.
The specification of this function in C# is:
RECERR kRecSetTemplateAttribute(IntPtr hPage, string key, string value);
kRecSetTemplateAttribute
RECERR RECAPIKRN kRecSetTemplateAttribute(HPAGE hPage, LPCTSTR key, LPCTSTR value)
Setting user defined attribute of a form template.
The specification of this function in Java is:
int kRecSetTemplateAttribute(HPAGE hPage, String key, String value)
The specification of this function in Python is:
def kRecSetTemplateAttribute(hPage: "HPAGE", key: str, value: str) -> int

◆ kRecSetZoneAttribute()

RECERR RECAPIKRN kRecSetZoneAttribute | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPCTSTR | key,
 |  | LPCTSTR | value )

Setting user defined attribute of a user zone.

The kRecSetZoneAttribute inserts, changes or deletes a user defined attribute of the given user zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[in] | key | Pointer to a string containing the name of the attribute. (The string is terminated with a null character.) If the zone does not have an attribute by that name, a new attribute is inserted. If the zone already has attribute with the same name and the value parameter is null or an empty string, the attribute is deleted; otherwise, the value of the attribute is changed.
[in] | value | Pointer to a string containing the value of the attribute. (The string is terminated with a null character.) If value is NULL pointer or the given string is empty, the attribute is deleted.
Return values
RECERR
Note
User-defined zone attributes are a set of dynamic named values that are assigned to the zones and maintained by the Engine. Typically the attributes are set during the template definition step, and can be queried during the form processing step. The attributes are saved when the zone list of the HPAGE is saved into a zone file, and loaded when the zone file is loaded. The OCR zone inherits the attributes of the parent user zone.
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
RECERR kRecSetZoneAttribute(IntPtr hPage, int nZone, string key, string value);
kRecSetZoneAttribute
RECERR RECAPIKRN kRecSetZoneAttribute(HPAGE hPage, int nZone, LPCTSTR key, LPCTSTR value)
Setting user defined attribute of a user zone.
The specification of this function in Java is:
int kRecSetZoneAttribute(HPAGE hPage, int nZone, String key, String value)
The specification of this function in Python is:
def kRecSetZoneAttribute(hPage: "HPAGE", nZone: int, key: str, value: str) -> int

◆ kRecSetZoneBarTypes()

RECERR RECAPIKRN kRecSetZoneBarTypes | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPCBAR_ENA | pBarEna,
 |  | INTBOOL | BarBinary )

Enabling barcode types for a zone.

The kRecSetZoneBarTypes function is used to specify the enabled barcode type(s) for the given zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[in] | pBarEna | Pointer of a BAR_ENA type array having BAR_SIZE elements. Each element of this array variable corresponds to a BAR_TYPE barcode type, and their values represent the enabled/disabled status of the appropriate barcode type. It can be NULL pointer.
[in] | BarBinary | TRUE value forces the barcode modules to create binary output without any character conversion. See also Binary output.
Return values
RECERR
Note
The enabled barcode types can be set globally (kRecSetBarTypes) and zone by zone (this function). If pBarEna is NULL or all elements of the pBarEna array are BAR_DISABLED, the global setting will be used for this zone during recognition. This is the default setting of the zones, therefore in default mode the global setting is used for all zones. This function changes the zone-level enabled barcode types.
Not all barcode types are compatible. To check the barcode type combination you wish to enable, use the kRecCheckBarTypes function. See that function also for the list of incompatible barcode type combinations.
See also the module BAR.
The specification of this function in C# is:
RECERR kRecSetZoneBarTypes(IntPtr hPage, int nZone, [In] BAR_ENA[] pBarEna, bool BarBinary);
kRecSetZoneBarTypes
RECERR RECAPIKRN kRecSetZoneBarTypes(HPAGE hPage, int nZone, LPCBAR_ENA pBarEna, INTBOOL BarBinary)
Enabling barcode types for a zone.
The specification of this function in Java is:
int kRecSetZoneBarTypes(HPAGE hPage, int nZone, int[] pBarEna, int BarBinary)
The specification of this function in Python is:
def kRecSetZoneBarTypes(hPage: "HPAGE", nZone: int, pBarEna: Optional["IntArray"], BarBinary: bool) -> int

◆ kRecSetZoneFormFieldName()

RECERR RECAPIKRN kRecSetZoneFormFieldName | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPCWSTR | pFormFieldName )

Changing the name of a form-field attached to a user-zone.

The kRecSetZoneFormFieldName changes the name of a user-zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Index of the user-zone to be updated.
[in] | pFormFieldName | Pointer to a 16-bit UNICODE string containing the name characters to be set. (The string is terminated with a wide-character zero.)
Return values
RECERR
Note
This function is deprecated, use kRecSetZoneName instead.
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
RECERR kRecSetZoneFormFieldName(IntPtr hPage, int nZone, string pFormFieldName);
kRecSetZoneFormFieldName
RECERR RECAPIKRN kRecSetZoneFormFieldName(HPAGE hPage, int nZone, LPCWSTR pFormFieldName)
Changing the name of a form-field attached to a user-zone.
The specification of this function in Java is:
int kRecSetZoneFormFieldName(HPAGE hPage, int nZone, String pFormFieldName)
The specification of this function in Python is:
def kRecSetZoneFormFieldName(hPage: "HPAGE", nZone: int, pFormFieldName: str) -> int

◆ kRecSetZoneName()

RECERR RECAPIKRN kRecSetZoneName | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | LPCTSTR | pZoneName )

Changing the name of a user-zone.

The kRecSetZoneName changes the name of a user-zone.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Index of the user-zone to be updated.
[in] | pZoneName | Pointer to a string containing the name characters to be set. (The string is terminated with a null character.)
Return values
RECERR
Note
The zones can have a name. More zones can have the same name. When the OCR zones are created by the Engine, they inherit the name of the parent user zone.
The index of the first zone in the zone list is zero (0).
The specification of this function in C# is:
RECERR kRecSetZoneName(IntPtr hPage, int nZone, string pZoneName);
kRecSetZoneName
RECERR RECAPIKRN kRecSetZoneName(HPAGE hPage, int nZone, LPCTSTR pZoneName)
Changing the name of a user-zone.
The specification of this function in Java is:
int kRecSetZoneName(HPAGE hPage, int nZone, String pZoneName)
The specification of this function in Python is:
def kRecSetZoneName(hPage: "HPAGE", nZone: int, pZoneName: str) -> int

◆ kRecSetZoneOrder()

RECERR RECAPIKRN kRecSetZoneOrder | ( | HPAGE | hPage,
 |  | const int * | order )

Changing the order of the user zones.

The kRecSetZoneOrder changes the order of the user zones in a HPAGE.

Parameters
[in] | hPage | Handle of the page.
[in] | order | An array containing key values. The array must contain as many elements as the number of zones included in the user zone list.
Return values
RECERR
Note
The function uses the given array as keys. The zones are sorted in ascending order of the given keys.
The specification of this function in C# is:
RECERR kRecSetZoneOrder(IntPtr hPage, int[] order);
kRecSetZoneOrder
RECERR RECAPIKRN kRecSetZoneOrder(HPAGE hPage, const int *order)
Changing the order of the user zones.
The specification of this function in Java is:
int kRecSetZoneOrder(HPAGE hPage, int[] order)
The specification of this function in Python is:
def kRecSetZoneOrder(hPage: "HPAGE", order: "IntArray") -> int

◆ kRecSetZoneRefAnchors()

RECERR RECAPIKRN kRecSetZoneRefAnchors | ( | HPAGE | hPage,
 |  | int | nZone,
 |  | REF_ANCHOR_MODE | mode,
 |  | const int * | refAnchors )

Setting the reference anchor(s) of the zone.

The kRecSetZoneRefAnchors sets the reference anchor(s) of the zone. It can be used during the template definition step.

Parameters
[in] | hPage | Handle of the page.
[in] | nZone | Zone index.
[in] | mode | Specifies the number of reference anchors.
[in] | refAnchors | The index(es) of the reference anchors. 0, 1, 2 or 4 indexes depending on the mode parameter.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecSetZoneRefAnchors(IntPtr hPage, int nZone, [In] int[] refAnchors);
kRecSetZoneRefAnchors
RECERR RECAPIKRN kRecSetZoneRefAnchors(HPAGE hPage, int nZone, REF_ANCHOR_MODE mode, const int *refAnchors)
Setting the reference anchor(s) of the zone.
The specification of this function in Java is:
int kRecSetZoneRefAnchors(HPAGE hPage, int nZone, REF_ANCHOR_MODE mode, int[] refAnchors)
The specification of this function in Python is:
def kRecSetZoneRefAnchors(hPage: "HPAGE", nZone: int, mode: int, refAnchors: "IntArray") -> int

◆ kRecUpdateAnchorZone()

RECERR RECAPIKRN kRecUpdateAnchorZone | ( | int | sid,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPCRECT | pRect,
 |  | int | nZone )

Updating anchor zone info.

The kRecUpdateAnchorZone updates the bounding box and the value (text value or bitmap) of the anchor zone. It can be used during the template definition step.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page.
[in] | iiImg | The index of the image whose coordinate system you used in defining the bounding rectangle of the zone.
[in] | pRect | Coordinates of the anchor zone.
[in] | nZone | Index of the zone to be updated in the user zone list.
Return values
RECERR
Note
The index of the first zone in the zone list is zero (0).
If the anchor zone is bitmap anchor, the bitmap attached to the zone is updated. If the anchor zone is text or barcode anchor, kRecUpdateAnchorZone performs recognition inside the given rectangle, and updates the text value of the anchor. The bounding box of the anchor is fitted to the text (or barcode).
The specification of this function in C# is:
RECERR kRecUpdateAnchorZone(int sid, IntPtr hPage, IMAGEINDEX iiImg, RECT pRect, int nZone);
kRecUpdateAnchorZone
RECERR RECAPIKRN kRecUpdateAnchorZone(int sid, HPAGE hPage, IMAGEINDEX iiImg, LPCRECT pRect, int nZone)
Updating anchor zone info.
The specification of this function in Java is:
int kRecUpdateAnchorZone(int sid, HPAGE hPage, IMAGEINDEX iiImg, RECT pRect, int nZone)
The specification of this function in Python is:
def kRecUpdateAnchorZone(sid: int, hPage: "HPAGE", iiImg: int, pRect: "RECT", nZone: int) -> int


RecAPI: COMB_CELL_INFO Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
COMB_CELL_INFO Struct Reference
KernelAPI » Form Recognition Module

Structure of a comb-cell in a comb. More...

#include <KernelApi.h>

Public Attributes

int | left
int | right

Detailed Description

Structure of a comb-cell in a comb.

It is used by comb handling functions (see also kRecCreateCombInfo)

Member Data Documentation

◆ left

int COMB_CELL_INFO::left

the x-coordinate of the comb-cell's left edge (raster coordinate)

◆ right

int COMB_CELL_INFO::right

the x-coordinate of the comb-cell's right edge (raster coordinate)


RecAPI: Recognition Module

Topics | Classes | Typedefs | Enumerations | Functions
Recognition Module
KernelAPI

Performing Optical Character Recognition. More...

Topics

Recognition Engines having own functions
There are some recognition engines having one or more own functions or types.

Classes

struct | STATISTIC
Recognition statistics. More...
struct | _RPPERRORS
Error list item. More...

Typedefs

typedef STATISTIC * | LPSTATISTIC
Pointer type to a STATISTIC type variable.
typedef INTBOOL RECKRNCALL | ONETOUCH_CB(INTBOOL bMore, void *pContext, LPCTSTR *notused)
The user-written "One-touch" callback function.
typedef ONETOUCH_CB * | LPONETOUCH_CB
Pointer to a ONETOUCH_CB callback function.
typedef struct _RPPERRORS | RPPERRORS
Error list item.

Enumerations

enum RMTRADEOFF {
TO_ACCURATE ,
TO_BALANCED ,
TO_FAST
}
Trade-off setting. More...
enum PDF_REC_MODE {
PDF_RM_ALWAYSRECOGNIZE ,
PDF_RM_MOSTLYGETTEXT ,
PDF_RM_ALWAYSGETTEXT
}
PDF recognition mode. More...
enum PDF_PROC_MODE {
PDF_PM_AUTO ,
PDF_PM_NORMAL ,
PDF_PM_GRAPHICS_ONLY ,
PDF_PM_TEXT_ONLY ,
PDF_PM_TEXT_ONLY_EXT ,
PDF_PM_AS_IMAGE
}
PDF processing mode. More...

Functions

RECERR RECAPIKRN | kRecSetRMTradeoff (int sid, RMTRADEOFF Tradeoff)
Changing trade-off setting.
RECERR RECAPIKRN | kRecGetRMTradeoff (int sid, RMTRADEOFF *pTradeoff)
Getting trade-off setting.
RECERR RECAPIKRN | kRecSetDefaultFillingMethod (int sid, FILLINGMETHOD type)
Changing default filling method.
RECERR RECAPIKRN | kRecGetDefaultFillingMethod (int sid, FILLINGMETHOD *ptype)
Getting default filling method.
RECERR RECAPIKRN | kRecSetDefaultRecognitionModule (int sid, RECOGNITIONMODULE rm)
Changing the default recognition module.
RECERR RECAPIKRN | kRecGetDefaultRecognitionModule (int sid, RECOGNITIONMODULE *rm)
Getting the default recognition module.
RECERR RECAPIKRN | kRecSetTrainingFileName (int sid, LPCTSTR pFileName)
Setting the training file.
RECERR RECAPIKRN | kRecGetTrainingFileName (int sid, LPTSTR pFileName, size_t iSize)
Getting the name of the training file.
RECERR RECAPIKRN | kRecRecognize (int sid, HPAGE hPage, LPCTSTR pFilename)
Recognizing a page.
RECERR RECAPIKRN | kRecProcessPages (int sid, LPCTSTR pDocFile, LPCTSTR *pImageFiles, LPONETOUCH_CB pCallback, void *pContext, LPCTSTR pTemplate)
Process multiple pages and convert them to a single document.
RECERR RECAPIKRN | kRecProcessPagesEx (int sid, LPCTSTR pDocFile, LPCTSTR *pImageFiles, LPONETOUCH_CB pCallback, void *pContext, LPCTSTR pTemplate)
Process multiple pages and convert them to a single document using multiple recognition threads.
RECERR RECAPIKRN | kRecGetRPPErrorList (RPPERRORS **rppErrs)
Getting errors from last kRecProcessPagesEx.
RECERR RECAPIKRN | kRecGetStatistics (int sid, LPSTATISTIC pStat)
Getting statistics about processing.

Detailed Description

Performing Optical Character Recognition.

The Engine can load several recognition engines. The User License determines which ones are available. Select which available engine to run in a given ZONE. According to your choice, the application is able to perform "multi-module" recognition on any image.

The enum RECOGNITIONMODULE lists recognition modules. These are tightly integrated to the Engine.

  • PLUS3W omnifont module for machine-printed text (most accurate) (supported on: Windows, Linux, MacOS),
  • PLUS2W omnifont module for machine-printed text,
  • MTX omnifont module for machine-printed text (supported on: Windows),
  • MOR multi-language omnifont module for machine-printed text (supported on: Windows, Linux and MacOS x64),
  • FRX multi-language omnifont module for machine-printed text,
  • HNR module for handprinted digits (supported on: Windows),
  • RER module for handprinted alphanumeric characters (supported on: Windows, Linux and MacOS x64),
  • DOT module for 9-pin draft dot-matrix printouts (supported on: Windows),
  • OMR module for optical marks (checkmarks),
  • MAT matrix matching module (supported on: Windows),
  • BAR module for barcodes,
  • Asian recognition module for CCJK languages,
  • Arabic recognition module for Arabic languages.
Note
The RER recognition module is third-party component.

You can set an additional RECOGNITIONMODULE value: RM_AUTO. If you set this, the Engine will choose the module that is most likely to be appropriate. The decision of the Engine is primarily based on the filling method set for the zone.

The filling method describes the type of data expected in the zone, e.g. a barcode, handprinted or machine generated text. A certain degree of auto-detection is available for setting the filling method: see the Detection of filling method of zones section. You might find this particularly useful when you cannot be sure in advance precisely what filling method to use on the incoming documents. It is essential to specify a valid recognition module-filling method pair. Any incorrectly set zone will have no recognition result. Some filling methods can be linked successfully with one and only one recognition module (e.g. FM_OMR with RM_OMR). Other recognition modules support more than one filling method, and some filling methods are accepted by more than one recognition module. For example, if you work with a medium quality, 9-pin dot-matrix text, either the RM_DOT or one of the omnifont modules could give better results. On a medium quality, 24-pin dot-matrix text, try RM_OMNIFONT_MOR with FM_DRAFTDOT24 and FM_OMNIFONT.

For details on the above and recognition engines see OCR Engines.

RM_AUTO reads the filling method of the zone; if only one recognition module is suitable, that one is used. When there is a choice of recognition modules, RM_AUTO uses various checks (character set, image size, etc.) to select the best one. This way, it prevents an invalid Filling method - Recognition module pair.

If the recognition module is not present when it is needed, the recognition function (kRecRecognize) returns with API_MODULEMISSING_ERR, and there will be no recognized data for the zone in question. To avoid this, call kRecGetModulesInfo just after Engine initialization. This will check the presence and correct installation of the necessary recognition modules.

The working of the Recognition Modules can be adjusted with settings in some points.

PDF recognition

PDF files can be separated into two basic classes: image-only PDF and normal PDF. Recognition of image-only PDF is exactly the same as that of any other image format. The normal PDF contains both image and text data. This textual information can be retrieved from the file and used as an aid to the recognition.

In general, the text residing in a PDF file is reliable, thus even a less accurate OCR result combined with this text may be enough to achieve good accuracy. When performing this, the User can adjust the PDF trade-off setting (Kernel.OcrMgr.PDF.TradeOff). Furthermore, the User can specify the mode for handling the text located in a PDF file (PDF_REC_MODE).

The textual information divides the page into graphic and text areas. The User can select which one should be recognized during the OCR process (PDF_PROC_MODE).

Typedef Documentation

◆ ONETOUCH_CB

typedef INTBOOL RECKRNCALL ONETOUCH_CB(INTBOOL bMore, void *pContext, LPCTSTR *notused)

The user-written "One-touch" callback function.

It allows user intervention in the "One-touch" processing functions. This user-written function is called by the Engine after each processed page, either by the kRecProcessPages or by the kRecScanPages functions (furthermore by RecAPIPlus function RecProcessPagesEx).

Parameters
[in] | bMore | After processing each page, the Engine calls this function with this parameter indicating whether there are further pages to be processed (i.e. whether or not an ADF still has paper, or whether or not there are further pages in a multi-page image file).
[in] | pContext | User data passed to the callback function by the Engine. The data to be passed can be set with kRecSetCBProgMon.
[out] | notused | Not used.
Return values
TRUE | The Engine is to continue with the next page.
FALSE | The Engine is to abort processing pages.
Note
This function is integrator-written and it should get user information whether they would like to continue processing with further pages.
The callback function is not to contain calls to any KERNELAPI functions.

◆ RPPERRORS

typedef struct _RPPERRORS RPPERRORS

Error list item.

This struct contains an item of the error list retrieved by kRecGetRPPErrorList or RecGetRPPErrorList.

Enumeration Type Documentation

◆ PDF_PROC_MODE

enum PDF_PROC_MODE

PDF processing mode.

This setting specifies the processing mode of graphic and text areas of PDF files. See PDF recognition for details. See the setting Kernel.OcrMgr.PDF.ProcessingMode.

Note
If the value of this setting differs from the default value, kRecPreprocessImg should be called.
In PDF files there may be invisible text areas (e.g. white text on white background, text under an image, etc.). These areas typically contain information only for searching. The content of these areas can appear in the OCR result, when PDF processing mode is PDF_PM_TEXT_ONLY_EXT.
PDF_PM_AS_IMAGE and IMF_PDF_AS_IMAGE mode of IMF PDF load flags are different. Both are slower than normal PDF mode and both process the PDF file as an image. However in PDF_PM_AS_IMAGE mode recognition combines the text information coming from the PDF with the raw result of the OCR process.
Enumerator
PDF_PM_AUTO | Checks textual information. If it is header- and/or footer-like, both text and graphic areas are recognized in PDF_PM_AS_IMAGE mode. Otherwise, this is equivalent to PDF_PM_NORMAL. (Default)
PDF_PM_NORMAL | Only the text areas are recognized, if they exist. Otherwise the full page is recognized in image mode.
PDF_PM_GRAPHICS_ONLY | Only the graphic areas are recognized.
PDF_PM_TEXT_ONLY | Only the text areas are recognized.
PDF_PM_TEXT_ONLY_EXT | Only the text areas with invisible text areas are recognized.
PDF_PM_AS_IMAGE | Recognize the full page (both of text & graphics areas). Be warned that this mode is slower than PDF_PM_AUTO. See notes above.

◆ PDF_REC_MODE

enum PDF_REC_MODE

PDF recognition mode.

This setting specifies the usage of text data coming from normal PDF files (non-image-only PDF). See PDF recognition for details. See the setting Kernel.OcrMgr.PDF.RecognitionMode.

Enumerator
PDF_RM_ALWAYSRECOGNIZE | Combines the characters from the OCR result with the PDF text. (Default)
PDF_RM_MOSTLYGETTEXT | Same as ALWAYSGETTEXT mode unless a font character coding problem is detected in a PDF page; then it is equal to ALWAYSRECOGNIZE mode.
PDF_RM_ALWAYSGETTEXT | Uses the PDF text, relying on the OCR result only to determine the spaces between words (fastest).

◆ RMTRADEOFF

enum RMTRADEOFF

Trade-off setting.

This specifies the possible Engine trade-off settings to be applied during the recognition at page level. This setting has a trade-off influence between the accuracy and the speed of recognition. The precise influence depends on the recognition module used. This setting may also influence which auto-zoning and pre-process algorithm will be applied.

Note
The value of the setting Kernel.OcrMgr.TradeOff can be set by calling kRecSetRMTradeoff
This setting does not select from among the different recognition engines, just modifies the functioning of the current engine. Use the Kernel.OcrMgr.PreferAccurateEngine and Kernel.OcrMgr.PreferFastEngine settings to use a different engine depending on your needs. See the description of performance settings for details.
Pre-process (kRecPreprocessImg) specific notes:
  • If resolution enhancement is set to RE_AUTO the enhancement depends on the current trade-off setting according to the following: if trade-off is TO_FAST the resolution enhancement is RE_LEGACY, otherwise it is RE_STANDARD.
  • If trade-off is TO_FAST pre-process uses a faster, but less accurate deskew, binarization, and despeckle algorithm than otherwise.
When the Page parser algorithm settings of the Engine is set to DCM_AUTO and both parsers are available in the Engine configuration, the Engine trade-off setting determines which page parser algorithm is applied (IMG_DECOMP).
If User wants trade-off to affect only on recognition, it can be set after calling kRecPreprocessImg and kRecLocateZones. However there may be cases, when this is impossible. For example, when kRecLocateZones is not called, or when a one-step function is called (e.g. kRecProcessPages or RecProcessPagesEx). In such a case, setting Kernel.OcrMgr.TradeOff.PreProc to TO_ACCURATE and Kernel.Decomp.Method to DCM_STANDARD will ensure preprocess and zoning to run in default independently from the value of trade-off.
Any of these three settings can always be specified, however, for some recognition modules these are mapped internally into two values.
Recognition module specific notes:
  • The modules MTX, DOT, HNR and the FAST mode of PLUS2W and PLUS3W are supported on: Windows, PLUS3W is supported on: Windows, Linux, MacOS, RER is supported on: Windows, Linux and MacOS x64.
  • RM_OMNIFONT_MOR (supported on: Windows, Linux and MacOS x64): Depending on this setting, either a one-pass, a two-pass or a two-pass with ACA (Adaptive Cell Analysis) recognition algorithm is used. Recognition accuracy may also be affected by the use (and settings) of the checking module. The combinations of these two settings result in five different speed/accuracy user choices.
    • Two-pass with Adaptive Cell Analysis with spelling. TO_ACCURATE with checking module enabled.
    • Two-pass with spelling. TO_BALANCED with checking module enabled.
    • Two-pass. TO_BALANCED with checking disabled.
    • Single-pass with spelling. TO_FAST with checking module enabled.
    • Single-pass. TO_FAST with checking disabled.
  • RM_OMNIFONT_MTX : This recognition module has a two-value trade-off setting: internally the TO_ACCURATE and TO_BALANCED are mapped to the same setting.
  • RM_HNR : This recognition module has a two-value trade-off setting: internally the TO_ACCURATE and TO_BALANCED are mapped to the same setting. The TO_ACCURATE means fewer mis-recognized characters, but maybe more rejected ones.
  • RM_ASIAN : see the section CCJK trade-off for more information.
  • RM_ARABIC : see the section Arabic trade-off for more information.
  • All remaining recognition modules: These do not interpret this TRADEOFF setting.
See the settings Kernel.OcrMgr.TradeOff, Kernel.OcrMgr.TradeOff.PreProc and Kernel.OcrMgr.PDF.TradeOff.
Enumerator
TO_ACCURATE | Most accurate recognition (Default).
TO_BALANCED | Mid-level accuracy/speed recognition.
TO_FAST | Fast recognition.

Function Documentation

◆ kRecGetDefaultFillingMethod()

RECERR RECAPIKRN kRecGetDefaultFillingMethod | ( | int | sid,
 |  | FILLINGMETHOD * | ptype )

Getting default filling method.

The kRecGetDefaultFillingMethod function gets the default filling method setting.

Parameters
[in] | sid | Settings Collection ID.
[out] | ptype | Address of a variable to get the default filling method setting.
Return values
RECERR
Note
This function gets the value of the setting Kernel.OcrMgr.DefaultFillingMethod. This setting can be changed by kRecSetDefaultFillingMethod.
The specification of this function in C# is:
RECERR kRecGetDefaultFillingMethod(int sid, out FILLINGMETHOD type);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecGetDefaultFillingMethod
RECERR RECAPIKRN kRecGetDefaultFillingMethod(int sid, FILLINGMETHOD *ptype)
Getting default filling method.
FILLINGMETHOD
FILLINGMETHOD
Filling methods.
Definition KernelApi.h:552
The specification of this function in Java is:
int kRecGetDefaultFillingMethod(int sid, FILLINGMETHOD[] ptype)
The specification of this function in Python is:
def kRecGetDefaultFillingMethod(sid: int) -> Tuple[int, int]

◆ kRecGetDefaultRecognitionModule()

RECERR RECAPIKRN kRecGetDefaultRecognitionModule | ( | int | sid,
 |  | RECOGNITIONMODULE * | rm )

Getting the default recognition module.

The kRecGetDefaultRecognitionModule function retrieves the default recognition module setting.

Parameters
[in] | sid | Settings Collection ID.
[in] | rm | Pointer of a variable to store the default recognition module.
Return values
RECERR
Note
This function gets the value of the setting Kernel.OcrMgr.DefaultRecognitionModule. This setting can be changed by kRecSetDefaultRecognitionModule.
The specification of this function in C# is:
RECERR kRecGetDefaultRecognitionModule(int sid, out RECOGNITIONMODULE rm);
kRecGetDefaultRecognitionModule
RECERR RECAPIKRN kRecGetDefaultRecognitionModule(int sid, RECOGNITIONMODULE *rm)
Getting the default recognition module.
RECOGNITIONMODULE
RECOGNITIONMODULE
Recognition modules (Engines)
Definition KernelApi.h:605
The specification of this function in Java is:
int kRecGetDefaultRecognitionModule(int sid, RECOGNITIONMODULE[] rm)
The specification of this function in Python is:
def kRecGetDefaultRecognitionModule(sid: int) -> Tuple[int, int]

◆ kRecGetRMTradeoff()

RECERR RECAPIKRN kRecGetRMTradeoff | ( | int | sid,
 |  | RMTRADEOFF * | pTradeoff )

Getting trade-off setting.

The kRecGetRMTradeoff function provides the current recognition algorithm trade-off setting. See kRecSetRMTradeoff.

Parameters
[in] | sid | Settings Collection ID.
[out] | pTradeoff | Pointer of a variable to get the current recognition algorithm trade-off setting.
Return values
RECERR
Note
This function gets the value of the setting Kernel.OcrMgr.TradeOff. This setting can be changed by kRecSetRMTradeoff.
The specification of this function in C# is:
RECERR kRecGetRMTradeoff(int sid, out RMTRADEOFF Tradeoff);
kRecGetRMTradeoff
RECERR RECAPIKRN kRecGetRMTradeoff(int sid, RMTRADEOFF *pTradeoff)
Getting trade-off setting.
RMTRADEOFF
RMTRADEOFF
Trade-off setting.
Definition KernelApi.h:8672
The specification of this function in Java is:
int kRecGetRMTradeoff(int sid, RMTRADEOFF[] pTradeoff)
The specification of this function in Python is:
def kRecGetRMTradeoff(sid: int) -> Tuple[int, int]

◆ kRecGetRPPErrorList()

RECERR RECAPIKRN kRecGetRPPErrorList ( RPPERRORS ** rppErrs )

Getting errors from last kRecProcessPagesEx.

The kRecGetRPPErrorList function returns the error list of last kRecProcessPages or kRecProcessPagesEx call.

Parameters
[out] rppErrs Pointer of a variable to store a pointer of an internal array. This array contains data for the errors that happened.
Return values
RECERR
Note
RPPERRORS *rppErrs;
kRecGetRPPErrorList(&rppErrs);
while (rppErrs != NULL)
{
LPCSTR p = NULL;
kRecGetErrorInfo(rppErrs->rc, &p);
printf("RC:%d/%s, obj:%S - page:%d\n", rppErrs->rc, p, rppErrs->obj, rppErrs->page);
rppErrs = rppErrs->next;
}
kRecGetErrorInfo
RETCODEINFO RECAPIKRN kRecGetErrorInfo(RECERR ErrCode, LPCSTR *lpErrSym)
Getting additional information about an error.
kRecGetRPPErrorList
RECERR RECAPIKRN kRecGetRPPErrorList(RPPERRORS **rppErrs)
Getting errors from last kRecProcessPagesEx.
_RPPERRORS
Error list item.
Definition KernelApi.h:9900
_RPPERRORS::obj
LPWSTR obj
Definition KernelApi.h:9903
_RPPERRORS::next
struct _RPPERRORS * next
Definition KernelApi.h:9904
_RPPERRORS::page
int page
Definition KernelApi.h:9902
_RPPERRORS::rc
RECERR rc
Definition KernelApi.h:9901
The specification of this function in C# is:
RECERR kRecGetRPPErrorList(out RPPERROR[] rppErrs);
The specification of this function in Java is:
int kRecGetRPPErrorList(RPPErrorsArray ppErrors)
The specification of this function in Python is:
def kRecGetRPPErrorList() -> Tuple[int, "RPPErrorsArray"]

◆ kRecGetStatistics()

RECERR RECAPIKRN kRecGetStatistics | ( | int | sid,
 |  | LPSTATISTIC | pStat )

Getting statistics about processing.

The kRecGetStatistics function returns information about the accuracy and timing data of the latest recognition process in a structure STATISTIC.

Parameters
[in] | sid | Settings Collection ID.
[out] | pStat | Address of a structure to hold the statistical information.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetStatistics(int sid, out STATISTIC pStat);
kRecGetStatistics
RECERR RECAPIKRN kRecGetStatistics(int sid, LPSTATISTIC pStat)
Getting statistics about processing.
STATISTIC
Recognition statistics.
Definition KernelApi.h:651
The specification of this function in Java is:
int kRecGetStatistics(int sid, STATISTIC pStat)
The specification of this function in Python is:
def kRecGetStatistics(sid: int) -> Tuple[int, "STATISTIC"]

◆ kRecGetTrainingFileName()

RECERR RECAPIKRN kRecGetTrainingFileName | ( | int | sid,
 |  | LPTSTR | pFileName,
 |  | size_t | iSize )

Getting the name of the training file.

The kRecGetTrainingFileName function gets the current training file name setting.

Parameters
[in] | sid | Settings Collection ID.
[out] | pFileName | Pointer of a buffer where the training file name setting will be copied to.
[in] | iSize | Character count of the buffer. The buffer must be large enough to hold all the characters and a terminating zero.
Return values
RECERR
Note
Training of recognition modules is supported on: Windows, Linux.
Call this function to see whether there is currently a training file in use and what its name is. If this call returns an empty string it means that no training file has been selected.
This function gets the value of the setting Kernel.OcrMgr.Training.FileName.
The specification of this function in C# is:
RECERR kRecGetTrainingFileName(int sid, out string fileName);
kRecGetTrainingFileName
RECERR RECAPIKRN kRecGetTrainingFileName(int sid, LPTSTR pFileName, size_t iSize)
Getting the name of the training file.
The specification of this function in Java is:
int kRecGetTrainingFileName(int sid, String[] pFileName)
The specification of this function in Python is:
def kRecGetTrainingFileName(sid: int) -> Tuple[int, str]

◆ kRecProcessPages()

RECERR RECAPIKRN kRecProcessPages | ( | int | sid,
 |  | LPCTSTR | pDocFile,
 |  | LPCTSTR * | pImageFiles,
 |  | LPONETOUCH_CB | pCallback,
 |  | void * | pContext,
 |  | LPCTSTR | pTemplate )

Process multiple pages and convert them to a single document.

This function performs recognition on more than one image file using the Direct TXT output converter to export the results in one common document. If there is more than one page in the specified image file or there are more image files, export can be done only to appendable DirectTXT formats (DTXTOUTPUTFORMATS).

Parameters
[in] | sid | Settings Collection ID.
[in] | pDocFile | Full path of the output document file.
[in] | pImageFiles | This is the pointer of an array of full paths of the input files. If this is NULL the input is a scanner. The latest path must be a NULL pointer indicating the end of the input list.
[in] | pCallback | Callback function's pointer, which is called after each page. Can be NULL.
[in] | pContext | Context value for passing to the callback function. Can be NULL.
[in] | pTemplate | Full path of a zone file to be loaded before recognition of each image.
Return values
RECERR
Note
See details about size limits of input images.
There are two special return values at this function: API_ERRORS_HAPPENED_WARN and API_WARNINGS_HAPPENED_WARN. These warnings signal that there are errors or warnings that happened during the kRecProcessPages call, but some of the pages have been processed correctly. The program can query the complete list of errors that occurred using kRecGetRPPErrorList.
If the input is a scanner, multi-page scanning can be performed in two ways. If the scanner has an ADF, it loads the pages until the ADF is empty. Otherwise, a ONETOUCH_CB is required.
The specification of this function in C# is:
RECERR kRecProcessPages(int sid, string pDocFile, string[] pImageFiles, ONETOUCH_CB callback, string pTemplate);
kRecProcessPages
RECERR RECAPIKRN kRecProcessPages(int sid, LPCTSTR pDocFile, LPCTSTR *pImageFiles, LPONETOUCH_CB pCallback, void *pContext, LPCTSTR pTemplate)
Process multiple pages and convert them to a single document.
ONETOUCH_CB
INTBOOL RECKRNCALL ONETOUCH_CB(INTBOOL bMore, void *pContext, LPCTSTR *notused)
The user-written "One-touch" callback function.
Definition KernelApi.h:929
The latest item of pImageFiles is not needed to be NULL in C#.
The specification of this function in Java is:
int kRecProcessPages(int sid, String pDocFile, String[] pImageFiles, OneTouchCallback pCallback, String pTemplate)
The specification of this function in Python is:
def kRecProcessPages(sid: int, pDocFile: str, pImageFiles: List[str], pCallback: Optional["OneTouchCallback"], pTemplate: Optional[str]) -> int

◆ kRecProcessPagesEx()

RECERR RECAPIKRN kRecProcessPagesEx | ( | int | sid,
 |  | LPCTSTR | pDocFile,
 |  | LPCTSTR * | pImageFiles,
 |  | LPONETOUCH_CB | pCallback,
 |  | void * | pContext,
 |  | LPCTSTR | pTemplate )

Process multiple pages and convert them to a single document using multiple recognition threads.

This function performs recognition on more than one image file using the Direct TXT output converter module to export the results in one common document. If there is more than one page in the specified image file or there are more image files, export can be done only to appendable DirectTXT formats (DTXTOUTPUTFORMATS).

Parameters
[in] | sid | Settings Collection ID.
[in] pDocFile Full path of the output document file or output folder. By default, the function appends all processed page to one output file specified in pDocFile parameter. Set the setting Kernel.RPP.OutputFileName to 1, if multiple output files are intended to create for each input in the given folder. The folder must exist. When the pDocFile parameter specifies only a path, ending path separator must be there.
HSETTING hOF = NULL;
kRecSettingGetHandle(NULL, "Kernel.RPP.OutputFileName", &hOF, NULL);
kRecSettingSetInt(0, hOF, 1);
kRecSettingGetHandle
RECERR RSTSAPI kRecSettingGetHandle(HSETTING root_of_query, const char *symb_name, HSETTING *ret_handle, INTBOOL *has_setting)
Getting the handle of a node.
kRecSettingSetInt
RECERR RSTSAPI kRecSettingSetInt(int sid, HSETTING sett, int new_value)
Setting the value of an STS_INT or STS_ENUM or STS_BOOL setting.
HSETTING
struct RECSTSSTRUCT * HSETTING
Handle of a setting.
Definition KrnStsApi.h:287
[in] | pImageFiles | This is the array pointer of the input files' full paths. If this is NULL the input is a scanner. The latest path must be a NULL pointer indicating the end of the input list.
[in] | pCallback | Callback function's pointer, called after each page. Can be NULL.
[in] | pContext | Context value for passing to the callback function. Can be NULL.
[in] | pTemplate | Full path of a zone file to be loaded before recognition of each image. Can be NULL.
Return values
RECERR
Note
Multi-threading is supported on: Windows, Linux only. Thus on other platforms this function performs a sequential workflow.
See details about size limits of input images.
There are two special return values at this function: API_ERRORS_HAPPENED_WARN and API_WARNINGS_HAPPENED_WARN. These warnings signal that there are errors or warnings that happened during the kRecProcessPagesEx call, but some of the pages have been processed correctly. The program can query the complete list of errors that occurred using kRecGetRPPErrorList.
This function does not use the pImageFile parameter of the ONETOUCH_CB callback function at all.
The maximum number of recognition threads started by this function can be specified by the setting Kernel.RPP.RecThreadCount.
The specification of this function in C# is:
RECERR kRecProcessPagesEx(int sid, string pDocFile, string[] pImageFiles, ONETOUCH_CB callback, string pTemplate);
kRecProcessPagesEx
RECERR RECAPIKRN kRecProcessPagesEx(int sid, LPCTSTR pDocFile, LPCTSTR *pImageFiles, LPONETOUCH_CB pCallback, void *pContext, LPCTSTR pTemplate)
Process multiple pages and convert them to a single document using multiple recognition threads.
The specification of this function in Java is:
int kRecProcessPagesEx(int sid, String pDocFile, String[] pImageFiles, OneTouchCallback pCallback, String pTemplate)
The specification of this function in Python is:
def kRecProcessPagesEx(sid: int, pDocFile: str, pImageFiles: List[str], pCallback: "OneTouchCallback", pTemplate: str) -> int

◆ kRecRecognize()

RECERR RECAPIKRN kRecRecognize | ( | int | sid,
 |  | HPAGE | hPage,
 |  | LPCTSTR | pFilename )

Recognizing a page.

The kRecRecognize function performs the recognition task for a page in the engine's authority.

The function utilizes the zone information to activate the appropriate recognition module on every zone. Each recognition module recognizes the image parts assigned to it in the zone list. If the OCR zone list of the page is empty the PID_DECOMPOSITION page-layout decomposition process will be activated automatically in order to create a zone list for the image, before recognition.

The function offers the services of the checking module for either marking suspicious characters and words, or making the recognition result better.

After having recognized all the zones on the page, the function collects the necessary information about the recognized characters into a homogeneous structure, called the recognition result. It is stored in the HPAGE.

The kRecRecognize function may activate one or more of the processes PID_RECOGNITION1, PID_RECOGNITION2, PID_RECOGNITION3 and PID_SPELLING.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Handle of the page to be recognized.
[in] | pFilename | Specifies how the recognition result must be stored. If this is not NULL, it must be a real file name with a full path; the recognition result will be stored in this file.
Return values
RECERR
Note
If the current image is not a B/W one in this page (i.e. it is a gray-scale or a 24-bit color image), then an implicit secondary image conversion step will be performed automatically to convert the image to a B/W one. The parameter for this conversion can be specified through the kRecSetImgBinarizationMode function.
The application can register a callback function for progress indication (kRecSetCBProgMon). The Engine then calls the registered (PROGMON_CB) callback entry point to allow progress monitoring for the application.
The recognition process uses the OCR zones generated by the decomposition process. In addition, it may modify them.
Some important details about filling method detection can be found here.
If the file specified in pFilename does not exist, it will be created, otherwise the newly recognized information is appended to the existing one, if that is an appendable format. For more information about available formats, see kRecConvert2DTXT.
Calling kRecRecognize with a specified filename gives the same result as calling it with NULL and right afterwards calling kRecConvert2DTXT with the same filename.
There are some cases when pFilename should be NULL.
  • We do not want any file output, because we will use kRecGetLetters.
  • We have few pages and we want to convert them together using kRecConvert2DTXT. kRecConvert2DTXT can accept array of HPAGEs. Or we want to do something with the HPAGE between kRecRecognize and kRecConvert2DTXT function calls.
  • There are a newer function kRecConvert2DTXTEx, which has an additional IMAGEINDEX parameter (comparing to the one without 'Ex'). Thus it can affect on the orientation of the pages at creating a PDF file. It is recommended to use NULL pFilename and call kRecConvert2DTXTEx always for creating PDF files.
  • We are using RecAPIPlus and the recognized HPAGE will be inserted an HDOC using RecInsertPage.
When an omnifont recognition module is running during recognition, this function may also apply the training data specified by the kRecSetTrainingFileName function.
The application can retrieve a copy of the recognition data by calling the kRecGetLetters function.
The application can remove the recognition result calling kRecFreeRecognitionData.
If a recognition module is not able to recognize an object (i.e. character, barcode or checkmark etc.), this object will be marked as a rejected one. It becomes marked by a rejection symbol during conversion to the final output document. kRecSetRejectionSymbol can be used to specify the rejection symbol for this.
Since the recognition algorithm may use the services of the checking module, the application should call the kRecSetSpell, kRecSetSpellLanguage, kRecSetUserDictionary and other checking related functions BEFORE calling kRecRecognize.
Checking of recognized zone contents may consist of two facilities (or their combination): a supplied Language dictionary, a user dictionary containing words.
This function can fill the line list of the HPAGE, but not all line occurrences are handled in the same way. See RLINE for more information.
The specification of this function in C# is:
RECERR kRecRecognize(int sid, IntPtr hPage, string filename);
// or when filename is NULL in C/C++
RECERR kRecRecognize(int sid, IntPtr hPage);
kRecRecognize
RECERR RECAPIKRN kRecRecognize(int sid, HPAGE hPage, LPCTSTR pFilename)
Recognizing a page.
The specification of this function in Java is:
int kRecRecognize(int sid, HPAGE hPage, String pFilename)
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
The specification of this function in Python is:
def kRecRecognize(sid: int, hPage: "HPAGE", pFilename: str) -> int

◆ kRecSetDefaultFillingMethod()

RECERR RECAPIKRN kRecSetDefaultFillingMethod | ( | int | sid,
 |  | FILLINGMETHOD | type )

Changing default filling method.

The kRecSetDefaultFillingMethod function specifies the default filling method. The default filling method is applied to all zones on the page with the FM_DEFAULT value in their ZONE::fm field. This substitution of the filling method happens at the beginning of the kRecRecognize calls.

Parameters
[in] | sid | Settings Collection ID.
[in] | type | Default filling method.
Return values
RECERR
Note
Zones with FM_DEFAULT are created either by the page-layout decomposition (auto-zoning) process OR by inserting or updating them with this value.
If this function is not called the default value of this setting is FM_OMNIFONT.
The case when the value of this setting is changed to FM_DEFAULT represents a special situation (i.e. the default filling method is itself "default"). In this case the recognition process starts the automatic zonetype detection algorithm of the Engine (see kRecDetectFillingMethod) in order to determine the filling methods zone by zone.
There is a similar function for specifying a fixed value for the RM_AUTO recognition module kRecSetDefaultRecognitionModule.
This function sets the value of the setting Kernel.OcrMgr.DefaultFillingMethod. This setting can be retrieved by kRecGetDefaultFillingMethod.
The specification of this function in C# is:
RECERR kRecSetDefaultFillingMethod(int sid, FILLINGMETHOD type);
kRecSetDefaultFillingMethod
RECERR RECAPIKRN kRecSetDefaultFillingMethod(int sid, FILLINGMETHOD type)
Changing default filling method.
The specification of this function in Java is:
int kRecSetDefaultFillingMethod(int sid, FILLINGMETHOD type)
The specification of this function in Python is:
def kRecSetDefaultFillingMethod(sid: int, type: int) -> int

◆ kRecSetDefaultRecognitionModule()

RECERR RECAPIKRN kRecSetDefaultRecognitionModule | ( | int | sid,
 |  | RECOGNITIONMODULE | rm )

Changing the default recognition module.

The kRecSetDefaultRecognitionModule function specifies the default recognition module setting. This setting is used to determine the recognition module to be applied for the zones with RM_AUTO in their ZONE::rm field.

Parameters
[in] | sid | Settings Collection ID.
[in] | rm | Default recognition module.
Return values
RECERR
Note
If this function is not called the value of the setting is RM_AUTO.
If the default recognition module is set to RM_AUTO the recognition module for the zone is determined according to its filling method (ZONE::fm, kRecSetDefaultFillingMethod). For FM_OMNIFONT zones RM_OMNIFONT_PLUS3W is used. Note that this is the most accurate recognition module. Use the Kernel.OcrMgr.PreferAccurateEngine and Kernel.OcrMgr.PreferFastEngine settings to use a different default engine depending on your needs. See the description of performance settings for details.
If you set the default recognition module to something different from RM_AUTO, take care to use compatible filling method / recognition module combinations only.
This function has limited support on some platforms. For details see the type RECOGNITIONMODULE.
This function sets the value of the setting Kernel.OcrMgr.DefaultRecognitionModule. This setting can be retrieved by kRecGetDefaultRecognitionModule.
The specification of this function in C# is:
RECERR kRecSetDefaultRecognitionModule(int sid, RECOGNITIONMODULE rm);
kRecSetDefaultRecognitionModule
RECERR RECAPIKRN kRecSetDefaultRecognitionModule(int sid, RECOGNITIONMODULE rm)
Changing the default recognition module.
The specification of this function in Java is:
int kRecSetDefaultRecognitionModule(int sid, RECOGNITIONMODULE rm)
The specification of this function in Python is:
def kRecSetDefaultRecognitionModule(sid: int, rm: int) -> int

◆ kRecSetRMTradeoff()

RECERR RECAPIKRN kRecSetRMTradeoff | ( | int | sid,
 |  | RMTRADEOFF | Tradeoff )

Changing trade-off setting.

The kRecSetRMTradeoff function specifies a trade-off setting to be applied during preprocessing, auto-zoning and recognition. This setting applies to all recognition modules that can interpret a speed-accuracy trade-off setting.

Parameters
[in] | sid | Settings Collection ID.
[in] | Tradeoff | Recognition algorithm trade-off setting to be set.
Return values
RECERR
Note
This setting does not select from among the different recognition engines, just modifies the functioning of the current engine. Use the Kernel.OcrMgr.PreferAccurateEngine and Kernel.OcrMgr.PreferFastEngine settings to use a different engine depending on your needs. See the description of performance settings for details.
Currently the trade-off setting is effective for the following recognition modules:
  • The RM_OMNIFONT_PLUS2W and RM_OMNIFONT_PLUS3W voting recognition modules,
  • The multi-lingual RM_OMNIFONT_MOR omnifont recognition module,
  • The RM_OMNIFONT_MTX omnifont recognition module,
  • The RM_HNR handprinted numeral recognition module,
  • The RM_RER handprinted alpha recognition module.
  • The RM_ASIAN Asian recognition module.
  • The RM_ARABIC Arabic recognition module.
The trade-off setting is also effective for the kRecPreprocessImg and kRecLocateZones functions. This setting does not influence the behaviour of any other RECOGNITIONMODULE. Not all of the above modules interpret the settings in the same way. (See RMTRADEOFF.) (The modules MTX, MAT, HNR, and the FAST mode of PLUS2W and PLUS3W are supported on: Windows, PLUS3W is supported on: Windows, Linux, MacOS, MOR and RER is supported on: Windows, Linux and MacOS x64.)
If this function is not called, the default value, TO_ACCURATE is applied.
This function sets the value of the setting Kernel.OcrMgr.TradeOff. This setting can be retrieved by kRecGetRMTradeoff. Recognizing normal (non-image-only) PDF files, the setting Kernel.OcrMgr.PDF.TradeOff may modify the effect of Kernel.OcrMgr.TradeOff.
The specification of this function in C# is:
RECERR kRecSetRMTradeoff(int sid, RMTRADEOFF Tradeoff);
kRecSetRMTradeoff
RECERR RECAPIKRN kRecSetRMTradeoff(int sid, RMTRADEOFF Tradeoff)
Changing trade-off setting.
The specification of this function in Java is:
int kRecSetRMTradeoff(int sid, RMTRADEOFF Tradeoff)
The specification of this function in Python is:
def kRecSetRMTradeoff(sid: int, Tradeoff: int) -> int

◆ kRecSetTrainingFileName()

RECERR RECAPIKRN kRecSetTrainingFileName | ( | int | sid,
 |  | LPCTSTR | pFileName )

Setting the training file.

The kRecSetTrainingFileName function specifies and loads a training file for the omnifont recognition modules. A training file contains the results of a previous training session, and its use may influence the behavior of these recognition modules.

Parameters
[in] | sid | Settings Collection ID.
[in] | pFileName | Name of the training file, or NULL. The NULL is used for disabling the use of a previously loaded training file.
Return values
RECERR
Note
Training of recognition modules is supported on: Windows, Linux.
This function enables the use of training data stored in a training file. On a document with repeated printing errors or with an unusual typeface some further training can be done to achieve higher accuracy. The result of user-conducted training done with the stand-alone OmniPage Professional can be saved into a training file that can be loaded whenever a similar document is to be processed.
This function modifies the value of the setting Kernel.OcrMgr.Training.FileName.
The specification of this function in C# is:
RECERR kRecSetTrainingFileName(int sid, string pFileName);
kRecSetTrainingFileName
RECERR RECAPIKRN kRecSetTrainingFileName(int sid, LPCTSTR pFileName)
Setting the training file.
The specification of this function in Java is:
int kRecSetTrainingFileName(int sid, String pFileName)
The specification of this function in Python is:
def kRecSetTrainingFileName(sid: int, pFileName: str) -> int


RecAPI: Recognition Engines having own functions

Topics
Recognition Engines having own functions
KernelAPI » Recognition Module

There are some recognition engines having one or more own functions or types. More...

Topics

BAR Recognition Engine Module
Barcode recognition module.
HNR Recognition Engine Module
Handprinted numeral recognition module. This module is supported on: Windows.
MOR Recognition Engine Module
MOR multi-lingual omnifont recognition module.
OMR Recognition Engine Module
OMR optical mark recognition module.

Detailed Description

There are some recognition engines having one or more own functions or types.

The following recognition engines are available in CSDK

  • PLUS3W omnifont module for machine-printed text (most accurate) (supported on: Windows, Linux, MacOS),
  • PLUS2W omnifont module for machine-printed text,
  • MTX omnifont module for machine-printed text (supported on: Windows),
  • MOR multi-language omnifont module for machine-printed text (supported on: Windows, Linux and MacOS x64),
  • FRX multi-language omnifont module for machine-printed text,
  • HNR module for handprinted digits (supported on: Windows),
  • RER module for handprinted alphanumerical characters (supported on: Windows, Linux and MacOS x64),
  • DOT module for 9-pin draft dot-matrix printouts (supported on: Windows),
  • OMR module for optical marks (checkmarks),
  • MAT matrix matching module (supported on: Windows),
  • BAR module for barcodes,
  • Asian recognition module for CCJK languages,
  • Arabic recognition module for Arabic languages.

There are some recognition engines having one or more own functions or types. Their documentations are separated into submodules:

  • BAR Recognition Engine Module,
  • HNR Recognition Engine Module,
  • MOR Recognition Engine Module,
  • OMR Recognition Engine Module.


RecAPI: BAR Recognition Engine Module

Classes | Typedefs | Enumerations | Functions
BAR Recognition Engine Module
KernelAPI » Recognition Module » Recognition Engines having own functions

Barcode recognition module. More...

Classes

struct BAR_INFO
Barcode information. More...

Typedefs

typedef BAR_TYPE * | LPBAR_TYPE
Pointer to a BAR_TYPE.
typedef enum BAR_ENA | BAR_ENA
Barcode enabling.
typedef BAR_ENA * | LPBAR_ENA
Pointer to a BAR_ENA type variable.
typedef const BAR_ENA * | LPCBAR_ENA
Const pointer to a BAR_ENA type variable.

Enumerations

enum BAR_TYPE {
BAR_EAN = 0 ,
BAR_UPC_A = 2 ,
BAR_UPC_E ,
BAR_ITF ,
BAR_C39 = 6 ,
BAR_C39_EXT = 9 ,
BAR_C128 = 10 ,
BAR_CB = 12 ,
BAR_POSTNET = 14 ,
BAR_A2of5 ,
BAR_UCC128 ,
BAR_2of5 ,
BAR_C93 ,
BAR_PATCH ,
BAR_PDF417 ,
BAR_PLANET ,
BAR_C32 ,
BAR_DMATRIX = 23 ,
BAR_C39_NSS ,
BAR_QR = 26 ,
BAR_MAT25 ,
BAR_AZTEC =29 ,
BAR_CODE11 ,
BAR_ITAPOST25 ,
BAR_MSI ,
BAR_BOOKLAND ,
BAR_ITF14 ,
BAR_EAN14 ,
BAR_SSCC18 ,
BAR_DATABAR_LTD ,
BAR_DATABAR_EXP ,
BAR_4STATE_USPS ,
BAR_4STATE_AUSPOST ,
BAR_SIZE
}
Barcode types. More...
enum BAR_ENA {
BAR_DISABLED = 0 ,
BAR_ENABLED
}
Barcode enabling. More...
enum AUSPOST_ENC {
AUSPOST_ENC_CHARACTER = 1 ,
AUSPOST_ENC_NUMERIC ,
AUSPOST_ENC_RAW
}
Australian Post barcode encoding methods. More...

Functions

RECERR RECAPIKRN | kRecSetBarTypes (int sid, LPCBAR_ENA pBarEna)
Enabling barcode types.
RECERR RECAPIKRN | kRecGetBarTypes (int sid, LPBAR_ENA pBarEnaOut)
Getting the enabled barcode types.
RECERR RECAPIKRN | kRecGetAutoBarTypes (int sid, LPBAR_ENA pBarEnaOut)
Getting the set of barcode types for automatic barcode detection.
RECERR RECAPIKRN | kRecCheckBarTypes (int sid, LPCBAR_ENA pBarEnaIn, LPBAR_ENA pBarEnaOut, LPCBAR_ENA pBarEnaPrev)
Checking enabled barcode types.
RECERR RECAPIKRN | kRecGetBarTypeName (BAR_TYPE Bartype, LPCSTR *pBarname)
Getting the name of a barcode type.
RECERR RECAPIKRN | kRecGetBarInfo (BAR_TYPE BarCodeType, BAR_INFO *pBarInfo)
Getting information of barcode.

BAR_INFO flag values

Possible values of BAR_INFO::BarFlags See also BAR_INFO.

#define | BF_BAR_1D 1
1D barcode
#define | BF_BAR_2D 2
2D barcode
#define | BF_BAR_POSTAL 4
Postal barcode (different length lines)
#define | BF_BAR_OTHER 8
Other barcode (Patch code)
#define | BF_BAR_DEPRECATED 0x1000
Do not use this barcode!
#define | BF_BAR_NOTSUPPORTED 0x2000
Do not use this barcode! Note that BF_BAR_DEPRECATED is also set.

Detailed Description

Barcode recognition module.

See the general description of BAR recognition module and its settings.

Typedef Documentation

◆ BAR_ENA

typedef enum BAR_ENA BAR_ENA

Barcode enabling.

This enum defines the possible values for the particular barcode type selection when the RM_BAR recognition module is used. See kRecSetBarTypes.

Enumeration Type Documentation

◆ AUSPOST_ENC

enum AUSPOST_ENC

Australian Post barcode encoding methods.

Using the setting Kernel.Ocr.BAR.bar1D.4State.AusPost.CustomerEncoding it can be specified which encoding method was used in the barcode to be recognized.

Enumerator
AUSPOST_ENC_CHARACTER | Alphanumeric character set
AUSPOST_ENC_NUMERIC | Numeric character set
AUSPOST_ENC_RAW | Binary data (retrieved in 8-bit code words)

◆ BAR_ENA

enum BAR_ENA

Barcode enabling.

This enum defines the possible values for the particular barcode type selection when the RM_BAR recognition module is used. See kRecSetBarTypes.

Enumerator
BAR_DISABLED | The particular barcode type is disabled.
BAR_ENABLED | The particular barcode type is enabled.

◆ BAR_TYPE

enum BAR_TYPE

Barcode types.

List of barcode types supported by the RM_BAR recognition module.

Note
Note that the barcode recognition modules are configured to recognize, by default, the following barcode types only: EAN, ITF, Code 39, Code 128 and Codabar. This setting can be changed with the kRecSetBarTypes function.
Barcode types BAR_EAN_SUPPL, BAR_ITF_CDT, BAR_C39_CDT, BAR_C39_SST, BAR_C39_FA, BAR_C128_CDT, BAR_4STATE, BAR_4STATE_DK1, BAR_AZTEC are removed from this enum. Of course, their support is not discontinued, but it is changed. See the topic Deprecated barcode types for more information.
Barcode type BAR_CB_NO_SST is not supported anymore.
See also the table of the barcode type combinations.
Enumerator
BAR_EAN | EAN 8/13. See also the setting Kernel.Ocr.BAR.bar1D.EAN.SUPPL.
BAR_UPC_A | UPC-A. See also the setting Kernel.Ocr.BAR.bar1D.UPCA.SUPPL.
BAR_UPC_E | UPC-E (6-digit). See also the setting Kernel.Ocr.BAR.bar1D.UPCE.SUPPL.
BAR_ITF | ITF (Interleaved 2 of 5). See also the setting Kernel.Ocr.BAR.bar1D.ITF.CDX.
BAR_C39 | Code 39. See also the settings Kernel.Ocr.BAR.bar1D.C39.CDX, Kernel.Ocr.BAR.bar1D.C39.SST, Kernel.Ocr.BAR.bar1D.C39.FA.
BAR_C39_EXT | Code 39 Extended. The full ASCII character set is supported. See also the settings Kernel.Ocr.BAR.bar1D.C39.CDX, Kernel.Ocr.BAR.bar1D.C39.SST.
BAR_C128 | Code 128. See also the setting Kernel.Ocr.BAR.bar1D.C128.CDT.
BAR_CB | Codabar.
BAR_POSTNET | Postnet code (US postal code).
BAR_A2of5 | Airline 2 of 5.
BAR_UCC128 | UCC/EAN Code 128. Includes SSCC-18 and EAN-14 as well.
BAR_2of5 | Code 2 of 5 Standard. See also the setting Kernel.Ocr.BAR.bar1D.2OF5.CDX.
BAR_C93 | Code 93. The full ASCII character set is supported.
BAR_PATCH | Patch Code.
BAR_PDF417 | PDF417 (2D barcode).
BAR_PLANET | Planet Code (US postal code).
BAR_C32 | Code 32. Italian Pharmacode.
BAR_DMATRIX | Data Matrix (2D barcode).
BAR_C39_NSS | Code 39 without start-stop characters.
BAR_QR | QR Code (Quick Response) (2D barcode).
BAR_MAT25 | Matrix 2 of 5. See also the setting Kernel.Ocr.BAR.bar1D.M2OF5.CDX.
BAR_AZTEC | Aztec (2D barcode). Only recognized by Atalasoft.
BAR_CODE11 | Code 11.
BAR_ITAPOST25 | Italian Postal 2 of 5 Code.
BAR_MSI | Modified Plessey Code. See also the setting Kernel.Ocr.BAR.bar1D.MSI.CDX.
BAR_BOOKLAND | Bookland EAN Code.
BAR_ITF14 | ITF 14 Code.
BAR_EAN14 | EAN-14 Code.
BAR_SSCC18 | SSCC18/EAN-18 Code.
BAR_DATABAR_LTD | GS1 Databar Limited Code.
BAR_DATABAR_EXP | GS1 Databar Expanded Code.
BAR_4STATE_USPS | USPS 4-State Customer Barcode. (a.k.a. OneCode, Intelligent Mail).
BAR_4STATE_AUSPOST | Australia Post 4-State Customer Barcode. See also the setting Kernel.Ocr.BAR.bar1D.4STATE.AUSPOST.CustomerEncoding.
BAR_SIZE | Number of barcode types.

Function Documentation

◆ kRecCheckBarTypes()

RECERR RECAPIKRN kRecCheckBarTypes | ( | int | sid,
 |  | LPCBAR_ENA | pBarEnaIn,
 |  | LPBAR_ENA | pBarEnaOut,
 |  | LPCBAR_ENA | pBarEnaPrev )

Checking enabled barcode types.

The kRecCheckBarTypes function is used to check the enabled barcode type(s) for the RM_BAR recognition module. The function checks that the barcode type combination is correct and fixes it in the pBarEnaOut array by removing incompatible ones.

Parameters
[in] | sid | Settings Collection ID.
[in] | pBarEnaIn | Pointer of a BAR_ENA type array having BAR_SIZE elements. Each element of this array will be checked whether they are incompatible with each other.
[out] | pBarEnaOut | Pointer of a BAR_ENA type array having BAR_SIZE elements. Each element of this array corresponding to the pBarEnaIn array are enabled/disabled in a correct combination. This parameter can be NULL.
[in] | pBarEnaPrev | Pointer of a BAR_ENA type array having BAR_SIZE elements. Using this array is useful for those applications where the user can select barcode types from a user interface. This array must contain the previous state of the barcode set. The function uses this array to learn which barcode is actually selected by the user. This information is used as a hint to keep this barcode selected in the pBarEnaOut array. This parameter can be NULL.
Return values
RECERR See details in notes below.
Note
To use this function simply for checking a barcode type combination without fixing it, set both pBarEnaOut and pBarEnaPrev to NULL.
The function works according to the table of the barcode type combinations.
The following barcode types are deprecated: BAR_EAN_SUPPL, BAR_ITF_CDT, BAR_C39_CDT, BAR_C39_SST, BAR_C39_FA, BAR_C128_CDT, BAR_CB_NO_SST. Enabling them results in the return value BAR_DEPRECATED_TYPE_ERR. If necessary use the following settings instead according to the type: Kernel.Ocr.BAR.bar1D.EAN.SUPPL, Kernel.Ocr.BAR.bar1D.ITF.CDX, Kernel.Ocr.BAR.bar1D.C39.CDX, Kernel.Ocr.BAR.bar1D.C39.SST and Kernel.Ocr.BAR.bar1D.C128.CDT.
If the currently used barcode recognition module does not support one of the enabled barcode types, the return value of this function is BAR_NOTSUPPORTED_TYPE_ERR.
To get additional information about the return errors use the kRecGetLastError function. Its supplementary character string may help identify the problem. This function should be called immediately after the kRecCheckBarTypes function.
See also the module BAR.
The specification of this function in C# is:
RECERR kRecCheckBarTypes(int sid, [In] BAR_ENA[] pBarEnaIn, [Out] BAR_ENA[] pBarEnaOut, [In] BAR_ENA[] pBarEnaPrev);
BAR_ENA
BAR_ENA
Barcode enabling.
Definition KernelApi.h:1499
kRecCheckBarTypes
RECERR RECAPIKRN kRecCheckBarTypes(int sid, LPCBAR_ENA pBarEnaIn, LPBAR_ENA pBarEnaOut, LPCBAR_ENA pBarEnaPrev)
Checking enabled barcode types.
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
The specification of this function in Java is:
int kRecCheckBarTypes(int sid, int[] pBarEnaIn, int[] pBarEnaOut, int[] pBarEnaPrev)
The specification of this function in Python is:
def kRecCheckBarTypes(sid: int, pBarEnaIn: "IntArray", pBarEnaPrev: "IntArray") -> Tuple[int, "IntArray"]

◆ kRecGetAutoBarTypes()

RECERR RECAPIKRN kRecGetAutoBarTypes | ( | int | sid,
 |  | LPBAR_ENA | pBarEnaOut )

Getting the set of barcode types for automatic barcode detection.

The kRecGetAutoBarTypes function inquires the largest set of barcode types of the RM_BAR recognition module that can be used simultaneously for automatic detection.

Parameters
[in] | sid | Settings Collection ID.
[out] | pBarEnaOut | Address of a buffer size of BAR_SIZE to receive the barcode type enable/disable array.
Return values
RECERR
Note
Use the returned buffer with kRecSetBarTypes to enable the largest set for automatic barcode detection.
The settings Kernel.OcrMgr.BarEnable1D2D, Kernel.OcrMgr.BarEnableC39C39EXT and Kernel.OcrMgr.BarEnableC39C32 have an effect on the resulting set of barcodes.
The specification of this function in C# is:
RECERR kRecGetAutoBarTypes(int sid, out BAR_ENA[] pBarEnaOut);
kRecGetAutoBarTypes
RECERR RECAPIKRN kRecGetAutoBarTypes(int sid, LPBAR_ENA pBarEnaOut)
Getting the set of barcode types for automatic barcode detection.
The specification of this function in Java is:
int kRecGetAutoBarTypes(int sid, int[] pBarEnaOut)
The specification of this function in Python is:
def kRecGetAutoBarTypes(sid: int) -> Tuple[int, "IntArray"]

◆ kRecGetBarInfo()

RECERR RECAPIKRN kRecGetBarInfo | ( | BAR_TYPE | BarCodeType,
 |  | BAR_INFO * | pBarInfo )

Getting information of barcode.

The kRecGetBarInfo function gets information of the specified barcode type

Parameters
[in] | BarCodeType | The barcode type inquired.
[out] | pBarInfo | Address of a pointer to the BAR_INFO structure.
Note
The specification of this function in C# is:
RECERR kRecGetBarInfo(BAR_TYPE BarType, out BAR_INFO BarInfo);
BAR_TYPE
BAR_TYPE
Barcode types.
Definition KernelApi.h:1428
kRecGetBarInfo
RECERR RECAPIKRN kRecGetBarInfo(BAR_TYPE BarCodeType, BAR_INFO *pBarInfo)
Getting information of barcode.
BAR_INFO
Barcode information.
Definition KernelApi.h:1535
The specification of this function in Java is:
int kRecGetBarInfo(int BarCodeType, BAR_INFO pBarInfo)
The specification of this function in Python is:
def kRecGetBarInfo(BarCodeType: int) -> Tuple[int, "BAR_INFO"]

◆ kRecGetBarTypeName()

RECERR RECAPIKRN kRecGetBarTypeName | ( | BAR_TYPE | Bartype,
 |  | LPCSTR * | pBarname )

Getting the name of a barcode type.

The kRecGetBarTypeName function gets the full name string of the specified barcode type of the RM_BAR recognition module.

Parameters
[in] | Bartype | The barcode type inquired.
[out] | pBarname | Address of a pointer to the name of the specified barcode.
Note
Barcode type names are available in ASCII encoding. You may use kRecConvertCodePage2UnicodeEx to convert to UTF-16.
Barcode type names may change in newer versions, thus these names cannot be used as identifiers.
If you need more information than name about barcode types, we suggest to use the kRecGetBarInfo function.
The specification of this function in C# is:
RECERR kRecGetBarTypeName(BAR_TYPE Bartype, out string pBarname);
kRecGetBarTypeName
RECERR RECAPIKRN kRecGetBarTypeName(BAR_TYPE Bartype, LPCSTR *pBarname)
Getting the name of a barcode type.
The specification of this function in Java is:
int kRecGetBarTypeName(int Bartype, String[] pBarname)
The specification of this function in Python is:
def kRecGetBarTypeName(Bartype: int) -> Tuple[int, str]

◆ kRecGetBarTypes()

RECERR RECAPIKRN kRecGetBarTypes | ( | int | sid,
 |  | LPBAR_ENA | pBarEnaOut )

Getting the enabled barcode types.

The kRecGetBarTypes function inquires the barcode types of the RM_BAR recognition module currently validated for recognition.

Parameters
[in] | sid | Settings Collection ID.
[out] | pBarEnaOut | Address of a buffer size of BAR_SIZE to receive the barcode type enable/disable array.
Return values
RECERR
Note
This function gets the value of the setting Kernel.OcrMgr.BarTypes. This setting can be changed by kRecSetBarTypes.
The specification of this function in C# is:
RECERR kRecGetBarTypes(int sid, out BAR_ENA[] pBarEnaOut);
kRecGetBarTypes
RECERR RECAPIKRN kRecGetBarTypes(int sid, LPBAR_ENA pBarEnaOut)
Getting the enabled barcode types.
The specification of this function in Java is:
int kRecGetBarTypes(int sid, int[] pBarEnaOut)
The specification of this function in Python is:
def kRecGetBarTypes(sid: int) -> Tuple[int, "IntArray"]

◆ kRecSetBarTypes()

RECERR RECAPIKRN kRecSetBarTypes | ( | int | sid,
 |  | LPCBAR_ENA | pBarEna )

Enabling barcode types.

The kRecSetBarTypes function is used to specify the enabled barcode type(s) for the RM_BAR module.

Parameters
[in] | sid | Settings Collection ID.
[in] | pBarEna | Pointer of a BAR_ENA type array having BAR_SIZE elements. Each element of this array variable corresponds to a BAR_TYPE barcode type, and their values represent the enabled/disabled status of the appropriate barcode type.
Return values
RECERR
Note
This function sets the value of the setting Kernel.OcrMgr.BarTypes. This setting can be retrieved by kRecGetBarTypes.
Not all barcode types are compatible! To check the barcode type combination to be enabled, use the kRecCheckBarTypes function. See that function also for the list of incompatible barcode type combinations.
If all the barcode types are disabled, the RM_BAR module uses the array returned by an internal call to kRecGetAutoBarTypes instead during recognition.
See also the module BAR.
The specification of this function in C# is:
RECERR kRecSetBarTypes(int sid, BAR_ENA[] pBarEna);
kRecSetBarTypes
RECERR RECAPIKRN kRecSetBarTypes(int sid, LPCBAR_ENA pBarEna)
Enabling barcode types.
The specification of this function in Java is:
int kRecSetBarTypes(int sid, int[] pBarEna)
The specification of this function in Python is:
def kRecSetBarTypes(sid: int, pBarEna: "IntArray") -> int


RecAPI: BAR_INFO Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
BAR_INFO Struct Reference
KernelAPI » Recognition Module » Recognition Engines having own functions » BAR Recognition Engine Module

Barcode information. More...

#include <KernelApi.h>

Public Attributes

int | BarFlags
See ANCH_BARFLAGS.
char | BarID [24]
Barcode name: a single word internal ID, zero terminated.
char | BarName [64]
Barcode display name: possibly multi word English name (may change in newer versions), zero terminated.

Detailed Description

Barcode information.

This structure collects information about barcodes: barcode flags BAR_INFO::BarFlags, short and display name of barcode. See kRecGetBarInfo.


RecAPI: HNR Recognition Engine Module

Classes | Typedefs | Enumerations | Functions
HNR Recognition Engine Module
KernelAPI » Recognition Module » Recognition Engines having own functions

Handprinted numeral recognition module. This module is supported on: Windows. More...

Classes

struct HNR_BOXDATA
Character box of HNR. More...

Typedefs

typedef HNR_BOXDATA * | LPHNR_BOXDATA
Pointer type to a HNR_BOXDATA type variable.
typedef const HNR_BOXDATA * | LPCHNR_BOXDATA
Const pointer type to a HNR_BOXDATA type variable.

Enumerations

enum HNR_STYLE {
STYLE_EURO ,
STYLE_US
}
Writing style of HNR. More...

Functions

RECERR RECAPIKRN | kRecSetHnrStyle (int sid, HNR_STYLE db)
Setting writing style of HNR.
RECERR RECAPIKRN | kRecGetHnrStyle (int sid, HNR_STYLE *pdb)
Getting writing style of HNR.
RECERR RECAPIKRN | kRecSetHnrParams (int sid, LPCHNR_BOXDATA pCharbox, INTBOOL bSpaceincl)
Setting HNR parameters.
RECERR RECAPIKRN | kRecGetHnrParams (int sid, LPHNR_BOXDATA pCharbox, INTBOOL *pbSpaceincl)
Getting HNR parameters.

Detailed Description

Handprinted numeral recognition module. This module is supported on: Windows.

See the general description and the settings of this module.

Enumeration Type Documentation

◆ HNR_STYLE

enum HNR_STYLE

Writing style of HNR.

This setting specifies the writing style of the characters for the HNR handprinted numerals recognition module.

Note
The HNR module is supported on: Windows.
European style for example expects sevens (7) to be crossed whereas they are not crossed in the North American style.
Enumerator
STYLE_EURO | Writing in European style. This is the default style.
STYLE_US | Writing in North American style.

Function Documentation

◆ kRecGetHnrParams()

RECERR RECAPIKRN kRecGetHnrParams | ( | int | sid,
 |  | LPHNR_BOXDATA | pCharbox,
 |  | INTBOOL * | pbSpaceincl )

Getting HNR parameters.

The kRecGetHnrParams function inquires the current space inclusion flag and Character box parameter setting of the handprinted numeral recognition module RM_HNR.

Parameters
[in] | sid | Settings Collection ID.
[out] | pCharbox | Pointer of a structure to receive Character box parameters.
[out] | pbSpaceincl | Pointer of a variable to store the space inclusion flag. When the space inclusion flag is TRUE, the recognition module calculates and may return SPACE characters between the recognized numeral characters.
Return values
RECERR
Note
The HNR module is supported on: Windows.
This function gets the value of the settings Kernel.Ocr.HNR.box_height, ...box_space, ...box_width and ...Spaces. These settings can be changed by kRecSetHnrParams.
The specification of this function in C# is:
RECERR kRecGetHnrParams(int sid, out HNR_BOXDATA pCharbox, out bool bSpaceincl);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecGetHnrParams
RECERR RECAPIKRN kRecGetHnrParams(int sid, LPHNR_BOXDATA pCharbox, INTBOOL *pbSpaceincl)
Getting HNR parameters.
HNR_BOXDATA
Character box of HNR.
Definition KernelApi.h:13361
The specification of this function in Java is:
int kRecGetHnrParams(int sid, HNR_BOXDATA pCharbox, int[] pbSpaceincl)
The specification of this function in Python is:
def kRecGetHnrParams(sid: int) -> Tuple[int, "HNR_BOXDATA", bool]

◆ kRecGetHnrStyle()

RECERR RECAPIKRN kRecGetHnrStyle | ( | int | sid,
 |  | HNR_STYLE * | pdb )

Getting writing style of HNR.

The kRecGetHnrStyle function inquires the writing style setting of the handprinted numeral recognition module (FM_HANDPRINT).

Parameters
[in] | sid | Settings Collection ID.
[out] | pdb | Pointer of a variable to store the writing style setting.
Return values
RECERR
Note
The HNR module is supported on: Windows.
This function gets the value of the setting Kernel.Ocr.HNR.Database. This setting can be changed by kRecSetHnrStyle.
The specification of this function in C# is:
RECERR kRecGetHnrStyle(int sid, out HNR_STYLE pdb);
kRecGetHnrStyle
RECERR RECAPIKRN kRecGetHnrStyle(int sid, HNR_STYLE *pdb)
Getting writing style of HNR.
HNR_STYLE
HNR_STYLE
Writing style of HNR.
Definition KernelApi.h:13314
The specification of this function in Java is:
int kRecGetHnrStyle(int sid, HNR_STYLE[] pdb)
The specification of this function in Python is:
def kRecGetHnrStyle(sid: int) -> Tuple[int, int]

◆ kRecSetHnrParams()

RECERR RECAPIKRN kRecSetHnrParams | ( | int | sid,
 |  | LPCHNR_BOXDATA | pCharbox,
 |  | INTBOOL | bSpaceincl )

Setting HNR parameters.

The kRecSetHnrParams function sets character box parameters and the space inclusion flag for the handprinted numerals recognition module FM_HANDPRINT.

Parameters
[in] | sid | Settings Collection ID.
[in] | pCharbox | Pointer of a Character box parameter structure. It can be NULL.
[in] | bSpaceincl | Space inclusion flag. This flag controls whether or not the handprinted numeral recognition module should export spaces detected between characters.
Return values
RECERR
Note
The HNR module is supported on: Windows.
This function can be used when the application is aware of the size of the handprinted numerals to be recognized in advance (i.e. before processing). The use of this function may yield better accuracy.
This function sets the value of the settings Kernel.Ocr.HNR.box_height, ...box_space, ...box_width and ...Spaces. These settings can be retrieved by kRecGetHnrParams.
The specification of this function in C# is:
RECERR kRecSetHnrParams(int sid, HNR_BOXDATA pCharbox, bool bSpaceincl);
kRecSetHnrParams
RECERR RECAPIKRN kRecSetHnrParams(int sid, LPCHNR_BOXDATA pCharbox, INTBOOL bSpaceincl)
Setting HNR parameters.
The specification of this function in Java is:
int kRecSetHnrParams(int sid, HNR_BOXDATA pCharbox, int bSpaceincl)
The specification of this function in Python is:
def kRecSetHnrParams(sid: int, pCharbox: Optional["HNR_BOXDATA"], bSpaceincl: bool) -> int

◆ kRecSetHnrStyle()

RECERR RECAPIKRN kRecSetHnrStyle | ( | int | sid,
 |  | HNR_STYLE | db )

Setting writing style of HNR.

The kRecSetHnrStyle function sets the writing style setting for the handprinted numerals recognition module (FM_HANDPRINT).

Parameters
[in] | sid | Settings Collection ID.
[in] | db | Writing style to be set.
Return values
RECERR
Note
The HNR module is supported on: Windows.
If this function is not called, the default value of STYLE_EURO is applied.
This function sets the value of the setting Kernel.Ocr.HNR.Database. This setting can be retrieved by kRecGetHnrStyle.
The specification of this function in C# is:
RECERR kRecSetHnrStyle(int sid, HNR_STYLE db);
kRecSetHnrStyle
RECERR RECAPIKRN kRecSetHnrStyle(int sid, HNR_STYLE db)
Setting writing style of HNR.
The specification of this function in Java is:
int kRecSetHnrStyle(int sid, HNR_STYLE db)
The specification of this function in Python is:
def kRecSetHnrStyle(sid: int, db: int) -> int


RecAPI: HNR_BOXDATA Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
HNR_BOXDATA Struct Reference
KernelAPI » Recognition Module » Recognition Engines having own functions » HNR Recognition Engine Module

Character box of HNR. More...

#include <KernelApi.h>

Public Attributes

int | box_height
int | box_width
int | box_space

Detailed Description

Character box of HNR.

Character box parameter structure for the Handprinted numerals recognition module.

Note
The HNR module is supported on: Windows.

Member Data Documentation

◆ box_height

int HNR_BOXDATA::box_height

Character height in 1/1200 inches. A value of zero (0) forces the automatic calculation of this parameter. If this parameter is zero (0) the remaining fields are considered 0 as well.

◆ box_space

int HNR_BOXDATA::box_space

Leading spaces in 1/1200 inches. A value of zero (0) forces the automatic calculation of this parameter.

◆ box_width

int HNR_BOXDATA::box_width

Character width in 1/1200 inches. A value of zero (0) forces the automatic calculation of this parameter.


RecAPI: MOR Recognition Engine Module

Functions
MOR Recognition Engine Module
KernelAPI » Recognition Module » Recognition Engines having own functions

MOR multi-lingual omnifont recognition module. More...

Functions

RECERR RECAPIKRN | kRecSetMorFaxed (int sid, INTBOOL bFaxed)
Setting fax image mode for MOR.
RECERR RECAPIKRN | kRecGetMorFaxed (int sid, INTBOOL *pbFaxed)
Getting fax image mode for MOR.

Detailed Description

MOR multi-lingual omnifont recognition module.

See the general description.

Function Documentation

◆ kRecGetMorFaxed()

RECERR RECAPIKRN kRecGetMorFaxed | ( | int | sid,
 |  | INTBOOL * | pbFaxed )

Getting fax image mode for MOR.

The kRecGetMorFaxed function inquires the current setting of the Fax image mode of module RM_OMNIFONT_MOR. If the inquired status is TRUE, the normal Fax image mode is switched on.

Parameters
[in] | sid | Settings Collection ID.
[out] | pbFaxed | Pointer of a Boolean variable to hold the current Fax image mode setting.
Return values
RECERR
Note
See kRecSetMorFaxed for more information.
The specification of this function in C# is:
RECERR kRecGetMorFaxed(int sid, out bool bFaxed);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecGetMorFaxed
RECERR RECAPIKRN kRecGetMorFaxed(int sid, INTBOOL *pbFaxed)
Getting fax image mode for MOR.
The specification of this function in Java is:
int kRecGetMorFaxed(int sid, int[] pbFaxed)
The specification of this function in Python is:
def kRecGetMorFaxed(sid: int) -> Tuple[int, bool]

◆ kRecSetMorFaxed()

RECERR RECAPIKRN kRecSetMorFaxed | ( | int | sid,
 |  | INTBOOL | bFaxed )

Setting fax image mode for MOR.

The kRecSetMorFaxed function switches on or off the Fax image mode for the multi-lingual RM_OMNIFONT_MOR omnifont recognition module.

Parameters
[in] | sid | Settings Collection ID.
[in] | bFaxed | Fax image mode to be set.
Return values
RECERR
Note
Turn this setting on (bFaxed=TRUE) if the image file to be loaded is a fax message transmitted in "Standard" (or "Draft") mode with about 200 x 100 resolution. Its use is not recommended for reading fax card image files transmitted in "Fine" mode (about 200 x 200 dpi resolution).
The specification of this function in C# is:
RECERR kRecSetMorFaxed(int sid, bool bFaxed);
kRecSetMorFaxed
RECERR RECAPIKRN kRecSetMorFaxed(int sid, INTBOOL bFaxed)
Setting fax image mode for MOR.
The specification of this function in Java is:
int kRecSetMorFaxed(int sid, int bFaxed)
The specification of this function in Python is:
def kRecSetMorFaxed(sid: int, bFaxed: bool) -> int


RecAPI: OMR Recognition Engine Module

Enumerations | Functions
OMR Recognition Engine Module
KernelAPI » Recognition Module » Recognition Engines having own functions

OMR optical mark recognition module. More...

Enumerations

enum OMR_FRAME {
FRAME_AUTO ,
FRAME_NO ,
FRAME_YES
}
Frame detection methods for OMR. More...
enum OMR_SENSE {
SENSE_NORMAL ,
SENSE_LOW ,
SENSE_LOWER ,
SENSE_LOWEST
}
Mark sensitivity of OMR. More...

Functions

RECERR RECAPIKRN | kRecSetOmrParams (int sid, INTBOOL bFill, OMR_FRAME frame, OMR_SENSE sensitivity)
Setting OMR parameters.
RECERR RECAPIKRN | kRecGetOmrParams (int sid, INTBOOL *pbFill, OMR_FRAME *pFrame, OMR_SENSE *pSensitivity)
Getting OMR parameters.

Detailed Description

OMR optical mark recognition module.

See the general description and the settings of this module.

Enumeration Type Documentation

◆ OMR_FRAME

enum OMR_FRAME

Frame detection methods for OMR.

This setting specifies the frame detection method to be applied during the running of the RM_OMR optical mark recognition module. This setting may influence the recognition accuracy.

Note
The checkmarks can be of two types: with or without a frame visible in the image. The frame can be a rectangle, a hexagon, a circle, an ellipse, etc., it can be shaded.
Scanning with a dropout color may mean that a frame visible on the input document becomes invisible in the image.
The recognition accuracy is better if FRAME_AUTO has been avoided.
Enumerator
FRAME_AUTO | Automatic frame detection. This is the default mode. It should be used when it is not known whether or not there are frames for indicating checkmark zones of the image.
FRAME_NO | The checkmark zones of the image are not indicated by visible frames.
FRAME_YES | The checkmark zones of the image are indicated by visible frames.

◆ OMR_SENSE

enum OMR_SENSE

Mark sensitivity of OMR.

This setting defines the possible mark sensitivity values to be applied during the running of the RM_OMR checkmark recognition module. This setting may influence the accuracy of the recognition.

Note
The higher the mark sensitivity setting, the more sensitive the recognition is, i.e. even a small mark (just a few continuous black pixels) will cause the zone to be classified as "checked by respondent". The default sensitivity is suitable for well-printed questionnaires. Poor-quality forms should be avoided if possible, however lower sensitivity allows speckled or poorly printed documents to be processed successfully.
Enumerator
SENSE_NORMAL | Highest mark sensitivity. This is the default sensitivity.
SENSE_LOW | Less mark sensitivity.
SENSE_LOWER | Lower mark sensitivity.
SENSE_LOWEST | Lowest mark sensitivity.

Function Documentation

◆ kRecGetOmrParams()

RECERR RECAPIKRN kRecGetOmrParams | ( | int | sid,
 |  | INTBOOL * | pbFill,
 |  | OMR_FRAME * | pFrame,
 |  | OMR_SENSE * | pSensitivity )

Getting OMR parameters.

The kRecGetOmrParams function inquires the current settings of the RM_OMR optical mark recognition module. (See kRecSetOmrParams.)

Parameters
[in] | sid | Settings Collection ID.
[out] | pbFill | Pointer of a Boolean variable to get the current two/three-value output setting.
[out] | pFrame | Pointer of a variable to get the current frame detection method setting.
[out] | pSensitivity | Pointer of a variable to get the current mark sensitivity level setting.
Return values
RECERR
Note
This function gets the value of the settings Kernel.Ocr.OMR.Fill, ...Frame and ...Sense. These settings can be changed by kRecSetOmrParams.
The specification of this function in C# is:
RECERR kRecGetOmrParams(int sid, out bool bFill, out OMR_FRAME frame, out OMR_SENSE sensitivity);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
OMR_SENSE
OMR_SENSE
Mark sensitivity of OMR.
Definition KernelApi.h:13233
OMR_FRAME
OMR_FRAME
Frame detection methods for OMR.
Definition KernelApi.h:13213
kRecGetOmrParams
RECERR RECAPIKRN kRecGetOmrParams(int sid, INTBOOL *pbFill, OMR_FRAME *pFrame, OMR_SENSE *pSensitivity)
Getting OMR parameters.
The specification of this function in Java is:
int kRecGetOmrParams(int sid, int[] pbFill, OMR_FRAME[] pFrame, OMR_SENSE[] pSensitivity)
The specification of this function in Python is:
def kRecGetOmrParams(sid: int) -> Tuple[int, bool, int, int]

◆ kRecSetOmrParams()

RECERR RECAPIKRN kRecSetOmrParams | ( | int | sid,
 |  | INTBOOL | bFill,
 |  | OMR_FRAME | frame,
 |  | OMR_SENSE | sensitivity )

Setting OMR parameters.

The kRecSetOmrParams function is used to specify the settings of the RM_OMR optical mark recognition module. These are: the filled-in-error feature, the frame detection method and the mark sensitivity level.

Parameters
[in] | sid | Settings Collection ID.
[in] | bFill | This parameter determines whether the recognition output can take two or three values.
[in] | frame | Frame detection method to be set. This specifies whether the image contains visible frames indicating OMR zone borders or not.
[in] | sensitivity | Mark sensitivity level to be set.
Return values
RECERR
Note
If this function is not called, the default values are:
  • two-value output from recognition,
  • FRAME_AUTO detection mode, and
  • SENSE_NORMAL sensitivity setting.
Use bFill to enable or disable a facility that allows a respondent to correct boxes wrongly checked. If it is FALSE, only one of two values can be generated for each RM_OMR zone:
  • 0 = unfilled,
  • 1 = filled.
If it is TRUE, three values are possible:
  • 0 = unfilled,
  • 1 = filled,
  • 2 = filled in error.
In order to generate the value 2, a respondent must completely blacken or shade the whole zone area.
This function sets the value of the settings Kernel.Ocr.OMR.Fill, ...Frame and ...Sense. These settings can be retrieved by kRecGetOmrParams.
The specification of this function in C# is:
RECERR kRecSetOmrParams(int sid, bool bFill, OMR_FRAME frame, OMR_SENSE sensitivity);
kRecSetOmrParams
RECERR RECAPIKRN kRecSetOmrParams(int sid, INTBOOL bFill, OMR_FRAME frame, OMR_SENSE sensitivity)
Setting OMR parameters.
The specification of this function in Java is:
int kRecSetOmrParams(int sid, int bFill, OMR_FRAME frame, OMR_SENSE sensitivity)
The specification of this function in Python is:
def kRecSetOmrParams(sid: int, bFill: bool, frame: int, sensitivity: int) -> int


RecAPI: STATISTIC Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
STATISTIC Struct Reference
KernelAPI » Recognition Module

Recognition statistics. More...

#include <KernelApi.h>

Public Attributes

int | iChrNumber
int | iWordNumber
int | iChrRejected
DWORD | iRecognitionTime
DWORD | iReadingTime
DWORD | iScanTime
DWORD | iPreprocTime
DWORD | iDecompTime

Detailed Description

Recognition statistics.

Processing statistics structure associated with the processing of the last accessed page.

Note
A value of zero (0) in a timing field indicates that either the relevant process has not been performed or it has been performed but resulted in zero due to timing resolution.
The time spent in the Progress indication user callback function (if any) is not taken into account in these time measurements.
The total processing time that a single image spends in the Engine until recognition data or the final output document is produced can be calculated as follows: iTotal = iScanTime + iPreprocTime + iDecompTime + iReadingTime.

Member Data Documentation

◆ iChrNumber

int STATISTIC::iChrNumber

Number of recognized characters on the last page.

◆ iChrRejected

int STATISTIC::iChrRejected

Number of rejected characters on the last page.

◆ iDecompTime

DWORD STATISTIC::iDecompTime

Page-layout decomposition time in 1/1000 secs (i.e. auto-zoning).

◆ iPreprocTime

DWORD STATISTIC::iPreprocTime

Image preprocessing time in 1/1000 secs.

◆ iReadingTime

DWORD STATISTIC::iReadingTime

Reading time in 1/1000 secs. This includes the time iRecognitionTime, the time necessary for sorting the output coming from the different recognition modules, the time spent with the checking module and the time required to produce the recognition result (e.g. the time necessary to write the recognition result into the recognition data file). This field may also include the time needed for transferring the recognition result from the current page into the final output document (kRecConvert2DTXT)

  • supposing that the statistical information was requested after conversion to the final output document.

◆ iRecognitionTime

DWORD STATISTIC::iRecognitionTime

The recognition time (in 1/1000 secs) that the page spent in the different recognition modules during the recognition process.

◆ iScanTime

DWORD STATISTIC::iScanTime

Scanning time (in 1/1000 secs) required for loading the page from the scanner, image file or from the application's memory.

◆ iWordNumber

int STATISTIC::iWordNumber

Number of recognized words on the last page.


RecAPI: _RPPERRORS Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
_RPPERRORS Struct Reference
KernelAPI » Recognition Module

Error list item. More...

#include <KernelApi.h>

Public Attributes

RECERR rc
int | page
LPWSTR | obj
struct _RPPERRORS * | next

Detailed Description

Error list item.

This struct contains an item of the error list retrieved by kRecGetRPPErrorList or RecGetRPPErrorList.

Member Data Documentation

◆ next

struct _RPPERRORS* _RPPERRORS::next

Next item of the error list or NULL at end.

◆ obj

LPWSTR _RPPERRORS::obj

The label of the error code as a string.

◆ page

int _RPPERRORS::page

Index of the page of that processing returned with this error code.

◆ rc

RECERR _RPPERRORS::rc

The error code.


RecAPI: Recognition Data Handling Module

Classes | Typedefs | Enumerations | Functions
Recognition Data Handling Module
KernelAPI

Letter handling tools. More...

Classes

struct | LSPC
Additional information about the space character. More...
struct | LETTER
The LETTER structure. More...

Typedefs

typedef LETTER * | LPLETTER
Pointer to a structure LETTER.
typedef const LETTER * | LPCLETTER
Const pointer to a structure LETTER.

Enumerations

enum LETTERSTRENGTH {
LTS_FINAL ,
LTS_STRONG ,
LTS_MEDIUM ,
LTS_WEAK ,
LTS_SIZE
}
Possible places where letter array is to be copied to. More...

Functions

RECERR RECAPIKRN | kRecGetLetters (HPAGE hPage, IMAGEINDEX iiImage, LPLETTER *ppLetter, LPLONG pLettersLength)
Getting recognition result.
RECERR RECAPIKRN | kRecGetLetterPalette (HPAGE hPage, REC_COLOR **ppColours, LPLONG pNum)
Getting palette of recognition data.
RECERR RECAPIKRN | kRecGetChoiceStr (HPAGE hPage, WCHAR **ppChoices, LPLONG pLength)
Getting choices.
RECERR RECAPIKRN | kRecGetSuggestionStr (HPAGE hPage, WCHAR **ppSuggestions, LPLONG pLength)
Getting suggestions.
RECERR RECAPIKRN | kRecGetFontFaceStr (HPAGE hPage, char **ppFontFaces, LPLONG pLength)
Getting font faces.
RECERR RECAPIKRN | kRecSetLetters (LETTERSTRENGTH towhere, HPAGE hPage, IMAGEINDEX iiImage, LPCLETTER pLetter, LONG LettersLength)
Putting a letter buffer onto the input of the PLUS2W and PLUS3W engines or the selected output converter.
RECERR RECAPIKRN | kRecFreeRecognitionData (HPAGE hPage)
Freeing recognition data.

LETTER::fontAttrib field elements

Possible values of LETTER::fontAttrib field.

#define | R_NO_ITALIC 0x0001
Not-Italic character. It is not possible for both R_ITALIC and R_NO_ITALIC to be set. If both are unset we do not know whether it is Italic or not.
#define | R_ITALIC 0x0002
Italic character. See also R_NO_ITALIC.
#define | R_NO_BOLD 0x0004
Not-Bold character. It is not possible for both R_BOLD and R_NO_BOLD to be set. If both are unset we do not know whether it is Bold or not.
#define | R_BOLD 0x0008
Bold character. See also R_NO_BOLD.
#define | R_SANSSERIF 0x0010
Sans Serif character. It is not possible for both R_SANSSERIF and R_SERIF to be set. If both are unset we do not know whether it is Serif or not.
#define | R_SERIF 0x0020
Serif character. See also R_SANSSERIF.
#define | R_PROPORTIONAL 0x0040
Proportional character. It is not possible for both R_PROPORTIONAL and R_MONOSPACED to be set. If both are unset we do not know whether it is Monospaced or not.
#define | R_MONOSPACED 0x0080
Monospaced character. See also R_PROPORTIONAL.
#define | R_SMALLCAPS 0x0100
Character in a Small Caps word. The code is always upper case! See also RR_SMALLCAPS_TALL in the field info.
#define | R_UNDERLINE 0x0200
Underlined character.
#define | R_STRIKETHROUGH 0x0400
Struck through character.
#define | R_SUBSCRIPT 0x0800
Subscript character.
#define | R_SUPERSCRIPT 0x1000
Superscript character.
#define | R_DROPCAP 0x2000
Dropcap character.
#define | R_POPCAP 0x4000
Popcap character.
#define | R_INVERTED 0x8000
Inverted character.

LETTER::info field macros

Macros can be used with LETTER::info field.

#define | RH_OCRENGINE(info) ((RECOGNITIONMODULE)(((info) & RH_OCRENGINE_MASK) >> 5))
Getting the RECOGNITIONMODULE from the field info. This is the module ID of the engine that actually recognized the given character. With the PLUS engines this is usually RM_RESERVED_M.
#define | RH_OCRENGINE_SET(oeng) (((UINT)(oeng)) << 5)
Setting the RECOGNITIONMODULE into the field info.
#define | RH_OCRTYPE(info) ((FILLINGMETHOD)(((info) & RH_OCRTYPE_MASK) >> 10))
Getting the FILLINGMETHOD from the field info.
#define | RH_OCRTYPE_SET(otype) (((UINT)(otype)) << 10)
Setting the FILLINGMETHOD into the field info.
#define | RH_BARTYPE(info) ((BAR_TYPE)(((info) & RH_BARTYPE_MASK) >> 24))
Getting the BAR_TYPE from the field info.
#define | RH_BARTYPE_SET(btype) (((UINT)(btype)) << 24)
Setting the BAR_TYPE into the field info.

Info field bits

Possible flags of LETTER::info field.

#define | RR_BULLET 0x00000001
Bullet character at bullet position.
#define | RR_SOFTHYPHEN 0x00000004
Soft hyphen.
#define | RH_OCRENGINE_MASK 0x000003E0
Mask of RECOGNITIONMODULE.
#define | RH_OCRTYPE_MASK 0x00007C00
Mask of FILLINGMETHOD.
#define | RH_GTMTCH 0x00008000
Internal use only.
#define | RR_CONFIDENT_CHAR 0x00010000
Internal use only.
#define | RR_DISABLED_CHAR 0x00020000
Internal use only.
#define | RR_REDACTED_CHAR 0x00020000
Redacted character is here.
#define | RR_VOTED_CHAR 0x00040000
Internal use only.
#define | RR_NOISY_CHAR 0x00080000
Internal use only.
#define | RR_EXPANDED 0x00100000
Internal use only.
#define | RH_MANGO_ISOLATED_CH 0x00200000
Internal use only.
#define | RH_LA_INTERNAL 0x00400000
Internal use only.
#define | RH_LA_EXTERNAL 0x00800000
NO LONGER USED.
#define | RR_PDMERGE_CHAR 0x00800000
Internal use only.
#define | RH_BARTYPE_MASK 0x3F000000
Mask of BAR_TYPE.
#define | RR_DICTIONARY_WORD 0x40000000
Dictionary word. It is set when the word is in at least one dictionary of the currently used ones. See Language of a word.
#define | RR_SMALLCAPS_TALL 0x80000000
A tall character among the small capitals. See also R_SMALLCAPS in the field fontAttrib.

LETTER::makeup field elements

Flags of end-position LETTERs (see usage of them in the table) and direction/orientation flags (see also the section about vertical text support).

#define | R_ENDOFLINE 0x0001
End of line. See the sections Handling of spaces and End-position letters for additional information.
#define | R_ENDOFPARA 0x0002
End of paragraph. This flag is used specially by BAR module.
#define | R_ENDOFWORD 0x0004
End of word. See also the section The notion of word in CSDK.
#define | R_ENDOFZONE 0x0008
End of zone. See also the section End-position letters.
#define | R_ENDOFPAGE 0x0010
End of page.
#define | R_ENDOFCELL 0x0020
End of table cell. See also the section End-position letters.
#define | R_ENDOFROW 0x0040
End of the last line of the last filled cell in a table row. See also the section End-position letters.
#define | R_INTABLE 0x0080
Letter is in a table cell.
#define | R_TEXT_DIR_MASK 0x0700
Mask of text direction in makeup field.
#define | R_TEXT_ORIENT_MASK 0x0300
Mask of text orientation in makeup field.
#define | R_NORMTEXT 0
Horizontal text.
#define | R_VERTTEXT 0x0100
Vertical text (CCJK) or neon text (Latin) or upside-down barcode.
#define | R_LEFTTEXT 0x0200
Left rotated / orientation is upward (including left rotated barcode)
#define | R_RIGHTTEXT 0x0300
Right rotated / orientation is downward (including right rotated barcode)
#define | R_RTLTEXT 0x0400
Character from a right-to-left direction word. See the section Right-to-left language support.
#define | R_ENDOFLINE_CR 0x4000
Used in barcodes only: End-of-line code is CR.
#define | R_ENDOFLINE_LF 0x8000
Used in barcodes only: End-of-line code is LF. Both flags specified means CRLF.

Space type values

Possible space types (LSPC).

#define | SPC_SPACE 0
Real space.
#define | SPC_TAB 1
Tabular.
#define | SPC_LEADERDOT 2
Dot leader.
#define | SPC_LEADERLINE 3
Line leader.
#define | SPC_LEADERHYPHEN 4
Hyphen leader.

Macros of alternatives of the LETTER

Macros can be used for processing the alternatives of each LETTER. See also usage of usage of alternatives.

#define | GETFIRSTALTERN(stringstart, ndx) (((const WCHAR*)((stringstart)+(ndx)))+1)
Getting the first alternative.
#define | GETALTERNLENGTH(str) ((str)[-1])
Getting the length of the alternative.
#define | GETNEXTALTERN(str) ((str)+GETALTERNLENGTH(str)+2)
Getting the next alternative.

Defines of confidence handling of the LETTER

See confidence handling and LETTER::err.

#define | RE_SUSPECT_WORD 0x80
The word is declared suspicious by the recognition engine if the dictionary (if any) does not contain it. This flag does not necessarily reflect whether the word is a dictionary word or not.
#define | RE_SUSPECT_THR 64
Suspect threshold: if the lower 7 bits of LETTER::err represent a value at or above this (up to 100) it means low confidence.
#define | RE_ERROR_LEVEL_MASK ~RE_SUSPECT_WORD
Mask for getting the error level of the current letter.

Detailed Description

Letter handling tools.

Recognized data is stored in the current HPAGE and it is available as an array of LETTER structures providing significantly more information than the character code itself. This type of output offers the most detailed information on recognition. The information stored in a LETTER structure may belong to the character itself (character code, position, size, confidence level, font attributes, font face, choices, color) or to the word containing the character (suggestions, languages). Word-level information is set in the first LETTER of the word.

NOTE: In both the SDK and its documentation, coordinates refer to grid-coordinates - i.e. the top or left borders of pixels. Thus a rectangle does not contain the pixels according to its right and bottom coordinates.

Handling of spaces

Spaces have a special role in the text, thus their handling is also special. There are two kinds of spaces in the recognition result.

One of them is the space-like character. It really appears in the original text and it is represented with a LETTER having a space character in its code field and an LSPC structure containing information about this character. The SPACE and TAB characters and the leaders belong to this type. The spcCount field of LSPC cotains the number of characters encoded as this single "space" code. Note that spcCount can be 0 also, meaning an unspecified number of spaces. (It could be treated as 1 space.)

The other kind of space is the dummy space. It does not appear in the original text, but it has an individual LETTER object. A special feature of this character is that its width is 0. This dummy space indicates the end of the line, the R_ENDOFLINE flag is added to this dummy character.

In rare cases, there is no dummy character at the end of a line: it may happen only when the last character in the line is a hyphen. The lack of the dummy space indicates that the last word of this line and the first word of the next line should be logically combined to a single hyphenated word. The R_ENDOFLINE flag is placed on the hyphen in this case. (Note that the info field's RR_SOFTHYPHEN bit is true for such hyphens.)

Barcode module (BAR) has a special binary recognition mode, when the recognition result contains binary data (not a text). (See the setting Kernel.OcrMgr.BarBinary and binary output section for more information.) In this case the content of the barcode is logically one word in one line, but a dummy end-of-line space is appended even to that sequence.

The notion of word in CSDK

The last letter (maybe punctuation character or digit) of a word is the LETTER having an R_ENDOFWORD flag. The beginning of a word is the first non-space character after the previous word (or the very first item of the LETTER array). The flag R_ENDOFLINE does not play a role in determining word boundaries (e.g. hyphenation).

Special cases:

  • Inside a word there may be spaces. In an expanded text all the letters are followed by a space.
  • In some cases there are no spaces between two words. Examples are words connected with a dash (like Jean-Pierre or drag-and-drop). In such cases the middle R_ENDOFWORD flag is on the character before the dash. This kind of dash is not marked with RR_SOFTHYPHEN even if the dash is at end of line.
  • Hyphenated words are treated as one, there is no R_ENDOFWORD before the hyphen. The hyphen's LETTER::info field has the RR_SOFTHYPHEN flag.

Word-related information (like the language of a word or RE_SUSPECT_WORD, etc.) is specified on all the characters of the word. The only exception is suggestion handling where suggestions are attached to the first character of the word only. (Note that suggestion handling uses a different word notion: space-separated words.)

End-position letters

The letters in ending positions are marked with particular flags. See above section for details about end of word. The end of line flag in a flowing text is generally on the above mentioned dummy space. However, if the last character of a line is a hyphen in a hyphenated word, the flag R_ENDOFLINE is placed on the hyphen and the dummy space is missing from this line.

In a table the situation of end-position flags is more difficult. The next figure shows all the possible situations of the R_ENDOFLINE (L), R_ENDOFCELL (C), R_ENDOFROW (R) and R_ENDOFZONE (Z) flags in a table.

text L,C | text L,C | text L,C,R
text L,C | more L lines in L a cell L,C,R |
two-line L text L,C |  | text L,C,R
 | last filled L cell L,C,R,Z |

The R_ENDOFLINE_CR and R_ENDOFLINE_LF flags may supplement the R_ENDOFLINE flag. They are placed only on a barcode's end-position letters (that are dummy spaces) when the barcode has multiple lines. These flags indicate what kind of EOL code is encoded in the barcode at that position (CR: 0x0d, LF: 0x0a, or the CRLF: 0x0d 0x0a sequence).

Barcode data may also contain runs of EOL codes, i.e. empty lines. In the LETTER array it is implemented as multiple dummy spaces (in normal, non-binary mode). Each dummy space has the R_ENDOFLINE flag with the above supplementary CR and/or LF flags.

Usage of alternatives

The common name for LETTER choices and word suggestions is 'alternatives'. You can use different alternatives similarly. They can be accessed through special WCHAR typed arrays. Every single alternative is a special string with its size in its 0th WCHAR element and an ending zero WCHAR. You can get WCHAR arrays listing of all alternatives in the recognition data - one for choices and one for suggestions. Use the functions kRecGetChoiceStr, and kRecGetSuggestionStr, respectively.

One LETTER contains an index to the list of the alternatives that points to its first alternative and has a counter with the number of its alternatives. All LETTERs can have choices (LETTER::ndxChoices), but only the first LETTER of a word refers to the suggestions (LETTER::ndxSuggestions). The scope of such a suggestion is the space-terminated word. (Note that it can differ from the end of the word notion used by spelling.)

The alternatives of a LETTER can be enumerated using the macros GETFIRSTALTERN, GETNEXTALTERN and GETALTERNLENGTH. See the following sample code on how to use them:

RECERR err;
HPAGE hPage;
LETTER *pLetters;
WCHAR *pChoices;
LONG nLetters, choiceStrLen;
...
err = kRecGetLetters(hPage, II_CURRENT, &pLetters, &nLetters);
if (err != REC_OK)
... // Doing some error handling
...
err = kRecGetChoiceStr(hPage, &pChoices, &choiceStrLen);
if (err != REC_OK)
... // Doing some error handling
for (LONG lettn=0; lettn<nLetters; lettn++)
{
...
const WCHAR *choice = GETFIRSTALTERN(pChoices, pLetters[lettn].ndxChoices);
for (BYTE chon=0; chon<pLetters[lettn].cntChoices; chon++)
{
... // Doing some choice handling
choice = GETNEXTALTERN(choice);
}
...
}
...
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
REC_OK
@ REC_OK
Successful operation, no error.
Definition RECERR_doc.h:20
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
II_CURRENT
@ II_CURRENT
Definition KernelApi.h:1001
GETFIRSTALTERN
#define GETFIRSTALTERN(stringstart, ndx)
Getting the first alternative.
Definition KernelApi.h:1898
GETNEXTALTERN
#define GETNEXTALTERN(str)
Getting the next alternative.
Definition KernelApi.h:1900
kRecGetChoiceStr
RECERR RECAPIKRN kRecGetChoiceStr(HPAGE hPage, WCHAR **ppChoices, LPLONG pLength)
Getting choices.
kRecGetLetters
RECERR RECAPIKRN kRecGetLetters(HPAGE hPage, IMAGEINDEX iiImage, LPLETTER *ppLetter, LPLONG pLettersLength)
Getting recognition result.
LETTER
The LETTER structure.
Definition KernelApi.h:1932
LETTER::cntChoices
BYTE cntChoices
Definition KernelApi.h:1951
LETTER::err
BYTE err
Definition KernelApi.h:1947

Consecutive words can have the same suggestion indices - that is, the given suggestions are common to the group of the given words. This is the case when the suggestion combines two space-separated words into a single one without the space.

Since the first LETTER of a word cannot be a space, spaces do not have suggestions, but they have space information (LSPC) in the same union type (see above for more information about space handling).

Font faces can be accessed in a string of C-type strings. The LETTER indexes into this string at the first character of its font face name.

Enumeration Type Documentation

◆ LETTERSTRENGTH

enum LETTERSTRENGTH

Possible places where letter array is to be copied to.

Enumerator
LTS_FINAL | Letters are put directly onto the input of the output conversion step.
LTS_STRONG | Letters are put onto the strong input of the PLUS2W and PLUS3W engines.
LTS_MEDIUM | Letters are put onto the medium input of the PLUS2W and PLUS3W engines.
LTS_WEAK | Letters are put onto the weak input of the PLUS3W engine.
LTS_SIZE | Number of LETTER indices (for verifying index validity).

Function Documentation

◆ kRecFreeRecognitionData()

RECERR RECAPIKRN kRecFreeRecognitionData ( HPAGE hPage )

Freeing recognition data.

The kRecFreeRecognitionData function destroys the recognized data (memory object) belonging to the hPage page.

Parameters
[in] hPage Handle of the page having the data to be removed.
Return values
RECERR
Note
The effect of this call is the same as if the application had not called the kRecRecognize function.
The specification of this function in C# is:
RECERR kRecFreeRecognitionData(IntPtr hPage);
kRecFreeRecognitionData
RECERR RECAPIKRN kRecFreeRecognitionData(HPAGE hPage)
Freeing recognition data.
The specification of this function in Java is:
int kRecFreeRecognitionData(HPAGE hPage)
The specification of this function in Python is:
def kRecFreeRecognitionData(hPage: "HPAGE") -> int

◆ kRecGetChoiceStr()

RECERR RECAPIKRN kRecGetChoiceStr | ( | HPAGE | hPage,
 |  | WCHAR ** | ppChoices,
 |  | LPLONG | pLength )

Getting choices.

The kRecGetChoiceStr function makes the alternative letter choices data belonging to the hPage page available to the application by creating a new memory object. This function can be called after a successful kRecRecognize call. The retrieved data is available as an array of WCHAR structures. For more about its internal structure see the usage of alternatives. A LETTER contains the number of its choices and an index into this array on the first choice (LETTER::cntChoices, LETTER::ndxChoices).

Parameters
[in] | hPage | Handle of the page whose recognized data should be accessed.
[out] | ppChoices | Address of a pointer variable to get the array of the recognized alternative characters and ligatures.
[out] | pLength | Pointer to a variable to hold the length of recognized alternative characters.
Return values
RECERR
Note
Since this function creates a new memory object, the application should call the kRecFree function to free this memory area after evaluating the result.
The specification of this function in C# is:
RECERR kRecGetChoiceStr(IntPtr hPage, out char[] ppChoices);
The specification of this function in Java is:
int kRecGetChoiceStr(HPAGE hPage, Choices ppChoices)
The specification of this function in Python is:
def kRecGetChoiceStr(hPage: "HPAGE", ppChoices: "Choices") -> int

◆ kRecGetFontFaceStr()

RECERR RECAPIKRN kRecGetFontFaceStr | ( | HPAGE | hPage,
 |  | char ** | ppFontFaces,
 |  | LPLONG | pLength )

Getting font faces.

The kRecGetFontFaceStr function makes the font face data belonging to the hPage page available to the application by creating a new memory object. This function can be called after a successful kRecRecognize call. The retrieved data is available as an array of char strings. A LETTER contains an index into this array on its font face (LETTER::ndxFontFace).

Parameters
[in] | hPage | Handle of the page whose recognized data should be accessed.
[out] | ppFontFaces | Address of a pointer variable to get the UTF-8 string of the recognized font faces.
[out] | pLength | Pointer to a variable to hold the length of recognized font face string.
Return values
RECERR
Note
Font face information is available only at processing PDF files with accessible text layer.
Since this function creates a new memory object, after evaluating the result, the application should call the kRecFree function to free this memory area.
The specification of this function in C# is:
RECERR kRecGetFontFaceStr(IntPtr hPage, out char[] ppFontFaces);
kRecGetFontFaceStr
RECERR RECAPIKRN kRecGetFontFaceStr(HPAGE hPage, char **ppFontFaces, LPLONG pLength)
Getting font faces.
The specification of this function in Java is:
int kRecGetFontFaceStr(HPAGE hPage, FontFaces ppFontFaces)
The specification of this function in Python is:
def kRecGetFontFaceStr(hPage: "HPAGE", ppFontFaces: "FontFaces") -> int

◆ kRecGetLetterPalette()

RECERR RECAPIKRN kRecGetLetterPalette | ( | HPAGE | hPage,
 |  | REC_COLOR ** | ppColours,
 |  | LPLONG | pNum )

Getting palette of recognition data.

This function makes the palette of the recognition data belonging to the hPage page available to the application by creating a new memory object. This function can be called after a successful kRecRecognize call. It contains both the foreground and background colors of the letters. The LETTER structure has indices into this array for foreground and background colors (LETTER::ndxFGColor, LETTER::ndxBGColor).

Parameters
[in] | hPage | Handle of the page whose recognized data should be accessed.
[out] | ppColours | Address of a pointer variable to get the address of the palette array.
[out] | pNum | Pointer to a variable to hold the number of colors in palette.
Return values
RECERR
Note
Palette can contain the special REC_COLOR values REC_DEFAULT_COLOR and REC_UNDEF_COLOR. Background color can be both, they mean white. Foreground color can be REC_DEFAULT_COLOR, which means black.
Since this function creates a new memory object, the application should call the kRecFree function to free this memory area after evaluating the result.
The specification of this function in C# is:
RECERR kRecGetLetterPalette(IntPtr hPage, out uint[] ppColours);
kRecGetLetterPalette
RECERR RECAPIKRN kRecGetLetterPalette(HPAGE hPage, REC_COLOR **ppColours, LPLONG pNum)
Getting palette of recognition data.
The specification of this function in Java is:
int kRecGetLetterPalette(HPAGE hPage, RecColorArray ppColours)
The specification of this function in Python is:
def kRecGetLetterPalette(hPage: "HPAGE") -> Tuple[int, "UIntArray"]

◆ kRecGetLetters()

RECERR RECAPIKRN kRecGetLetters | ( | HPAGE | hPage,
 |  | IMAGEINDEX | iiImage,
 |  | LPLETTER * | ppLetter,
 |  | LPLONG | pLettersLength )

Getting recognition result.

The kRecGetLetters function makes the recognition data belonging to the hPage page available to the application by creating a new memory object containing the recognized data. This function can be called after a successful kRecRecognize call. The recognized data is available as an array of LETTER structures.

Parameters
[in] | hPage | Handle of the page whose recognized data should be accessed.
[in] | iiImage | Index of the image in the page, in which the coordinates are needed to be given.
[out] | ppLetter | Address of a pointer variable to get the address of the recognized characters.
[out] | pLettersLength | Pointer to a variable to hold the number of recognized characters.
Return values
RECERR
Note
Since this function creates a new memory object containing the recognized data, the application should call the kRecFree function to free this memory area after evaluating the result.
The specification of this function in C# is:
RECERR kRecGetLetters(IntPtr hPage, IMAGEINDEX iiImage, out LETTER[] ppLetter);
IMAGEINDEX
IMAGEINDEX
Index of each image type in HPAGE.
Definition KernelApi.h:991
The specification of this function in Java is:
int kRecGetLetters(HPAGE hPage, IMAGEINDEX iiImage, LetterArray ppLetter)
The specification of this function in Python is:
def kRecGetLetters(hPage: "HPAGE", iiImage: int) -> Tuple[int, "LetterArray"]

◆ kRecGetSuggestionStr()

RECERR RECAPIKRN kRecGetSuggestionStr | ( | HPAGE | hPage,
 |  | WCHAR ** | ppSuggestions,
 |  | LPLONG | pLength )

Getting suggestions.

The kRecGetSuggestionStr function makes the word suggestions data belonging to the hPage page available to the application by creating a new memory object. This function can be called after a successful kRecRecognize call. The retrieved data is available as an array of WCHAR structures. For more about its internal structure see the usage of alternatives. The first LETTER of a word contains the number of word choices and an index into this array on the first suggestion (LETTER::cntSuggestions, LETTER::ndxSuggestions).

Parameters
[in] | hPage | Handle of the page whose recognized data should be accessed.
[out] | ppSuggestions | Address of a pointer variable to get the array of the recognized suggestions.
[out] | pLength | Pointer to a variable to hold the length of recognized suggestions.
Return values
RECERR
Note
Since this function creates a new memory object, the application should call the kRecFree function to free this memory area after evaluating the result.
If the letter is a space, it does not have suggestions, but only space info (see LETTER::spcInfo and LSPC).
The specification of this function in C# is:
RECERR kRecGetSuggestionStr(IntPtr hPage, out char[] ppSuggestions);
kRecGetSuggestionStr
RECERR RECAPIKRN kRecGetSuggestionStr(HPAGE hPage, WCHAR **ppSuggestions, LPLONG pLength)
Getting suggestions.
The specification of this function in Java is:
int kRecGetSuggestionStr(HPAGE hPage, Suggestions ppSuggestions)
The specification of this function in Python is:
def kRecGetSuggestionStr(hPage: "HPAGE", ppSuggestions: "Suggestions") -> int

◆ kRecSetLetters()

RECERR RECAPIKRN kRecSetLetters | ( | LETTERSTRENGTH | towhere,
 |  | HPAGE | hPage,
 |  | IMAGEINDEX | iiImage,
 |  | LPCLETTER | pLetter,
 |  | LONG | LettersLength )

Putting a letter buffer onto the input of the PLUS2W and PLUS3W engines or the selected output converter.

This function can affect the recognition results and/or the content of the output file. The PLUS modules are voting engines combining results of two or three other OCR engines. The voting method of RM_OMNIFONT_PLUS2W has strong and medium inputs, RM_OMNIFONT_PLUS3W uses an additional weak one as well. You can replace one input (parameter towhere) with your alternative engine result by calling the function kRecSetLetters. The voting method uses your letter buffer as it generates the final OCR result. Stronger input may have greater effect on the recognition result, so you should consider which level you select for your letter buffer.

Passing the letter buffer on the level LTS_FINAL the OCR method does not run, because in this level kRecSetLetters works similarly as in previous versions of CSDK, i.e. the letters are given directly to the input of the selected output converter.

Parameters
[in] | towhere | This parameter specifies one of the three possible inputs of the Voting Engine, on which the engine receives the letter buffer.
[in] | hPage | Handle of the HPAGE the Voting Engine works on.
[in] | iiImage | Index of the image in the page whose coordinate system you have used in defining the boundary box for LETTER.
[in] | pLetter | The letter buffer to be given to the engine.
[in] | LettersLength | Size of the letter buffer.
Return values
RECERR
Note
After putting letters on the selected levels (even on LTS_FINAL), you should call kRecRecognize.
More than one input way of the PLUS engines can be replaced with subsequent calls for kRecSetLetters. Even in such a case, kRecRecognize should be called only once.
The following fields of input LETTERs are unused during kRecRecognize: cntChoices, ndxChoices, cntSuggestions, ndxSuggestions, reserved_b, ndxFGColor, ndxBGColor, ndxFontFace, ndxExt and OCRENGINE bits (RH_OCRENGINE_MASK) of info. These fields are cleared and the original order of LETTERs may be altered after using this function.
The specification of this function in C# is:
RECERR kRecSetLetters(LETTERSTRENGTH towhere, IntPtr hPage, IMAGEINDEX iiImg, LETTER[] lpLetter);
kRecSetLetters
RECERR RECAPIKRN kRecSetLetters(LETTERSTRENGTH towhere, HPAGE hPage, IMAGEINDEX iiImage, LPCLETTER pLetter, LONG LettersLength)
Putting a letter buffer onto the input of the PLUS2W and PLUS3W engines or the selected output conver...
LETTERSTRENGTH
LETTERSTRENGTH
Possible places where letter array is to be copied to.
Definition KernelApi.h:5983
The specification of this function in Java is:
int kRecSetLetters(LETTERSTRENGTH towhere, HPAGE hPage, IMAGEINDEX iiImage, LETTER[] pLetter)
The specification of this function in Python is:
def kRecSetLetters(towhere: "LETTERSTRENGTH", hPage: "HPAGE", iiImage: int, pLetter: "LETTER") -> int


RecAPI: LSPC Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
LSPC Struct Reference
KernelAPI » Recognition Data Handling Module

Additional information about the space character. More...

#include <KernelApi.h>

Public Attributes

WORD | spcCount
BYTE | spcType
BYTE | Res

Detailed Description

Additional information about the space character.

Member Data Documentation

◆ Res

BYTE LSPC::Res

Unused

◆ spcCount

WORD LSPC::spcCount

Number of spaces.

◆ spcType

BYTE LSPC::spcType

See section 'Space type values' of group 'Letter'.


RecAPI: LETTER Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
LETTER Struct Reference
KernelAPI » Recognition Data Handling Module

The LETTER structure. More...

#include <KernelApi.h>

Public Attributes

WORD | left
WORD | top
WORD | width
WORD | height
float | pointSize
WORD | capHeight
WORD | baseLine
WORD | zone
WCHAR | code
BYTE | err
BYTE | reserved_b
BYTE | cntChoices
BYTE | cntSuggestions
DWORD | ndxChoices
WORD | fontAttrib
WORD | ndxFontFace
DWORD | info
WORD | makeup
BYTE | widthULdot
BYTE | widthULgap
WORD | cellNum
BYTE | ndxFGColor
BYTE | ndxBGColor
short | lang
short | lang2
DWORD | ndxExt

Detailed Description

The LETTER structure.

This is a recognized data structure. As the result of the recognition process the recognition data will consist of this type of structure for each recognized character. This is the most detailed information available about the recognized characters.

See the usage of alternatives and handling of spaces.

Note
The field pointSize is not a replacement for the field fontSize in the CSDK versions 12.x (that's the cause of the name change):
  • pointSize is filled only on textual PDF inputs. For others, it is used only internally during page formatting (only at RecApiPlus level).
  • capHeight is always available and could be used for replacing fontSize. Rough approximation: fontSize = capHeight * 100 / dpi (fontSize in CSDK 12.7 is calculated in this way).
The position and size information (left, top, width, height, capHeight, baseLine, widthULdot, widthULgap) is expressed in pixel coordinates mapped to the image specified when getting the letters.
The bounding box (left, top, width, height) of a character usually contains that single character only, but sometimes more characters are recognized together in one step, in which case all those characters have the same bounding box.

Member Data Documentation

◆ baseLine

WORD LETTER::baseLine

Y coordinate of the baseline in pixels. In case of vertical text this is an X coordinate. In CCJK vertical text the baseline is at the middle of the characters by definition. In case of barcodes this coordinate is independent of the direction of the barcode, it is always the Y coordinate of the bottom of the barcode.

◆ capHeight

WORD LETTER::capHeight

Expresses a measure of the capital letter height in pixels. See notes for more info!

◆ cellNum

WORD LETTER::cellNum

Index of the cell in the cell list which contains the character (applicable only for WT_TABLE zones). Index of the text-line form-element object which contains the character (in case of WT_FORM zones).

◆ cntChoices

BYTE LETTER::cntChoices

Number of related choices continuously placed in the external choice string.

◆ cntSuggestions

BYTE LETTER::cntSuggestions

Number of related suggestions continuously placed in the external suggestion array.

◆ code

WCHAR LETTER::code

Character code in 16-bit UNICODE. This is the first choice of the recognition or UNICODE_REJECTED for rejected characters.

◆ err

BYTE LETTER::err

Confidence number expressing both the first guess' recognition certainty (code member) and also the word certainty. For more information see the section confidence reporting.

◆ fontAttrib

WORD LETTER::fontAttrib

Font information about the recognized character. Used by the OCR engines. See its possible bits.

◆ height

WORD LETTER::height

Height of the character rectangle in pixels.

◆ info

DWORD LETTER::info

Additional information about the character. See its possible bits and the macros for easier handling this information.

◆ lang

short LETTER::lang

This is used to declare which language the recognized word belongs to. See Language of a word.

◆ lang2

short LETTER::lang2

See field lang.

◆ left

WORD LETTER::left

Left boundary of the rectangle containing the character in pixels.

◆ makeup

WORD LETTER::makeup

Since the recognition data does not contain extra characters for marking the line ends, paragraphs, pages, etc., these items of information are stored for the particular characters in this field. It can be any binary OR-ed combination of the possible formatting attributes.

◆ ndxBGColor

BYTE LETTER::ndxBGColor

Index of the background color within the palette of the recognition data. See kRecGetLetterPalette.

◆ ndxChoices

DWORD LETTER::ndxChoices

Index of the second choice in the external choice string.

◆ ndxExt

DWORD LETTER::ndxExt

Not documented.

◆ ndxFGColor

BYTE LETTER::ndxFGColor

Index of the foreground color within the palette of the recognition data. See kRecGetLetterPalette.

◆ ndxFontFace

WORD LETTER::ndxFontFace

Index of the logical font definition placed in an external font array.

◆ ndxSuggestions

DWORD LETTER::ndxSuggestions

If this LETTER is not a space, this member is the index of the first suggestion in the external suggestion string. (This member makes a union together with spcInfo.)

◆ pointSize

float LETTER::pointSize

Font size in points. See notes for more info!

◆ reserved_b

BYTE LETTER::reserved_b

Internal use only.

◆ spcInfo

LSPC LETTER::spcInfo

If this LETTER is a space additional information is available here. (This member makes a union together with ndxSuggestions.)

◆ top

WORD LETTER::top

Top boundary of the rectangle containing the character in pixels.

◆ width

WORD LETTER::width

Width of the character rectangle in pixels. See also the section Handling of spaces about 0-width spaces.

◆ widthULdot

BYTE LETTER::widthULdot

Width of a dot in pixels if the "underline" is underdots in reality. 0 if simple underline, 0 if nothing. It also gives this information in the case of dotleaders. (See LSPC.)

◆ widthULgap

BYTE LETTER::widthULgap

Width of a gap in pixels if the "underline" is underdots in reality. 0 if simple underline, 0 if nothing. It also gives this information in the case of dotleaders. (See LSPC.)

◆ zone

WORD LETTER::zone

Index of the zone in the zone list which contains the character.


RecAPI: Language, Character Set and Code Page Handling Module

Classes | Macros | Typedefs | Enumerations | Functions
Language, Character Set and Code Page Handling Module
KernelAPI

Language, Character Set and Code Page Handling Module. More...

Classes

struct LANGUAGE_INFO
Language info. More...

Macros

#define | UNICODE_REJECTED 0x0fffd
The rejected symbol in Unicode strings. See kRecSetRejectionSymbol and kRecGetRejectionSymbol.
#define | UNICODE_MISSING 0x0fffc
The missing symbol in Unicode strings. See kRecSetMissingSymbol and kRecGetMissingSymbol.
#define | MAXCPNAMELEN 32
Maximal buffer length needed for Code Page name.

Typedefs

typedef enum LANG_ENA | LANG_ENA
Language enable/disable.
typedef enum OUTCODEPAGETYPE | OUTCODEPAGETYPE
Code page types.
typedef OUTCODEPAGETYPE * | LPOUTCODEPAGETYPE
Pointer to an OUTCODEPAGETYPE.

Enumerations

enum CHR_FILTER {
FILTER_DEFAULT = 0 ,
FILTER_DIGIT = 1 ,
FILTER_UPPERCASE = 2 ,
FILTER_LOWERCASE = 4 ,
FILTER_PUNCTUATION = 8 ,
FILTER_MISCELLANEOUS = 16 ,
FILTER_PLUS = 32 ,
FILTER_PLUS_1 = 128 ,
FILTER_PLUS_2 = 256 ,
FILTER_PLUS_3 = 512 ,
FILTER_USER_DICT = 64 ,
FILTER_WESTERN = 1024 ,
FILTER_ALL ,
FILTER_ALPHA = (FILTER_UPPERCASE | FILTER_LOWERCASE) ,
FILTER_NUMBERS = (FILTER_DIGIT | FILTER_PLUS) ,
FILTER_SIZE = 2048
}
Recognition filters. More...
enum LANG_ENA {
LANG_DISABLED = 0 ,
LANG_ENABLED
}
Language enable/disable. More...
enum MANAGE_LANG {
SET_LANG = 0 ,
ADD_LANG ,
REMOVE_LANG ,
INVERT_LANG ,
IS_LANG_ENABLED
}
Language management actions. More...
enum LANGUAGES {
LANG_ALL = -1024 ,
LANG_ALL_LATIN = -1023 ,
LANG_ALL_ASIAN = -1022 ,
LANG_START = -3 ,
LANG_UD = -3 ,
LANG_AUTO = -2 ,
LANG_NO = -1 ,
LANG_ENG = 0 ,
LANG_GER ,
LANG_FRE ,
LANG_DUT ,
LANG_NOR ,
LANG_SWE ,
LANG_FIN ,
LANG_DAN ,
LANG_ICE ,
LANG_POR ,
LANG_SPA ,
LANG_CAT ,
LANG_GAL ,
LANG_ITA ,
LANG_MAL ,
LANG_GRE ,
LANG_POL ,
LANG_CZH ,
LANG_SLK ,
LANG_HUN ,
LANG_SLN ,
LANG_CRO ,
LANG_ROM ,
LANG_ALB ,
LANG_TUR ,
LANG_EST ,
LANG_LAT ,
LANG_LIT ,
LANG_ESP ,
LANG_SRL ,
LANG_SRB ,
LANG_MAC ,
LANG_MOL ,
LANG_BUL ,
LANG_BEL ,
LANG_UKR ,
LANG_RUS ,
LANG_CHE ,
LANG_KAB ,
LANG_AFR ,
LANG_AYM ,
LANG_BAS ,
LANG_BEM ,
LANG_BLA ,
LANG_BRE ,
LANG_BRA ,
LANG_BUG ,
LANG_CHA ,
LANG_CHU ,
LANG_COR ,
LANG_CRW ,
LANG_ESK ,
LANG_FAR ,
LANG_FIJ ,
LANG_FRI ,
LANG_FRU ,
LANG_GLI ,
LANG_GLS ,
LANG_GAN ,
LANG_GUA ,
LANG_HAN ,
LANG_HAW ,
LANG_IDO ,
LANG_IND ,
LANG_INT ,
LANG_KAS ,
LANG_KAW ,
LANG_KIK ,
LANG_KON ,
LANG_KPE ,
LANG_KUR ,
LANG_LTN ,
LANG_LUB ,
LANG_LUX ,
LANG_MLG ,
LANG_MLY ,
LANG_MLN ,
LANG_MAO ,
LANG_MAY ,
LANG_MIA ,
LANG_MIN ,
LANG_MOH ,
LANG_NAH ,
LANG_NYA ,
LANG_OCC ,
LANG_OJI ,
LANG_PAP ,
LANG_PID ,
LANG_PRO ,
LANG_QUE ,
LANG_RHA ,
LANG_ROY ,
LANG_RUA ,
LANG_RUN ,
LANG_SAM ,
LANG_SAR ,
LANG_SHO ,
LANG_SIO ,
LANG_SMI ,
LANG_SML ,
LANG_SMN ,
LANG_SMS ,
LANG_SOM ,
LANG_SOT ,
LANG_SUN ,
LANG_SWA ,
LANG_SWZ ,
LANG_TAG ,
LANG_TAH ,
LANG_TIN ,
LANG_TON ,
LANG_TUN ,
LANG_VIS ,
LANG_WEL ,
LANG_WEN ,
LANG_WOL ,
LANG_XHO ,
LANG_ZAP ,
LANG_ZUL ,
LANG_JPN ,
LANG_CHS ,
LANG_CHT ,
LANG_KRN ,
LANG_THA ,
LANG_ARA ,
LANG_HEB ,
LANG_VIE ,
LANG_SIZE
}
Possible languages. More...
enum CONTINENT {
C_EUROPE = 0x0001 ,
C_ASIA = 0x0002 ,
C_AFRICA = 0x0004 ,
C_OCEANIA = 0x0008 ,
C_LAMERICA = 0x0010 ,
C_NAMERICA = 0x0020 ,
C_INTERNATIONAL =0x0040 ,
C_EURASIA = C_EUROPE | C_ASIA ,
C_EURNAM = C_EUROPE | C_NAMERICA ,
C_EURLAM = C_EUROPE | C_LAMERICA ,
C_EURNAMOCE = C_EUROPE | C_NAMERICA | C_OCEANIA ,
C_WORLD = C_EUROPE | C_ASIA | C_AFRICA | C_OCEANIA | C_LAMERICA | C_NAMERICA | C_INTERNATIONAL
}
Continent ID. More...
enum BASIC_LANGUAGE_CHARSET {
B_OTH = 0 ,
B_BAS = 1 ,
B_LAT = 2 ,
B_GRE = 4 ,
B_CYR = 8 ,
B_ASN = 16 ,
B_RTL = 32
}
Character set bases. More...
enum RM_FLAGS
Recognition Engines supporting a language. More...
enum LANGUAGE_CODE {
LANGCODE_ALL = 0 ,
LANGCODE_ENGLISH ,
LANGCODE_INT_3 ,
LANGCODE_639_1 ,
LANGCODE_639_2B ,
LANGCODE_639_3 ,
LANGCODE_WIN_3 ,
LANGCODE_BCP_47
}
Language code type. More...
enum OUTCODEPAGETYPE {
CODEP_UNKNOWN = 0 ,
SPECIFIC ,
ASCII_BASED ,
ANSI_BASED ,
MAC_BASED ,
INTERNAL_CP ,
ASIAN_CODEPAGE
}
Code page types. More...

Functions

RECERR RECAPIKRN | kRecSetLanguages (int sid, const LANG_ENA *pLanguages)
Setting languages.
RECERR RECAPIKRN | kRecGetLanguages (int sid, LANG_ENA *pLanguagesOut)
Getting languages.
RECERR RECAPIKRN | kRecManageLanguages (int sid, MANAGE_LANG action, LANGUAGES language)
Managing enabled languages.
RECERR RECAPIKRN | kRecSetSingleLanguageDetection (int sid, INTBOOL bEnable)
Automatic Single Language Detection.
RECERR RECAPIKRN | kRecGetSingleLanguageDetection (int sid, INTBOOL *pbEnable)
Getting the single language detection flag.
RECERR RECAPIKRN | kRecGetPageLanguages (HPAGE hPage, LANG_ENA *pOcrLanguagesOut)
Getting languages of the page.
RECERR RECAPIKRN | kRecGetLanguageInfo (LANGUAGES lang, LANGUAGE_INFO *pInfo)
Getting information about a language.
RECERR RECAPIKRN | kRecFindLanguages (const LANGUAGE_INFO *pInfo, LANG_ENA *pLanguagesOut)
Searching for languages.
RECERR RECAPIKRN | kRecFindLanguage (LPCTSTR pLangName, LANGUAGES *pLanguage)
Searching for languages.
RECERR RECAPIKRN | kRecFindLanguageEx (LANGUAGE_CODE coding, LPCTSTR pLangName, LANGUAGES *pLanguage, LANG_ENA *pLanguagesOut)
Searching for languages.
RECERR RECAPIKRN | kRecSetLanguagesPlus (int sid, LPCWSTR pOcrLplus)
Setting LanguagesPlus characters.
RECERR RECAPIKRN | kRecGetLanguagesPlus (int sid, LPWSTR pOcrLplus, size_t iBSize)
Getting LanguagesPlus characters.
RECERR RECAPIKRN | kRecSetDefaultFilter (int sid, CHR_FILTER Glfilter)
Changing global character set filter.
RECERR RECAPIKRN | kRecGetDefaultFilter (int sid, CHR_FILTER *pGlfilter)
Getting the global character set filter.
RECERR RECAPIKRN | kRecSetFilterPlus (int sid, LPCWSTR pFilterPlus)
Setting FilterPlus characters.
RECERR RECAPIKRN | kRecGetFilterPlus (int sid, LPWSTR pFilterPlus, size_t iSize)
Getting FilterPlus characters.
RECERR RECAPIKRN | kRecSetFilterPlusEx (int sid, int index, LPCTSTR pFilterPlus)
Setting FilterPlus characters, extended.
RECERR RECAPIKRN | kRecSetRejectionSymbol (int sid, WCHAR wRej)
Setting the rejection symbol character.
RECERR RECAPIKRN | kRecGetRejectionSymbol (int sid, LPWCH pwRej)
Getting the rejection symbol character.
RECERR RECAPIKRN | kRecSetMissingSymbol (int sid, WCHAR wMiss)
Setting the missing symbol character.
RECERR RECAPIKRN | kRecGetMissingSymbol (int sid, LPWCH pwMiss)
Getting missing symbol character.
RECERR RECAPIKRN | kRecSetCodePage (int sid, LPCTSTR pCodePageName)
Setting the code page.
RECERR RECAPIKRN | kRecGetCodePage (int sid, LPTSTR pCodePageName, size_t buflen)
Getting the code page name.
RECERR RECAPIKRN | kRecGetCodePageInfo (LPCTSTR pCodePageName, LPTSTR pDesc, size_t size, LPOUTCODEPAGETYPE pCodePageType)
Getting information about the code page.
RECERR RECAPIKRN | kRecCheckCodePage (int sid, LPWSTR pMissingChrs, size_t buflen)
Checking the code page.
RECERR RECAPIKRN | kRecGetFirstCodePage (LPTSTR pCodePageName, size_t buflen)
Starting enumeration of code pages.
RECERR RECAPIKRN | kRecGetNextCodePage (LPTSTR pCodePageName, size_t buflen)
Performing enumeration of code pages.
RECERR RECAPIKRN | kRecConvertCodePage2Unicode (int sid, const LPBYTE pInput, size_t *pInputLen, LPWCH pUniCode)
Converting from the current code page to 16-bit UNICODE.
RECERR RECAPIKRN | kRecConvertUnicode2CodePage (int sid, WCHAR UniCode, LPBYTE pOutput, size_t *pOutputLen)
Converting from 16-bit UNICODE to the current code page.
RECERR RECAPIKRN | kRecConvertCodePage2UnicodeEx (int sid, const char *pInput, size_t *pInputLen, WCHAR **ppOutput, size_t *pOutputCount, int flags)
Converting a character or a string from a code page to 16-bit UNICODE.
RECERR RECAPIKRN | kRecConvertUnicode2CodePageEx (int sid, const WCHAR *pInput, size_t *pInputCount, char **ppOutput, size_t *pOutputLen, int flags)
Converting a 16-bit UNICODE character or string to a code page.

Codepage Conversion Mode flags for extended code page conversion

These flags describe the way how the extended code page conversion functions kRecConvertCodePage2UnicodeEx and kRecConvertUnicode2CodePageEx work. One of the

CCM_CP_*

flags is to be combined with one of the CCM_CONV_* flags. There is one pre-combined flag for the most frequently used case (

CCM_UTF8_STRING
CCM_UTF8_STRING
#define CCM_UTF8_STRING
Combined flag for UTF-8 strings.
Definition KernelApi.h:12842

).

#define | CCM_CP_CURRENT 0x01
Use the current code page for conversion.
#define | CCM_CP_UTF8 0x02
Use the UTF-8 code page for conversion.
#define | CCM_CP_ANSI 0x03
Use the ANSI code page (CP 1252) for conversion.
#define | CCM_CONV_CHAR 0x10
Convert a single character only.
#define | CCM_CONV_STRING 0x20
Convert the full zero terminated string.
#define | CCM_UTF8_STRING (CCM_CP_UTF8 | CCM_CONV_STRING)
Combined flag for UTF-8 strings.

Detailed Description

Language, Character Set and Code Page Handling Module.

This module handles language, character set and code page related settings and their combinations.

The processing language must be specified before calling any processing function on a page. You may define one or more languages with the kRecSetLanguages or kRecManageLanguages functions. The languages specify both the set of characters to recognize and - if spell checking is enabled - the dictionaries to use. If more than one language is enabled automatic language detection is done. Automatic detection has two working modes:

  • The default mode is suitable for few (around at most 5) languages and designed to work on pages which contain text in all of the enabled languages.
  • The Single Language Detection mode (enabled with the kRecSetSingleLanguageDetection function) is designed for unattended scanning or document input scenarios, where the language of arriving documents cannot be predicted.

CCJK and Arabic languages can be recognized one language at a time only (but English characters are automatically enabled), so only the second, Single Language Detection mode is supported when more than one CCJK languages and/or the Arabic one are enabled.

NOTE: Single Language Detection of Vietnamese, Thai and Hebrew languages are not supported. Very clean documents in Greek, Russian and other Cyrillic languages can be processed with Single Language Detection, but making your application depend on automatic detection of these languages is not encouraged.

The structure LANGUAGE_INFO provides information about a selected language and particular abbreviations of its name. This module supports the CSDK internal language codes and the following language code standards: ISO/DIS 639-1, ISO/DIS 639-2/B, ISO/DIS 639-3, BCP 47 and Windows 3-letter language codes. See the list of language identifiers for details.

In the ISO 639-3 standard there are languages missing. CSDK defines additional local identifiers for them as follows:

qsl | Serbian (Latin)
qbp | Brazilian
qes | Eskimo
qti | Pirez
qcs | Chinese (Simplified)
qct | Chinese (Traditional)

CSDK extends the ISO 639-3 standard with the following codes coming from ISO 639-2/B:

SMI Sami languages

See the list of language identifiers for even more details about the supported standards and language identifiers.

Code pages

The current code page is specified by the setting Kernel.Chr.CodePage. Its default value is -1 meaning "Auto". Auto code page means the current code page comes from the setting Kernel.Chr.CodePage.Default. The default value of this latter setting on Windows is the code page of the current OS, on Linux and MacOS it is UTF-8. The kRecGetCodePage function can be used to learn this default value.

Current Windows OSs already support UTF-8 very well, so we suggest to use UTF-8 for all languages on all platforms. Use

kRecSetCodepage(sid, "UTF-8")
See also
Settings of the Character and Code Page Handling Module
Language, Character Set and Code page Handling Module related pages

Typedef Documentation

◆ LANG_ENA

typedef enum LANG_ENA LANG_ENA

Language enable/disable.

This defines the possible values for the language selection in the Language environment definition. This is supplied by the enum LANGUAGES and used by the function kRecSetLanguages.

Note
The Character Set is primarily defined by the Language environment specified by kRecSetLanguages. If no language is enabled, only the digits, language-independent punctuation and the miscellaneous characters are validated. Whenever at least one language is enabled (i.e. gets the LANG_ENABLED value), the unaccented lower and uppercase Latin-alphabet characters are validated in addition to the accented lower and uppercase letters defined for the enabled language(s). Language-specific punctuation is enabled with the language concerned. At present these only include the inverted question mark and inverted exclamation mark for Spanish.
To change the language selection, create a LANG_SIZE sized array with this LANG_ENA type. Initialize all elements to LANG_DISABLED, enable the required languages and pass the array to the kRecSetLanguages function.
To enable a single language only, use the kRecManageLanguages function. That function is useful in other cases as well; see its description.

◆ OUTCODEPAGETYPE

typedef enum OUTCODEPAGETYPE OUTCODEPAGETYPE

Code page types.

Each output code page is classified into one of these categories.

Enumeration Type Documentation

◆ BASIC_LANGUAGE_CHARSET

enum BASIC_LANGUAGE_CHARSET

Character set bases.

Basic character set types of languages. See LANGUAGE_INFO.

Enumerator
B_OTH | Internal use only.
B_BAS | Internal use only.
B_LAT | Latin alphabet-based language.
B_GRE | Greek language.
B_CYR | Cyrillic alphabet-based language.
B_ASN | An Asian language.
B_RTL | Right-to-left language (Arabic, Hebrew, ..).

◆ CHR_FILTER

enum CHR_FILTER

Recognition filters.

This enum lists available Character Set filter elements. Language environment can be narrowed down by specifying Character Set filters. The name of each filter element denotes the category of characters it validates. A filter is built from one or more filter elements by combining (binary OR-ing) them. There are five disjunct elements, five special ones and some pre-defined, combined ones. The union of the five disjunct elements covers the full set of supported characters. The special filter elements are user defined sets of characters. The filters can have an effect either at zone level (by specifying the zone's filter field) or globally, at page level (defined by the kRecSetDefaultFilter function). Use the FILTER_ALL value to set no filtering.

Note
Filters are not supported when an Eastern language (CCJK, Thai, Vietnamese, Arabic or Hebrew) is the current one. For those languages FILTER_ALL is the only supported filter. Nevertheless, the FILTER_WESTERN bit can be specified in some of the zones. It means that the given zone contains Western characters only, so that zone will be recognized by the Western OCR engine and Character Set filtering bits are supported in that zone.
Characters in the document or zone that are not part of the specified Character Set will either be UNICODE_REJECTED or recognized as a validated character with a similar shape. For instance, if you select English only and the document contains a letter "Capital A with acute", the recognized output may be the letter "Capital A".
Filters have no effect on the 2nd, 3rd etc. choices of each LETTER.
The capabilities of the selected recognition module can also impose restrictions, e.g. the HNR module is restricted to numerals and four other characters.
Not all recognition modules support all filter elements:
  • The ones that support all filter elements are: RM_OMNIFONT_MOR, RM_RER, RM_DOT, RM_OMNIFONT_FRX.
  • The ones that ignore all filter elements are: RM_BAR, RM_OMR.
  • The ones that support some filter elements are: RM_OMNIFONT_PLUS2W, RM_OMNIFONT_PLUS3W and RM_OMNIFONT_MTX (FILTER_ALL, FILTER_DIGIT and FILTER_ALPHA), RM_HNR (FILTER_ALL, FILTER_DIGIT, FILTER_PUNCTUATION and FILTER_MISCELLANEOUS).
  • While many recognition modules support some filters, machine print engines usually do not require them. Filters are best used for improving accuracy of the handprint recognition modules RM_RER and RM_HNR.
To add FILTER_PLUS characters to the Character Set defined by the language environment, the filter value should be: FILTER_ALL | FILTER_PLUS.
To add FILTER_PLUS characters to the filtered Character Set, place FILTER_PLUS along with the other required filters. For example, to enable only digits and FILTER_PLUS characters, use: FILTER_DIGIT | FILTER_PLUS.
To validate FILTER_PLUS characters only, FILTER_PLUS must be the only filter element in the zone structure field. This even prevents language selection from validating letters in the current zone.
There are four different sets of FILTER_PLUS characters; the above comments apply to all of them. Use kRecSetFilterPlusEx function with the correct index to specify the set of characters to use with them.
For example a possible use case could be that there are three different zone types: alpha only, numeric and mixed. Use FILTER_ALPHA for the alpha only fields, FILTER_DIGIT | FILTER_PLUS for the numeric fields where the 0-indexed FilterPlus string may be specified as ".,-/", and use FILTER_ALPHA | FILTER_DIGIT | FILTER_PLUS_1 for the mixed fields where the 1-indexed FilterPlus string may be specified as ".,-/#$%()". (Of course the sets should be specified according to your needs.)
Enumerator
FILTER_DEFAULT | Use this value to have the zone handled globally. Do not combine this with any other filters.
FILTER_DIGIT | [Disjunct filter] Recognition of numerals only. E.g.: "3" (Digit Three).
FILTER_UPPERCASE | [Disjunct filter] Recognition of uppercase letters only, including accented ones. E.g.: "A" (Capital A).
FILTER_LOWERCASE | [Disjunct filter] Recognition of lowercase letters only, including accented ones. E.g.: "a" (Lowercase a).
FILTER_PUNCTUATION | [Disjunct filter] Recognition of punctuation signs only. E.g.: "!" (Exclamation Mark).
FILTER_MISCELLANEOUS | [Disjunct filter] Recognition of other miscellaneous characters only. E.g.: "+" (Plus sign).
FILTER_PLUS | [Special, combinable filter] Enables the use of the first set of FilterPlus characters specified by the kRecSetFilterPlus or kRecSetFilterPlusEx functions (index 0). The FilterPlus characters are added after any kind of filtering.
FILTER_PLUS_1 | [Special, combinable filter] Enables the use of the second set of FilterPlus characters (index 1).
FILTER_PLUS_2 | [Special, combinable filter] Enables the use of the third set of FilterPlus characters (index 2).
FILTER_PLUS_3 | [Special, combinable filter] Enables the use of the fourth set of FilterPlus characters (index 3).
FILTER_USER_DICT | [Special, combinable filter] Recognition of characters from the user dictionary.
FILTER_WESTERN | [Special, combinable filter] Enables above western filtering rules to work in the zone when the current language is an Asian one. (No Asian characters are to be recognized in such zones.)
FILTER_ALL | [Pre-defined combined filter] Since all elements are enabled, there is no filtering.
FILTER_ALPHA | [Pre-defined combined filter] Recognition of upper and lowercase letters only.
FILTER_NUMBERS | [Pre-defined combined filter] Recognition of digits and the FilterPlus characters set by the kRecSetFilterPlus function.
FILTER_SIZE | Number of possible combinations of the disjunct filters.

◆ CONTINENT

enum CONTINENT

Continent ID.

This enum can be used for identifying the geographical location, where a given language is spoken. See LANGUAGE_INFO.

Enumerator
C_EUROPE | Europe
C_ASIA | Asia
C_AFRICA | Africa
C_OCEANIA | Australia and Oceania
C_LAMERICA | Latin America
C_NAMERICA | North America
C_INTERNATIONAL | Artificial languages and Latin

◆ LANG_ENA

enum LANG_ENA

Language enable/disable.

This defines the possible values for the language selection in the Language environment definition. This is supplied by the enum LANGUAGES and used by the function kRecSetLanguages.

Note
The Character Set is primarily defined by the Language environment specified by kRecSetLanguages. If no language is enabled, only the digits, language-independent punctuation and the miscellaneous characters are validated. Whenever at least one language is enabled (i.e. gets the LANG_ENABLED value), the unaccented lower and uppercase Latin-alphabet characters are validated in addition to the accented lower and uppercase letters defined for the enabled language(s). Language-specific punctuation is enabled with the language concerned. At present these only include the inverted question mark and inverted exclamation mark for Spanish.
To change the language selection, create a LANG_SIZE sized array with this LANG_ENA type. Initialize all elements to LANG_DISABLED, enable the required languages and pass the array to the kRecSetLanguages function.
To enable a single language only, use the kRecManageLanguages function. That function is useful in other cases as well; see its description.
Enumerator
LANG_DISABLED | The particular language is disabled.
LANG_ENABLED | The particular language is enabled.

◆ LANGUAGE_CODE

enum LANGUAGE_CODE

Language code type.

One of these values can be used with the kRecFindLanguageEx function to specify the type of the language name abbreviation code to search.

Enumerator
LANGCODE_ALL | Look for the language using all supported language codes.
LANGCODE_ENGLISH | Look for the language as an English name.
LANGCODE_INT_3 | Look for the language among the CSDK internal 3-letter codes.
LANGCODE_639_1 | Look for the language in the ISO/DIS 639-1 standard.
LANGCODE_639_2B | Look for the language in the ISO/DIS 639-2/B standard.
LANGCODE_639_3 | Look for the language in the superset of the ISO/DIS 639-3 standard.
LANGCODE_WIN_3 | Look for the language among the Windows Three Letter Acronyms.
LANGCODE_BCP_47 | Look for the language in the BCP 47 standard.

◆ LANGUAGES

enum LANGUAGES

Possible languages.

This enum identifies the different languages supported directly by the Engine. In the Engine these languages are used in two different places:

  • For recognition: they define the available languages to form the Language environment of the Character Set.
  • A subset of these languages can be made available to the checking module. In this case a language (the Spelling language) should be specified.
    Note
    To define the Language environment of the Character Set, these languages are to be specified as indices to a LANG_ENA array where the selection/de-selection of a language means setting the proper element of the array to LANG_ENA.LANG_ENABLED / LANG_ENA.LANG_DISABLED. Recognition modules, especially the omnifont ones (RM_OMNIFONT_MTX and RM_OMNIFONT_MOR), support the recognition of different accented letters of the languages enumerated here.
    Languages not listed here individually are supported for recognition either by combining the available languages and/or by specifying individually validated characters (the LanguagesPlus characters - kRecSetLanguagesPlus) in addition to those defined by the language selection.
    When this enum is used for specifying the Spelling language, you can only use languages supported by the current engine configuration (and delivered along with the integrating application). You can also use the LANG_AUTO and the LANG_NO values. (The OmniPage Capture SDK is delivered with support for 21 different spell languages. However, the distribution set of the integrating application may contain support for fewer dictionary languages.)
    Specifying two or more languages for recognition results in validation of a combined (OR-ed) set of the characters of these languages. While most of the modules allow any combination of languages, the RM_OMNIFONT_FRX module supports language combinations only within the same Code Page. For example, this module properly processes the English, German and Italian language combinations, since all these languages belong to the Windows ANSI (1252) Code Page. However, when specifying e.g. both the French and Czech languages, RM_OMNIFONT_FRX may fail to recognize some accented characters properly in the Czech alphabet, since these languages are not in the same Code Page.
Enumerator
LANG_ALL | Use with kRecManageLanguages only! See details there.
LANG_ALL_LATIN | Use with kRecManageLanguages only! See details there.
LANG_ALL_ASIAN | Use with kRecManageLanguages only! See details there.
LANG_START | First 'Special' language ID
LANG_UD | User dictionary
LANG_AUTO | Automatic spell checking language selection. Use with kRecSetSpellLanguage only! See details there. (Default for spell checking)
LANG_NO | No spell checking language selection. Use with kRecSetSpellLanguage only! See details there.
LANG_ENG | English language selection. Spelling supported! (Default for recognition). ISO/DIS 639-3 code is 'eng'.
LANG_GER | German language selection. Spelling supported! ISO/DIS 639-3 code is 'deu'.
LANG_FRE | French language selection. Spelling supported! ISO/DIS 639-3 code is 'fra'.
LANG_DUT | Dutch language selection. Spelling supported! ISO/DIS 639-3 code is 'nld'.
LANG_NOR | Norwegian language selection. Spelling supported! ISO/DIS 639-3 code is 'nor'.
LANG_SWE | Swedish language selection. Spelling supported! ISO/DIS 639-3 code is 'swe'.
LANG_FIN | Finnish language selection. Spelling supported! ISO/DIS 639-3 code is 'fin'.
LANG_DAN | Danish language selection. Spelling supported! ISO/DIS 639-3 code is 'dan'.
LANG_ICE | Icelandic language selection. ISO/DIS 639-3 code is 'isl'.
LANG_POR | Portuguese language selection. Spelling supported! ISO/DIS 639-3 code is 'por'.
LANG_SPA | Spanish language selection. Spelling supported! ISO/DIS 639-3 code is 'spa'.
LANG_CAT | Catalan language selection. Spelling supported! ISO/DIS 639-3 code is 'cat'.
LANG_GAL | Galician language selection. Alternate names are Gallegan and Gallego. Spoken in Spain and Portugal. ISO/DIS 639-3 code is 'glg'.
LANG_ITA | Italian language selection. Spelling supported! ISO/DIS 639-3 code is 'ita'.
LANG_MAL | Maltese language selection. ISO/DIS 639-3 code is 'mlt'.
LANG_GRE | Greek language selection. This selection includes the characters of the English language, as well. Spelling supported! ISO/DIS 639-3 code is 'ell'.
LANG_POL | Polish language selection. Spelling supported! ISO/DIS 639-3 code is 'pol'.
LANG_CZH | Czech language selection. Spelling supported! ISO/DIS 639-3 code is 'ces'.
LANG_SLK | Slovak language selection. ISO/DIS 639-3 code is 'slk'.
LANG_HUN | Hungarian language selection. Spelling supported! ISO/DIS 639-3 code is 'hun'.
LANG_SLN | Slovenian language selection. Spelling supported! ISO/DIS 639-3 code is 'slv'.
LANG_CRO | Croatian language selection. ISO/DIS 639-3 code is 'hrv'.
LANG_ROM | Romanian language selection. ISO/DIS 639-3 code is 'ron'.
LANG_ALB | Albanian language selection. ISO/DIS 639-3 code is 'sqi'.
LANG_TUR | Turkish language selection. Spelling supported! ISO/DIS 639-3 code is 'tur'.
LANG_EST | Estonian language selection. ISO/DIS 639-3 code is 'est'.
LANG_LAT | Latvian language selection. ISO/DIS 639-3 code is 'lav'.
LANG_LIT | Lithuanian language selection. ISO/DIS 639-3 code is 'lit'.
LANG_ESP | Esperanto language selection. Constructed language. Spelling supported! ISO/DIS 639-3 code is 'epo'.
LANG_SRL | Serbian (Latin) language selection. The Serbian language's ISO/DIS 639-3 code is 'srp', but the CSDK uses the 'qsl' local code for Latin Serbian writing.
LANG_SRB | Serbian (Cyrillic) language selection. This selection includes the characters of the English language, as well. The Serbian language's ISO/DIS 639-3 code is 'srp'. The CSDK uses this code for only the Cyrillic Serbian writing.
LANG_MAC | Macedonian (Cyrillic) language selection. This selection includes the characters of the English language, as well. ISO/DIS 639-3 code is 'mkd'.
LANG_MOL | Moldavian (Cyrillic) language selection. This selection includes the characters of the English language, as well. ISO/DIS 639-3 code is 'mol'.
LANG_BUL | Bulgarian (Cyrillic) language selection. This selection includes the characters of the English language, as well. ISO/DIS 639-3 code is 'bul'.
LANG_BEL | Byelorussian (Cyrillic) language selection. This selection includes the characters of the English language, as well. Other spellings Belarusian and White Russian. ISO/DIS 639-3 code is 'bel'.
LANG_UKR | Ukrainian (Cyrillic) language selection. This selection includes the characters of the English language, as well. ISO/DIS 639-3 code is 'ukr'.
LANG_RUS | Russian (Cyrillic) language selection. This selection includes the characters of the English language, as well. Spelling supported! ISO/DIS 639-3 code is 'rus'.
LANG_CHE | Chechen language selection. This selection includes the characters of the English language, as well. ISO/DIS 639-3 code is 'che'.
LANG_KAB | Kabardian language selection. This selection includes the characters of the English language, as well. Alternate name is Beslenei. Spoken in Russia and Turkey. ISO/DIS 639-3 code is 'kbd'.
LANG_AFR | Afrikaans language selection. Spoken in Sourth Africa. ISO/DIS 639-3 code is 'afr'.
LANG_AYM | Aymara language selection. Spoken in Bolivia and Peru. ISO/DIS 639-3 code is 'aym'.
LANG_BAS | Basque language selection. ISO/DIS 639-3 code is 'eus'.
LANG_BEM | Bemba language selection. Alternate names are Chibemba, Ichibemba, Wemba, Chiwemba. Spoken in Zambia and Democratic Republic of Congo. ISO/DIS 639-3 code is 'bem'.
LANG_BLA | Blackfoot language selection. Alternate name is Blackfeet, Siksika and Pikanii. Spoken in Canada and USA. ISO/DIS 639-3 code is 'bla'.
LANG_BRE | Breton language selection. ISO/DIS 639-3 code is 'bre'.
LANG_BRA | Portuguese (Brazilian) language selection. Spelling supported! There is no language code for the Brazilian Portuguese language in the ISO/DIS 639-3 standard. The CSDK uses the 'qbp' local code.
LANG_BUG | Bugotu language selection. Spoken in Solomon Islands. ISO/DIS 639-3 code is 'bgt'.
LANG_CHA | Chamorro language selection. Spoken in Guam and Northern Mariana Islands. ISO/DIS 639-3 code is 'cha'.
LANG_CHU | Chuana or Tswana language selection. Spoken in Botswana and South Africa. ISO/DIS 639-3 code is 'tsn'.
LANG_COR | Corsican language selection. ISO/DIS 639-3 code is 'cos'.
LANG_CRW | Crow language selection. Spoken in USA. ISO/DIS 639-3 code is 'cro'.
LANG_ESK | Eskimo language selection. This language selection is a collection of Eskimo and Inuit languages. There is no language code for it in the ISO/DIS 639-3 standard. The CSDK uses the 'qes' local code.
LANG_FAR | Faroese language selection. ISO/DIS 639-3 code is 'fao'.
LANG_FIJ | Fijian language selection. ISO/DIS 639-3 code is 'fij'.
LANG_FRI | Frisian language selection. This is a macro language of three Frisian languages in Germany. ISO/DIS 639-3 code is 'fry'.
LANG_FRU | Friulian language selection. Spoken in Italy. ISO/DIS 639-3 code is 'fur'.
LANG_GLI | Gaelic Irish language selection. ISO/DIS 639-3 code is 'gle'.
LANG_GLS | Gaelic Scottish language selection. ISO/DIS 639-3 code is 'gla'.
LANG_GAN | Ganda or Luganda language selection. Spoken in Uganda. ISO/DIS 639-3 code is 'lug'.
LANG_GUA | Guarani language selection. This is a macro language of the Chiripa and some Guarani languages. Spoken in Paraguay, Argentina, Bolivia and Brazil. ISO/DIS 639-3 code is 'grn'.
LANG_HAN | Hani language selection. Alternate names are Hanhi, Haw and Hani Proper. Spoken in China, Laos and Viet Nam. ISO/DIS 639-3 code is 'hni'.
LANG_HAW | Hawaiian language selection. ISO/DIS 639-3 code is 'haw'.
LANG_IDO | Ido language selection. Constructed language. ISO/DIS 639-3 code is 'ido'.
LANG_IND | Indonesian language selection. ISO/DIS 639-3 code is 'ind'.
LANG_INT | Interlingua language selection. Constructed language. ISO/DIS 639-3 code is 'ina'.
LANG_KAS | Kashubian language selection. Spoken in Poland. ISO/DIS 639-3 code is 'csb'.
LANG_KAW | Kawa language selection. Alternate names area Wa, Va, Vo, Wa Pwo and Wakut. Spoken in China. ISO/DIS 639-3 code is 'wbm'.
LANG_KIK | Kikuyu language selection. Spoken in Kenya. ISO/DIS 639-3 code is 'kik'.
LANG_KON | Kongo language selection. This is a macro language of Laari and Kongo languages. Spoken in the Democratic Republic of the Congo, Angola and Congo. ISO/DIS 639-3 code is 'kon'.
LANG_KPE | Kpelle language selection. This is a macro language of Kpelle languages. Spoken in Liberia and Guinea. ISO/DIS 639-3 code is 'kpe'.
LANG_KUR | Kurdish language selection - if written in the latin alphabet. This is a macro language of the Kurdish languages ISO/DIS 639-3 code is 'kur'.
LANG_LTN | Latin language selection. ISO/DIS 639-3 code is 'lat'.
LANG_LUB | Luba language selection. Alternate names are Luba-Lulua, Luba-Kasai, Tshiluba, Luva and Western Luba. Spoken in the Democratic Republic of the Congo. ISO/DIS 639-3 code is 'lua'.
LANG_LUX | Luxembourgish language selection. Alternate names are Luxembourgeois and Letzburgish. Spoken in Luxembourg. ISO/DIS 639-3 code is 'ltz'.
LANG_MLG | Malagasy language selection. This is a macro language of Malagasy languages. Spoken in Madagascar. ISO/DIS 639-3 code is 'mlg'.
LANG_MLY | Malay language selection. ISO/DIS 639-3 code is 'msa'.
LANG_MLN | Malinke language selection. Alternate names are Western Maninkakan, Malinka and Maninga. Spoken in Senegal, Gambia and Mali. ISO/DIS 639-3 code is 'mlq'.
LANG_MAO | Maori language selection. Spoken in New Zealand. ISO/DIS 639-3 code is 'mri'.
LANG_MAY | Mayan language selection. This is a language collection which is not supported by ISO/DIS 639-3, so the CSDK uses the ISO/DSI-639-2 code for this: 'MYN'.
LANG_MIA | Miao language selection. This is a macro language of Hmong languages. Alternate name is Hmong. Spoken in China, Laos, Thailand, Myanmar and Viet Nam. ISO/DIS 639-3 code is 'hmn'.
LANG_MIN | Minangkabau language selection. ISO/DIS 639-3 code is 'min'.
LANG_MOH | Mohawk language selection. Spoken in Canada and USA. ISO/DIS 639-3 code is 'moh'.
LANG_NAH | Nahuatl language selection. This is a language collection which is not supported by ISO/DIS 639-3, so the CSDK uses the ISO/DSI-639-2 code for this: 'NAH'.
LANG_NYA | Nyanja language selection. Alternate names are Chichewa and Chinyanja. Spoken in Malawi, Mozambique, Zambia and Zimbabw. ISO/DIS 639-3 code is 'nya'.
LANG_OCC | Occidental language selection. Constructed language. ISO/DIS 639-3 code is 'occ'.
LANG_OJI | Ojibway language selection. This is a macro language of Ojibwa, Chippewa and Ottawa languages. Alternate names are Ojibwa and Ojibwe. Spoken in Canada and USA. ISO/DIS 639-3 code is 'oji'.
LANG_PAP | Papiamento language selection. Spoken in Netherlands Antilles, Aruba. ISO/DIS 639-3 code is 'pap'.
LANG_PID | Pidgin English language selection. Alternate names are Tok Pisin, Naomalanesian and New Guinean Pidgin English. Spoken in Papua New Guinea. ISO/DIS 639-3 code is 'tpi'.
LANG_PRO | Provencal language selection. Alternate name is Occitan. Spoken in France, Italy and Monaco. ISO/DIS 639-3 code is 'prv'.
LANG_QUE | Quechua language selection. This is a macro language of the Quechua languages. Spoken in Peru. ISO/DIS 639-3 code is 'que'.
LANG_RHA | Rhaetic language selection. Alternate names are Romansch and Rhaeto-Romance. Spoken in Switzerland. ISO/DIS 639-3 code is 'roh'.
LANG_ROY | Romany language selection. Spoken all over Europe. ISO/DIS 639-3 code is 'rom'.
LANG_RUA | Rwanda language selection. Alternate names are Kinyarwanda and Rwanda. Spoken in Rwanda, the Democratic Republic of Congo and Uganda. ISO/DIS 639-3 code is 'kin'.
LANG_RUN | Rundi language selection. Spoken in Burundi and Uganda. ISO/DIS 639-3 code is 'run'.
LANG_SAM | Samoan language selection. Spoken in Samoa and American Samoa. ISO/DIS 639-3 code is 'smo'.
LANG_SAR | Sardinian language selection. This is a macro language of the Sardinian languages. ISO/DIS 639-3 code is 'srd'.
LANG_SHO | Shona language selection. Spoken in Zimbabwe, Botswana and Zambia. ISO/DIS 639-3 code is 'sna'.
LANG_SIO | Sioux language selection. Alternate name is Dakota. Spoken in USA and Canada. ISO/DIS 639-3 code is 'dak'.
LANG_SMI | Sami language selection (Combination of the Sami language family). This is a language collection which is not supported by ISO/DIS 639-3, so the CSDK uses the ISO/DSI-639-2 code for this: 'SMI'.
LANG_SML | Lule Sami language selection. ISO/DIS 639-3 code is 'smj'.
LANG_SMN | Northern Sami language selection. ISO/DIS 639-3 code is 'sme'.
LANG_SMS | Southern Sami language selection. ISO/DIS 639-3 code is 'sma'.
LANG_SOM | Somali language selection. ISO/DIS 639-3 code is 'som'.
LANG_SOT | Sotho, Suto or Sesuto language selection. Spoken is Lesotho and South Africa. ISO/DIS 639-3 code is 'sot'.
LANG_SUN | Sundanese language selection. Alternate names are Sunda and Priangan. Spoken in Java and Bali in Indonesia. ISO/DIS 639-3 code is 'sun'.
LANG_SWA | Swahili language selection. This is a macro language of the Swahili languages. Spoken in the Democratic Republic of the Congo, Tanzania, Kenya and Somalia. ISO/DIS 639-3 code is 'swa'.
LANG_SWZ | Swazi language selection. Alternate names are Swati, Siswati and Tekela. Spoken in Swaziland, Lesotho, Mozambique and South Africa. ISO/DIS 639-3 code is 'ssw'.
LANG_TAG | Tagalog language selection. Spoken in Philippines. ISO/DIS 639-3 code is 'tgl'.
LANG_TAH | Tahitian language selection. ISO/DIS 639-3 code is 'tah'.
LANG_TIN | Pirez language selection. There is no language code for it in the ISO/DIS 639-3 standard. The CSDK uses the 'qti' local code.
LANG_TON | Tongan language selection. Alternate names are Tonga, Siska and Nyasa. Spoken in Malawi. ISO/DIS 639-3 code is 'ton'.
LANG_TUN | Tun language selection. Alternate names are Tunia and Tunya. Spoken in Chad. ISO/DIS 639-3 code is 'tug'.
LANG_VIS | Visayan language selection. The Visayan language actually consists of three languages: Cebuano, Hiligaynon and Samaran or Waray-waray. Spoken in the Philippines. There is no language code for it in the ISO/DIS 639-3 standard. The CSDK uses the 'qis' local code.
LANG_WEL | Welsh language selection. ISO/DIS 639-3 code is 'cym'.
LANG_WEN | Wend or Sorbian language selection. This is a language collection which is not supported by ISO/DIS 639-3, so the CSDK uses the ISO/DSI-639-2 code for this: 'WEN'.
LANG_WOL | Wolof language selection. Spoken in Senegal and Mauritania. ISO/DIS 639-3 code is 'wol'.
LANG_XHO | Xhosa language selection. Spoken in South Africa and Lesotho. ISO/DIS 639-3 code is 'xho'.
LANG_ZAP | Zapotec language selection. This is a macro language of the Zapotec languages. Spoken in Mexico. ISO/DIS 639-3 code is 'zap'.
LANG_ZUL | Zulu language selection. Spoken in South Africa, Lesotho, Malawi, Mozambique and Swaziland. ISO/DIS 639-3 code is 'zul'.
LANG_JPN | Japanese language selection. This selection includes the characters of the English language, as well. ISO/DIS 639-3 code is 'jpn'.
LANG_CHS | Simplified Chinese language selection. This selection includes the characters of the English language, as well. There is no language code for this writing mode in the ISO/DIS 639-3 standard. The CSDK uses the 'qcs' local code.
LANG_CHT | Traditional Chinese language selection. This selection includes the characters of the English language, as well. There is no language code for this writing mode in the ISO/DIS 639-3 standard. The CSDK uses the 'qct' local code.
LANG_KRN | Korean language selection. This selection includes the characters of the English language, as well. ISO/DIS 639-3 code is 'kor'.
LANG_THA | Thai language selection. ISO/DIS 639-3 code is 'tha'. This language is supported on: Windows, Linux, Embedded Linux and MacOS x64.
LANG_ARA | Arabic language selection. ISO/DIS 639-3 code is 'ara'. This language is supported on: Windows, Linux, Embedded Linux, MacOS.
LANG_HEB | Hebrew language selection. ISO/DIS 639-3 code is 'heb'. This language is supported on: Windows, Linux, Embedded Linux and MacOS x64.
LANG_VIE | Vietnamese (Latin) language selection. ISO/DIS 639-3 code is 'vie'. This language is supported on: Windows, Linux, Embedded Linux and MacOS x64.
LANG_SIZE | Number of directly selectable languages.

◆ MANAGE_LANG

enum MANAGE_LANG

Language management actions.

This enum defines the possible management actions for the kRecManageLanguages function.

Enumerator
SET_LANG | Make the given language the single enabled language in the set.
ADD_LANG | Add the given language to the set of enabled languages.
REMOVE_LANG | Remove the given language from the set of enabled languages.
INVERT_LANG | Invert the status of the given language in the set of enabled languages.
IS_LANG_ENABLED | Return REC_OK if the given language is enabled.

◆ OUTCODEPAGETYPE

enum OUTCODEPAGETYPE

Code page types.

Each output code page is classified into one of these categories.

Enumerator
CODEP_UNKNOWN | Code Pages not classified to any further categories, e.g. Roman-8.
SPECIFIC | 16-bit Code Pages, e.g. UNICODE.
ASCII_BASED | Code Pages typically used by different localized DOS versions and DOS applications, e.g. Code Page 437.
ANSI_BASED | Code Pages typically used by different localized Windows versions and Windows applications, e.g. Windows Greek.
MAC_BASED | Code Pages typically used by different localized MacOS versions and applications, e.g. Macintosh Central European CP.
INTERNAL_CP | Reserved 8-bit and 16 bit Code Pages used internally by the Engine.
ASIAN_CODEPAGE | Multi-byte code pages for Asian languages.

◆ RM_FLAGS

enum RM_FLAGS

Recognition Engines supporting a language.

These flags can be used to indicate the set of recognition engines supporting a given language. See LANGUAGE_INFO.

Function Documentation

◆ kRecCheckCodePage()

RECERR RECAPIKRN kRecCheckCodePage | ( | int | sid,
 |  | LPWSTR | pMissingChrs,
 |  | size_t | buflen )

Checking the code page.

The kRecCheckCodePage checks whether the current Code Page setting contains all the characters of the current Language environment (language selection, the LanguagesPlus characters), and any characters listed as FilterPlus characters.

Parameters
[in] | sid | Settings Collection ID.
[out] | pMissingChrs | Pointer of a buffer to hold any missing characters returned by the function.
[in] | buflen | Specifies the size of the buffer in bytes. It must be large enough to hold all the characters and the terminating double zero.
Return values
RECERR
Note
The buffer will contain any character (in 16-bit UNICODE) validated for recognition, which cannot be found in the current Code Page.
The specification of this function in C# is:
RECERR kRecCheckCodePage(int sid, StringBuilder pMissingChrs);
kRecCheckCodePage
RECERR RECAPIKRN kRecCheckCodePage(int sid, LPWSTR pMissingChrs, size_t buflen)
Checking the code page.
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
The specification of this function in Java is:
int kRecCheckCodePage(int sid, String[] pMissingChrs)
The specification of this function in Python is:
def kRecCheckCodePage(sid: int) -> Tuple[int, str]

◆ kRecConvertCodePage2Unicode()

RECERR RECAPIKRN kRecConvertCodePage2Unicode | ( | int | sid,
 |  | const LPBYTE | pInput,
 |  | size_t * | pInputLen,
 |  | LPWCH | pUniCode )

Converting from the current code page to 16-bit UNICODE.

This utility function converts a single character code from the current Code Page value to its 16-bit UNICODE representation.

Parameters
[in] | sid | Settings Collection ID.
[in] | pInput | Pointer to the input buffer containing the character code to be converted.
[in,out] | pInputLen | Pointer to a variable containing the length of the input buffer. Upon returning, the variable gets the exact length of the converted code.
[out] | pUniCode | Pointer of a variable to store the result of the conversion.
Return values
RECERR
Note
This function can be useful whenever a character or a character string should be passed to a RecAPI API function requiring the character's or string's 16-bit UNICODE representation. (e.g. kRecSetFilterPlus).
The current Code Page can be changed by a previous kRecSetCodePage function call.
For characters that are illegal in the given code page this function returns with CHR_ILLEGALCODE_ERR error code.
The function checks whether the passed length is enough for representing the input character. If it is not enough, the function returns with CHR_CODELENGTH_ERR error. If it is enough, the length parameter gets the exact length of the specified input code. This is useful when a whole word or longer string is converted character-by-character, because this retrieved exact length gives the bytes to be skipped for the next character of the input string.
The specification of this function in C# is:
RECERR kRecConvertCodePage2Unicode(int sid, byte[] pInput, out int pInputLen, out char pUniCode);
kRecConvertCodePage2Unicode
RECERR RECAPIKRN kRecConvertCodePage2Unicode(int sid, const LPBYTE pInput, size_t *pInputLen, LPWCH pUniCode)
Converting from the current code page to 16-bit UNICODE.

◆ kRecConvertCodePage2UnicodeEx()

RECERR RECAPIKRN kRecConvertCodePage2UnicodeEx | ( | int | sid,
 |  | const char * | pInput,
 |  | size_t * | pInputLen,
 |  | WCHAR ** | ppOutput,
 |  | size_t * | pOutputCount,
 |  | int | flags )

Converting a character or a string from a code page to 16-bit UNICODE.

This utility function converts either a single character or a string from UTF-8, ANSI or the current Code Page to a 16-bit UNICODE character or string.

Parameters
[in] | sid | Settings Collection ID.
[in] | pInput | Pointer to the input buffer containing the character code or the string to be converted.
[in,out] | pInputLen | Pointer to a variable containing the length of the input buffer. Upon returning, the variable gets the exact length of the converted input codes. This parameter can be NULL when a zero terminated string is to be converted.
[out] ppOutput Address of a
WCHAR*
variable that will be filled with the pointer to the allocated output buffer having the result of conversion.
[out] | pOutputCount | Address of a variable that will be filled with the number of converted WCHAR characters. This parameter can be NULL.
[in] | flags | Codepage Conversion Mode flags (CCM_*) describing conversion ANCH_CCMFLAGS details.
Return values
RECERR
Note
This function can be useful whenever a character or a character string should be passed to a RecAPI API function requiring the character's or string's 16-bit UNICODE representation. (e.g. kRecSetFilterPlus).
This function is an extension of the kRecConvertCodePage2Unicode function: this extended one supports string conversion, too.
kRecConvertCodePage2Unicode
is functionally equivalent to
kRecConvertCodePage2UnicodeEx(sid, pInput, pInputLen, &pUniCode, NULL, CCM_CP_CURRENT | CCM_CONV_CHAR)
CCM_CP_CURRENT
#define CCM_CP_CURRENT
Use the current code page for conversion.
Definition KernelApi.h:12837
CCM_CONV_CHAR
#define CCM_CONV_CHAR
Convert a single character only.
Definition KernelApi.h:12840
kRecConvertCodePage2UnicodeEx
RECERR RECAPIKRN kRecConvertCodePage2UnicodeEx(int sid, const char *pInput, size_t *pInputLen, WCHAR **ppOutput, size_t *pOutputCount, int flags)
Converting a character or a string from a code page to 16-bit UNICODE.
. See that function's description also.
The input character or string is coded either in UTF-8, or in the currently active Code Page. This must be specified in the flags parameter with the
CCM_CP_UTF8
CCM_CP_UTF8
#define CCM_CP_UTF8
Use the UTF-8 code page for conversion.
Definition KernelApi.h:12838
,
CCM_CP_ANSI
CCM_CP_ANSI
#define CCM_CP_ANSI
Use the ANSI code page (CP 1252) for conversion.
Definition KernelApi.h:12839
or
CCM_CP_CURRENT
values. (The current Code Page can be changed by a previous kRecSetCodePage function call.)
Another flag bit specifies whether a multi-character string, or just a single character is to be converted:
CCM_CONV_STRING
CCM_CONV_STRING
#define CCM_CONV_STRING
Convert the full zero terminated string.
Definition KernelApi.h:12841
or
CCM_CONV_CHAR
. The conversion stops after a zero zode. When the input is a zero terminated string, the input buffer's length (the
pInputLen
parameter) can be NULL.
When the input buffer is an UTF-8 string, the pre-combined
CCM_UTF8_STRING
value can be used as the
flags
parameter.
The function returns the converted character or string in an allocated buffer (see
ppOutput
). This buffer must be released using kRecFree when not needed.
When a zero terminated string is successfully converted, the returned character count includes the zero termination, too.

◆ kRecConvertUnicode2CodePage()

RECERR RECAPIKRN kRecConvertUnicode2CodePage | ( | int | sid,
 |  | WCHAR | UniCode,
 |  | LPBYTE | pOutput,
 |  | size_t * | pOutputLen )

Converting from 16-bit UNICODE to the current code page.

This utility function converts a 16-bit UNICODE character code to its representation in the current code page.

Parameters
[in] | sid | Settings Collection ID.
[in] | UniCode | Character code to be converted.
[out] | pOutput | Pointer to the output buffer to store the result of conversion. This parameter can be NULL when the required length of the output buffer is queried only.
[in,out] | pOutputLen | Pointer to a variable containing the allocated length of the output buffer. Upon returning, the variable gets the exact length of the converted output code.
Return values
RECERR
Note
The current Code Page can be changed by a previous kRecSetCodePage function call.
If pOutput is NULL the function gives the required length for storing the output code and the return value is CHR_CODELENGTH_ERR.
For illegal 16-bit UNICODE codes this function returns with CHR_ILLEGALCODE_ERR error code.
For 16-bit UNICODE codes not in the given code page, this function returns with CHR_MISSINGEXPORT_ERR error code and retrieves the missing symbol set by kRecSetMissingSymbol.
If the input is UNICODE_REJECTED it retrieves the rejected symbol set by kRecSetRejectionSymbol. If the input is UNICODE_MISSING it retrieves the missing symbol set by kRecSetMissingSymbol.
The specification of this function in C# is:
RECERR kRecConvertUnicode2CodePage(int sid, char UniCode, out byte[] pExport);
kRecConvertUnicode2CodePage
RECERR RECAPIKRN kRecConvertUnicode2CodePage(int sid, WCHAR UniCode, LPBYTE pOutput, size_t *pOutputLen)
Converting from 16-bit UNICODE to the current code page.

◆ kRecConvertUnicode2CodePageEx()

RECERR RECAPIKRN kRecConvertUnicode2CodePageEx | ( | int | sid,
 |  | const WCHAR * | pInput,
 |  | size_t * | pInputCount,
 |  | char ** | ppOutput,
 |  | size_t * | pOutputLen,
 |  | int | flags )

Converting a 16-bit UNICODE character or string to a code page.

This utility function converts either a single 16-bit UNICODE character or a UNICODE string to its representation in UTF-8, ANSI or the current code page.

Parameters
[in] | sid | Settings Collection ID.
[in] | pInput | Pointer to the input buffer containing the 16-bit UNICODE character code or UNICODE string to be converted.
[in,out] | pInputCount | Pointer to a variable containing the number of WCHARs in the input buffer. Upon returning, the variable gets the exact number of the converted WCHARs. This parameter can be NULL when a single WCHAR or a zero terminated string of them is to be converted.
[out] ppOutput Address of a
char*
variable that will be filled with the pointer to the allocated output buffer having the result of conversion.
[out] | pOutputLen | Address of a variable that will be filled with the length of converted characters. This parameter can be NULL.
[in] | flags | Codepage Conversion Mode flags (CCM_*) describing conversion ANCH_CCMFLAGS details.
Return values
RECERR
Note
This function is an extension of the kRecConvertUnicode2CodePage function: this extended one supports string conversion, too.
kRecConvertUnicode2CodePage
is functionally equivalent to
kRecConvertUnicode2CodePageEx(sid, &Unicode, NULL, &pOutput, pOutputLen, CCM_CP_CURRENT | CCM_CONV_CHAR)
kRecConvertUnicode2CodePageEx
RECERR RECAPIKRN kRecConvertUnicode2CodePageEx(int sid, const WCHAR *pInput, size_t *pInputCount, char **ppOutput, size_t *pOutputLen, int flags)
Converting a 16-bit UNICODE character or string to a code page.
. See that function's description also.
The output character or string is coded either in UTF-8, ANSI or the currently active Code Page. This must be specified in the flags parameter with the
CCM_CP_UTF8
,
CCM_CP_ANSI
or
CCM_CP_CURRENT
values. (The current Code Page can be changed by a previous kRecSetCodePage function call.)
Another flag bit specifies whether a multi-character string, or just a single character is to be converted:
CCM_CONV_STRING
or
CCM_CONV_CHAR
. The conversion stops after a zero zode. When the input is a zero terminated string, the input buffer's length (the
pInputCount
parameter) can be NULL. It can be NULL also when a single WCHAR is to be converted.
When the input is a string and the output will be an UTF-8 string, the pre-combined
CCM_UTF8_STRING
value can be used as the
flags
parameter.
The function returns the converted character or string in an allocated buffer (see
ppOutput
). This buffer must be released using kRecFree when not needed.
When a zero terminated string is successfully converted, the returned length includes the zero termination, too.

◆ kRecFindLanguage()

RECERR RECAPIKRN kRecFindLanguage | ( | LPCTSTR | pLangName,
 |  | LANGUAGES * | pLanguage )

Searching for languages.

The kRecFindLanguage function searches for a single language with the given name.

Parameters
[in] | pLangName | The name of the language. It can be an English name, an ISO 639-3, ISO 639-2/B, ISO 639-1 or BCP 47 code, a Windows 3-letter code or a CSDK internal 3-letter code.
[out] | pLanguage | The index of the first language. If no language can be found, LANG_NO will be put in this parameter.
Return values
CHR_MULTIPLELANG_FOUND_WARN | More than one language has been found. The index of the most relevant language is put in the pLanguage parameter even in this case. Use one of the kRecFindLanguages or kRecFindLanguageEx functions to retrieve all the languages.
RECERR | Other error
Note
You might find kRecFindLanguageEx easier to use; that is the suggested function to call.
The specification of this function in C# is:
RECERR kRecFindLanguage(string pLangName, out LANGUAGES pLanguage);
kRecFindLanguage
RECERR RECAPIKRN kRecFindLanguage(LPCTSTR pLangName, LANGUAGES *pLanguage)
Searching for languages.
LANGUAGES
LANGUAGES
Possible languages.
Definition KernelApi.h:1106
The specification of this function in Java is:
int kRecFindLanguage(String pLangName, int[] pLanguage)
The specification of this function in Python is:
def kRecFindLanguage(pLangName: str) -> Tuple[int, int]

◆ kRecFindLanguageEx()

RECERR RECAPIKRN kRecFindLanguageEx | ( | LANGUAGE_CODE | coding,
 |  | LPCTSTR | pLangName,
 |  | LANGUAGES * | pLanguage,
 |  | LANG_ENA * | pLanguagesOut )

Searching for languages.

The kRecFindLanguageEx function searches for the language or languages with the given name.

Parameters
[in] | coding | Look for the language using all or one of the language coding standards. See LANGUAGE_CODE for details.
[in] | pLangName | The name of the language to find.
[out] | pLanguage | Returns the index of the found language. If no language can be found, LANG_NO will be put in this parameter.
[out] | pLanguagesOut | This parameter can be NULL. If not NULL, must point to an array having LANG_SIZE elements. All the languages matching pLangName by the required language coding are enabled in this array.
Return values
CHR_MULTIPLELANG_FOUND_WARN | More than one language has been found. The index of the most relevant language is put in the pLanguage parameter even in this case, while pLanguagesOut (if not NULL) will contain all of them as LANG_ENABLED.
RECERR | Other error
Note
A special use of this function is when the first parameter (coding) is a Windows LangID (LCID) cast to LANGUAGE_CODE, and pLangName is NULL. In this case the language specified by the LangID will be returned in pLanguage (and pLanguagesOut, if not NULL).
This function is the successor of the kRecFindLanguage and kRecFindLanguages functions. kRecFindLanguage(langname, &lang) is equivalent to kRecFindLanguageEx(LANGCODE_ALL, langname, &lang, NULL), while you have more control with the kRecFindLanguageEx function.
The specification of this function in C# is:
RECERR kRecFindLanguageEx(LANGUAGE_CODE coding, string pLangName, out LANGUAGES pLanguage, out LANG_ENA[] pLanguagesOut);
// or when pLanguagesOut is NULL in C/C++
RECERR kRecFindLanguageEx(LANGUAGE_CODE coding, string pLangName, out LANGUAGES pLanguage);
LANG_ENA
LANG_ENA
Language enable/disable.
Definition KernelApi.h:1051
LANGUAGE_CODE
LANGUAGE_CODE
Language code type.
Definition KernelApi.h:1370
kRecFindLanguageEx
RECERR RECAPIKRN kRecFindLanguageEx(LANGUAGE_CODE coding, LPCTSTR pLangName, LANGUAGES *pLanguage, LANG_ENA *pLanguagesOut)
Searching for languages.
The specification of this function in Java is:
int kRecFindLanguageEx(LANGUAGE_CODE coding, String pLangName, int[] pLanguage, int[] pLanguagesOut)
The specification of this function in Python is:
def kRecFindLanguageEx(coding: int, pLangName: str) -> Tuple[int, int, "IntArray"]

◆ kRecFindLanguages()

RECERR RECAPIKRN kRecFindLanguages | ( | const LANGUAGE_INFO * | pInfo,
 |  | LANG_ENA * | pLanguagesOut )

Searching for languages.

The kRecFindLanguages function collects languages according to the given language information.

Parameters
[in] | pInfo | Pointer to a structure containing the filter information. If a field is zero or an empty string, it does not affect the filtering. If a field has some real value, the only languages defined by that value will be reported on. The EnglishName field may contain not only the English name of the language, but the language identifier for any of the following standards: ISO 639-3, ISO 639-2/B, ISO 639-1, BCP 47, Windows 3-letter code or a CSDK internal 3-letter code.
[out] | pLanguagesOut | Pointer to an array having LANG_SIZE elements to give back whether a language is selected or not.
Return values
RECERR
Note
See also kRecFindLanguage and kRecFindLanguageEx. You might find kRecFindLanguageEx easier to use; that is the suggested function to call.
The specification of this function in C# is:
RECERR kRecFindLanguages(LANGUAGE_INFO pInfo, out LANG_ENA[] pLanguagesOut);
kRecFindLanguages
RECERR RECAPIKRN kRecFindLanguages(const LANGUAGE_INFO *pInfo, LANG_ENA *pLanguagesOut)
Searching for languages.
LANGUAGE_INFO
Language info.
Definition KernelApi.h:1350
The specification of this function in Java is:
int kRecFindLanguages(LANGUAGE_INFO pInfo, int[] pLanguagesOut)
The specification of this function in Python is:
def kRecFindLanguages(pInfo: "LANGUAGE_INFO") -> Tuple[int, "IntArray"]

◆ kRecGetCodePage()

RECERR RECAPIKRN kRecGetCodePage | ( | int | sid,
 |  | LPTSTR | pCodePageName,
 |  | size_t | buflen )

Getting the code page name.

The kRecGetCodePage function will provide the current Code Page name.

Parameters
[in] | sid | Settings Collection ID.
[out] | pCodePageName | Pointer of a buffer for the current setting.
[in] | buflen | Specifies the size of the buffer in bytes.
Return values
RECERR
Note
The length of any Code Page name never exceeds MAXCPNAMELEN characters (including the terminating zero).
This function gets the value of the setting Kernel.Chr.CodePage. This setting can be changed by kRecSetCodePage. If the value of the setting is -1, the function retrieves the default code page from the setting Kernel.Chr.CodePage.Default. See also auto code page.
The specification of this function in C# is:
RECERR kRecGetCodePage(int sid, out string pCodePageName);
kRecGetCodePage
RECERR RECAPIKRN kRecGetCodePage(int sid, LPTSTR pCodePageName, size_t buflen)
Getting the code page name.
The specification of this function in Java is:
int kRecGetCodePage(int sid, String[] pCodePageName)
The specification of this function in Python is:
def kRecGetCodePage(sid: int) -> Tuple[int, str]

◆ kRecGetCodePageInfo()

RECERR RECAPIKRN kRecGetCodePageInfo | ( | LPCTSTR | pCodePageName,
 |  | LPTSTR | pDesc,
 |  | size_t | size,
 |  | LPOUTCODEPAGETYPE | pCodePageType )

Getting information about the code page.

The kRecGetCodePageInfo function provides information about the specified Code Page: a descriptive string and the category of the Code Page.

Parameters
[in] | pCodePageName | Name of the Code Page inquired.
[out] | pDesc | Pointer of a buffer to hold the Code Page descriptor information.
[in] | size | Specifies the size of the buffer pDesc, in bytes. (MAXCPNAMELEN is recommended)
[out] | pCodePageType | Pointer of a OUTCODEPAGETYPE variable to hold basic Code Page category information.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetCodePageInfo(string pCodePageName, out string pDesc, out OUTCODEPAGETYPE pCodePageType);
OUTCODEPAGETYPE
OUTCODEPAGETYPE
Code page types.
Definition KernelApi.h:1384
kRecGetCodePageInfo
RECERR RECAPIKRN kRecGetCodePageInfo(LPCTSTR pCodePageName, LPTSTR pDesc, size_t size, LPOUTCODEPAGETYPE pCodePageType)
Getting information about the code page.
The specification of this function in Java is:
int kRecGetCodePageInfo(String pCodePageName, String[] pDesc, OUTCODEPAGETYPE[] pCodePageType)
The specification of this function in Python is:
def kRecGetCodePageInfo(pCodePageName: str) -> Tuple[int, str, int]

◆ kRecGetDefaultFilter()

RECERR RECAPIKRN kRecGetDefaultFilter | ( | int | sid,
 |  | CHR_FILTER * | pGlfilter )

Getting the global character set filter.

The kRecGetDefaultFilter function inquires the current Global filter setting. The result will be the binary OR-ed combination of one or more disjunct members of CHR_FILTER.

Parameters
[in] | sid | Settings Collection ID.
[out] | pGlfilter | Pointer of a variable to get the current Global filter setting.
Return values
RECERR
Note
This function gets the value of the setting Kernel.Chr.DefaultFilter. (This setting was not saved into a setting file in CSDK 15.)
The specification of this function in C# is:
RECERR kRecGetDefaultFilter(int sid, out CHR_FILTER filter);
CHR_FILTER
CHR_FILTER
Recognition filters.
Definition KernelApi.h:730
kRecGetDefaultFilter
RECERR RECAPIKRN kRecGetDefaultFilter(int sid, CHR_FILTER *pGlfilter)
Getting the global character set filter.
The specification of this function in Java is:
int kRecGetDefaultFilter(int sid, CHR_FILTER[] pGlfilter)
The specification of this function in Python is:
def kRecGetDefaultFilter(sid: int) -> Tuple[int, int]

◆ kRecGetFilterPlus()

RECERR RECAPIKRN kRecGetFilterPlus | ( | int | sid,
 |  | LPWSTR | pFilterPlus,
 |  | size_t | iSize )

Getting FilterPlus characters.

The kRecGetFilterPlus gets the FilterPlus characters setting.

Parameters
[in] | sid | Settings Collection ID.
[out] | pFilterPlus | Pointer of a buffer to get the current FilterPlus character setting in 16-bit UNICODE.
[in] | iSize | Specifies the size of the buffer in bytes. It must be large enough to hold all the characters and the terminating wide-character zero.
Return values
RECERR
Note
This function gets the value of the setting Kernel.Chr.FilterPlus. (This setting was not saved into a setting file in CSDK 15.)
The specification of this function in C# is:
RECERR kRecGetFilterPlus(int sid, StringBuilder pFilterPlus);
kRecGetFilterPlus
RECERR RECAPIKRN kRecGetFilterPlus(int sid, LPWSTR pFilterPlus, size_t iSize)
Getting FilterPlus characters.
The specification of this function in Java is:
int kRecGetFilterPlus(int sid, String[] pFilterPlus)
The specification of this function in Python is:
def kRecGetFilterPlus(sid: int) -> Tuple[int, str]

◆ kRecGetFirstCodePage()

RECERR RECAPIKRN kRecGetFirstCodePage | ( | LPTSTR | pCodePageName,
 |  | size_t | buflen )

Starting enumeration of code pages.

The kRecGetFirstCodePage function together with the kRecGetNextCodePage creates a listing of the available Code Pages.

Parameters
[out] | pCodePageName | Pointer of a buffer for the name of the first available Code Page.
[in] | buflen | Specifies the size of the buffer in bytes.
Return values
RECERR
Note
The length of the Code Page names never exceeds MAXCPNAMELEN characters (including the terminating zero).
The Code Pages are either hard-coded in the Engine (Code Page 437, Roman 8, Greek-ELOT, Greek-MEMOTEK, all the supported Windows Code Pages and the 16-bit UNICODE and WordPerfect) or they are defined in the Code Page Definition files, *.SET. The OmniPage CSDK is shipped with the Code Page Definition file, called RECOGN.SET.
The specification of this function in C# is:
RECERR kRecGetFirstCodePage(out string pCodePageName);
kRecGetFirstCodePage
RECERR RECAPIKRN kRecGetFirstCodePage(LPTSTR pCodePageName, size_t buflen)
Starting enumeration of code pages.
There is a non-enumerating function replacing kRecGetFirstCodePage and kRecGetNextCodePage in C#:
RECERR kRecGetAllCodePages(out string[] codepages);
The specification of this function in Java is:
int kRecGetFirstCodePage(String[] pCodePageName)
The specification of this function in Python is:
def kRecGetFirstCodePage() -> Tuple[int, str]

◆ kRecGetLanguageInfo()

RECERR RECAPIKRN kRecGetLanguageInfo | ( | LANGUAGES | lang,
 |  | LANGUAGE_INFO * | pInfo )

Getting information about a language.

The kRecGetLanguageInfo function inquires information about a language.

Parameters
[in] | lang | The ID of the inquired language.
[out] | pInfo | Pointer of a structure to give back information about the chosen language.
Return values
RECERR
Note
See the list of language identifiers for details.
Language names are available in ANSI encoding. You may use kRecConvertCodePage2UnicodeEx to convert to UTF-16.
The specification of this function in C# is:
RECERR kRecGetLanguageInfo(LANGUAGES lang, out LANGUAGE_INFO pInfo);
kRecGetLanguageInfo
RECERR RECAPIKRN kRecGetLanguageInfo(LANGUAGES lang, LANGUAGE_INFO *pInfo)
Getting information about a language.
The specification of this function in Java is:
int kRecGetLanguageInfo(int lang, LANGUAGE_INFO pInfo)
The specification of this function in Python is:
def kRecGetLanguageInfo(lang: int) -> Tuple[int, "LANGUAGE_INFO"]

◆ kRecGetLanguages()

RECERR RECAPIKRN kRecGetLanguages | ( | int | sid,
 |  | LANG_ENA * | pLanguagesOut )

Getting languages.

The kRecGetLanguages function inquires the current language selection.

Parameters
[in] | sid | Settings Collection ID.
[out] | pLanguagesOut | Pointer to an array to get the current language selection. The size of the array must be LANG_SIZE. Each element of this array represents a language from LANGUAGES.
Return values
RECERR
Note
The Language environment is primarily determined by the language selection, optionally supplemented by the LanguagesPlus characters setting.
This function gets the value of the setting Kernel.Languages. This setting can be changed by kRecSetLanguages.
The specification of this function in C# is:
RECERR kRecGetLanguages(int sid, LANG_ENA[] pLanguagesOut);
kRecGetLanguages
RECERR RECAPIKRN kRecGetLanguages(int sid, LANG_ENA *pLanguagesOut)
Getting languages.
The specification of this function in Java is:
int kRecGetLanguages(int sid, int[] pLanguagesOut)
The specification of this function in Python is:
def kRecGetLanguages(sid: int) -> Tuple[int, "IntArray"]

◆ kRecGetLanguagesPlus()

RECERR RECAPIKRN kRecGetLanguagesPlus | ( | int | sid,
 |  | LPWSTR | pOcrLplus,
 |  | size_t | iBSize )

Getting LanguagesPlus characters.

The kRecGetLanguagesPlus function inquires the current LanguagesPlus characters setting.

Parameters
[in] | sid | Settings Collection ID.
[out] | pOcrLplus | Pointer to a buffer to get the current LanguagesPlus character setting in 16-bit UNICODE.
[in] | iBSize | Specifies the size of the buffer in bytes. It must be large enough to hold all the characters and the terminating wide-character zero.
Return values
RECERR
Note
This function gets the value of the setting Kernel.Chr.LanguagesPlus. (This setting was not saved into setting file in CSDK 15.)
The specification of this function in C# is:
RECERR kRecGetLanguagesPlus(int sid, StringBuilder pOcrLplus);
kRecGetLanguagesPlus
RECERR RECAPIKRN kRecGetLanguagesPlus(int sid, LPWSTR pOcrLplus, size_t iBSize)
Getting LanguagesPlus characters.
The specification of this function in Java is:
int kRecGetLanguagesPlus(int sid, String[] pOcrLplus)
The specification of this function in Python is:
def kRecGetLanguagesPlus(sid: int) -> Tuple[int, str]

◆ kRecGetMissingSymbol()

RECERR RECAPIKRN kRecGetMissingSymbol | ( | int | sid,
 |  | LPWCH | pwMiss )

Getting missing symbol character.

The kRecGetMissingSymbol function inquires the current missing symbol setting.

Parameters
[in] | sid | Settings Collection ID.
[out] | pwMiss | Pointer of a variable to get the missing symbol setting.
Return values
RECERR
Note
This function gets the value of the setting Kernel.Chr.Missing. This setting can be changed by kRecSetMissingSymbol.
The specification of this function in C# is:
RECERR kRecGetMissingSymbol(int sid, out char wMiss);
kRecGetMissingSymbol
RECERR RECAPIKRN kRecGetMissingSymbol(int sid, LPWCH pwMiss)
Getting missing symbol character.
The specification of this function in Java is:
int kRecGetMissingSymbol(int sid, char[] pwMiss)
The specification of this function in Python is:
def kRecGetMissingSymbol(sid: int) -> Tuple[int, str]

◆ kRecGetNextCodePage()

RECERR RECAPIKRN kRecGetNextCodePage | ( | LPTSTR | pCodePageName,
 |  | size_t | buflen )

Performing enumeration of code pages.

The kRecGetNextCodePage function together with the kRecGetFirstCodePage creates a listing of the available Code Pages.

Parameters
[out] | pCodePageName | Pointer of a buffer for the name of the first available Code Page.
[in] | buflen | Specifies the size of the buffer in bytes.
Return values
RECERR
Note
The length of the Code Page names never exceeds MAXCPNAMELEN characters (including the terminating zero).
Repeated calls to this function get a sequence of the available Code Pages and generate a return code REC_OK each time. As soon as the function finds no further item to get, it returns with CHR_NOMORE_WARN, signaling that the list is complete.
The specification of this function in C# is:
RECERR kRecGetNextCodePage(out string pCodePageName);
kRecGetNextCodePage
RECERR RECAPIKRN kRecGetNextCodePage(LPTSTR pCodePageName, size_t buflen)
Performing enumeration of code pages.
There is a non-enumerating function replacing kRecGetFirstCodePage and kRecGetNextCodePage in C#:
RECERR kRecGetAllCodePages(out string[] codepages);
The specification of this function in Java is:
int kRecGetNextCodePage(String[] pCodePageName)
The specification of this function in Python is:
def kRecGetNextCodePage() -> Tuple[int, str]

◆ kRecGetPageLanguages()

RECERR RECAPIKRN kRecGetPageLanguages | ( | HPAGE | hPage,
 |  | LANG_ENA * | pOcrLanguagesOut )

Getting languages of the page.

The kRecGetPageLanguages function inquires the language selection for a given page

Parameters
[in] | hPage | Handle of the page.
[out] | pOcrLanguagesOut | Pointer to an array to get the language selection. The size of the array must be LANG_SIZE. Each element of this array represents a language from LANGUAGES.
Return values
RECERR
Note
This function could be important when Automatic Single Language Detection is used. In this case it retrieves the result of the language detection process. Usually a single language is enabled in the pOcrLanguagesOut array, which is found to be most typical of the page. Sometimes, when language detection was not sure, even two languages could be enabled in the array.
This function could be called only after a processing function (like kRecPreprocessImg, kRecLocateZones or kRecRecognize) has been called with the page. Otherwise an error is returned.
If the language detection process could not determine the language of the page it fills pOcrLanguagesOut with the language of the previous page and returns the LANGDET_INHERITED_WARN warning code.
If single language detection is disabled it returns the same array that was returned by kRecGetLanguages at the time of the last processing function.
There is no corresponding kRecSetPageLanguages function. If you want to change the language to be used for recognizing a given page (e.g. after a failed single language detection) you must do the following steps:
  1. disable automatic single language detection with kRecSetSingleLanguageDetection
  2. set the language or languages with e.g. kRecManageLanguages
  3. redo the processing functions starting with kRecPreprocessImg
The specification of this function in C# is:
RECERR kRecGetPageLanguages(IntPtr hPage, LANG_ENA[] pOcrLanguagesOut);
kRecGetPageLanguages
RECERR RECAPIKRN kRecGetPageLanguages(HPAGE hPage, LANG_ENA *pOcrLanguagesOut)
Getting languages of the page.
The specification of this function in Java is:
int kRecGetPageLanguages(HPAGE hPage, int[] pOcrLanguagesOut)
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
The specification of this function in Python is:
def kRecGetPageLanguages(hPage: "HPAGE") -> Tuple[int, "IntArray"]

◆ kRecGetRejectionSymbol()

RECERR RECAPIKRN kRecGetRejectionSymbol | ( | int | sid,
 |  | LPWCH | pwRej )

Getting the rejection symbol character.

The kRecGetRejectionSymbol function inquires the current rejection symbol setting.

Parameters
[in] | sid | Settings Collection ID.
[out] | pwRej | Pointer of a variable to get the rejection symbol setting.
Return values
RECERR
Note
This function gets the value of the setting Kernel.Chr.Rejected. This setting can be changed by kRecSetRejectionSymbol.
The specification of this function in C# is:
RECERR kRecGetRejectionSymbol(int sid, out char pwRej);
kRecGetRejectionSymbol
RECERR RECAPIKRN kRecGetRejectionSymbol(int sid, LPWCH pwRej)
Getting the rejection symbol character.
The specification of this function in Java is:
int kRecGetRejectionSymbol(int sid, char[] pwRej)
The specification of this function in Python is:
def kRecGetRejectionSymbol(sid: int) -> Tuple[int, str]

◆ kRecGetSingleLanguageDetection()

RECERR RECAPIKRN kRecGetSingleLanguageDetection | ( | int | sid,
 |  | INTBOOL * | pbEnable )

Getting the single language detection flag.

The kRecGetSingleLanguageDetection function retrieves the value of the Automatic Single Language Detection setting.

Parameters
[in] | sid | Settings Collection ID.
[in] | pbEnable | Pointer of a variable to store the single language detection flag.
Return values
RECERR
Note
This function gets the value of the setting Kernel.OcrMgr.DetectSingleLanguage. This setting can be changed by kRecSetSingleLanguageDetection.
The specification of this function in C# is:
RECERR kRecGetSingleLanguageDetection(int sid, out bool bEnable);
kRecGetSingleLanguageDetection
RECERR RECAPIKRN kRecGetSingleLanguageDetection(int sid, INTBOOL *pbEnable)
Getting the single language detection flag.
The specification of this function in Java is:
int kRecGetSingleLanguageDetection(int sid, int[] pbEnable)
The specification of this function in Python is:
def kRecGetSingleLanguageDetection(sid: int) -> Tuple[int, bool]

◆ kRecManageLanguages()

RECERR RECAPIKRN kRecManageLanguages | ( | int | sid,
 |  | MANAGE_LANG | action,
 |  | LANGUAGES | language )

Managing enabled languages.

The kRecManageLanguages function performs some basic management actions (Set, Add, Remove, Invert, Is Enabled) on the Language environment.

Parameters
[in] | sid | Settings Collection ID.
[in] | action | The management action to perform. See the MANAGE_LANG enum.
[in] | language | The single language, or a language set, to enable, disable, or inquire. See the LANGUAGES enum.
Return values
RECERR
Note
This function is an easy to use alternative to the kRecSetLanguages and kRecGetLanguages functions. It is especially handy when you need to work with a single language only, but can also be used very well in other cases.
Example of language selection for multi-lingual documents (e.g. English and German):
rc = kRecManageLanguages(sid, SET_LANG, LANG_ENG);
rc = kRecManageLanguages(sid, ADD_LANG, LANG_GER);
kRecManageLanguages
RECERR RECAPIKRN kRecManageLanguages(int sid, MANAGE_LANG action, LANGUAGES language)
Managing enabled languages.
SET_LANG
@ SET_LANG
Definition KernelApi.h:1061
ADD_LANG
@ ADD_LANG
Definition KernelApi.h:1062
LANG_GER
@ LANG_GER
Definition KernelApi.h:1119
LANG_ENG
@ LANG_ENG
Definition KernelApi.h:1117
With the SET_LANG function the language parameter can be LANG_NO as well, which is equivalent to calling kRecSetLanuages with all the array elements being LANG_DISABLED.
The language parameter can be a language set identifier as well. This is only useful when automatic single language detection is used, see kRecSetSingleLanguageDetection. When automatic single language detection is enabled, the following values can be specified as well:
  • LANG_ALL_LATIN: enable all languages with the Latin script
  • LANG_ALL_ASIAN: enable all Asian languages (CCJK, Thai and Hebrew)
  • LANG_ALL: enable all the languages
See also the details of CCJK, Arabic and Hebrew language handling.
IS_LANG_ENABLED checks if the language is enabled or not. kRecManageLanguages returns REC_OK if the language is enabled while it returns CHR_LANG_DISABLED_WARN if disabled. If the language parameter is a language set identifier (like LANG_ALL_ASIAN) REC_OK is returned if at least one of the languages in the set is enabled.
The specification of this function in C# is:
RECERR kRecManageLanguages(int sid, MANAGE_LANG action, LANGUAGES language);
MANAGE_LANG
MANAGE_LANG
Language management actions.
Definition KernelApi.h:1060
The specification of this function in Java is:
int kRecManageLanguages(int sid, MANAGE_LANG action, int language)
The specification of this function in Python is:
def kRecManageLanguages(sid: int, action: int, language: int) -> int

◆ kRecSetCodePage()

RECERR RECAPIKRN kRecSetCodePage | ( | int | sid,
 |  | LPCTSTR | pCodePageName )

Setting the code page.

The kRecSetCodePage function specifies the Code Page setting of the Engine.

Parameters
[in] | sid | Settings Collection ID.
[in] | pCodePageName | Name of the Code Page to be set. The available Code Pages can be learnt using the kRecGetFirstCodePage and kRecGetNextCodePage function-pair. Auto code page can be selected by NULL or empty string.
Return values
RECERR
Note
The current Code Page setting is taken into account in four different cases:
  • when converting a character to its 16-bit UNICODE representation (kRecConvertCodePage2Unicode or kRecConvertCodePage2UnicodeEx),
  • when converting a character from its 16-bit UNICODE representation to the current Code Page (kRecConvertUnicode2CodePage or kRecConvertUnicode2CodePageEx),
  • when interpreting the content of a PDF417 barcode
  • when converting the recognition data to the final output document during the PID_WRITEFOUTDOC process.
For most languages you may find best to use one of the unicode codepages: "Unicode" or "UTF-8".
In order to keep the Code Page setting consistent for all processing steps, it is a good practice to specify the necessary Code Page setting BEFORE calling any Code Page related function, and not to change it until the final output document has been generated.
Selecting an 8-bit Code Page is getting less and less important; for document output use one of the unicode codepages. Otherwise the selected Code Page should be able to express all characters validated for recognition (i.e. the Character Set for all the zones). The kRecCheckCodePage function can be used to decide whether the current Code Page really fulfills this requirement.
When the document contains characters missing from the currently selected Code Page (those returned by the kRecCheckCodePage call), then they are recognized, but in the final output document will be replaced by the Missing symbol (see kRecSetMissingSymbol).
If this function is not called to specify the Code Page setting, the default value of this setting will be applied (Windows: code page of the current OS, Linux and MacOS: UTF-8).
This function sets the value of the setting Kernel.Chr.CodePage. Note that this setting is not a string, but an integer value. Do not save this number but use its string representation as the numerical code value of a given code page may change. Its string representation can be retrieved by kRecGetCodePage. (The functions kRecSaveSettings and kRecSettingSave save its value in a safe mode.)
The specification of this function in C# is:
RECERR kRecSetCodePage(int sid, string pCodePageName);
kRecSetCodePage
RECERR RECAPIKRN kRecSetCodePage(int sid, LPCTSTR pCodePageName)
Setting the code page.
The specification of this function in Java is:
int kRecSetCodePage(int sid, String pCodePageName)
The specification of this function in Python is:
def kRecSetCodePage(sid: int, pCodePageName: str) -> int

◆ kRecSetDefaultFilter()

RECERR RECAPIKRN kRecSetDefaultFilter | ( | int | sid,
 |  | CHR_FILTER | Glfilter )

Changing global character set filter.

The kRecSetDefaultFilter function specifies the Global filter, i.e. a Character Set filter which will be applied globally, at page level. If this function is not called by the integrating application after the Engine's initialization, the value FILTER_ALL is applied, i.e. the Language environment will not be filtered globally. The Global filter setting is applied for all zones having the FILTER_DEFAULT in their ZONE::filter field.

Parameters
[in] | sid | Settings Collection ID.
[in] | Glfilter | Global Character Set filter to be applied.
Return values
RECERR
Note
This function sets the value of the setting Kernel.Chr.DefaultFilter. (This setting was not saved into a setting file in CSDK 15.)
If the Global filter is set to FILTER_DEFAULT by this function, the Global filter will reset to its default value FILTER_ALL.
All ZONE zones created by the kRecLocateZones function always have the FILTER_DEFAULT value in their ZONE::filter field.
Example for specifying a simple Language environment, in this case consisting of a language selection (English only) and no LanguagesPlus characters. Then a Global filter (Uppercase letters and digits only) is applied:
HPAGE hPage;
int sid = 0; // Settings Collection ID
. . .
rc = kRecManageLanguages(sid, SET_LANG, LANG_ENG);
rc = kRecLocateZones(sid, hPage, NULL);
// The function above locates the zones and gives them the FILTER_DEFAULT
// attribute
kRecSetDefaultFilter(sid, (CHR_FILTER)(FILTER_UPPERCASE | FILTER_DIGIT));
kRecSetDefaultFilter
RECERR RECAPIKRN kRecSetDefaultFilter(int sid, CHR_FILTER Glfilter)
Changing global character set filter.
FILTER_UPPERCASE
@ FILTER_UPPERCASE
Definition KernelApi.h:736
FILTER_DIGIT
@ FILTER_DIGIT
Definition KernelApi.h:734
kRecLocateZones
RECERR RECAPIKRN kRecLocateZones(int sid, HPAGE hPage)
Page parsing.
The specification of this function in C# is:
RECERR kRecSetDefaultFilter(int sid, CHR_FILTER filter);
The specification of this function in Java is:
int kRecSetDefaultFilter(int sid, CHR_FILTER Glfilter)
The specification of this function in Python is:
def kRecSetDefaultFilter(sid: int, Glfilter: int) -> int

◆ kRecSetFilterPlus()

RECERR RECAPIKRN kRecSetFilterPlus | ( | int | sid,
 |  | LPCWSTR | pFilterPlus )

Setting FilterPlus characters.

The kRecSetFilterPlus function specifies a set of individual characters, the FilterPlus characters. The FilterPlus characters can broaden the filtered set of characters globally or on a per-zone basis. To allow the use of these FilterPlus characters, the zone's ZONE::filter field should have the FILTER_PLUS value enabled.

Parameters
[in] | sid | Settings Collection ID.
[in] | pFilterPlus | Pointer of a 16-bit UNICODE string containing the FilterPlus characters to be set. (The string is terminated with a wide-character zero.)
Return values
RECERR
Note
Using this function is equivalent to using
kRecSetFilterPlusExW(sid, 0, pFilterPlus);
See kRecSetFilterPlusEx for the description of the improved function.
This function sets the value of the setting Kernel.Chr.FilterPlus. (This setting was not saved into setting file in CSDK 15.)
When characters to be added are contained in the ANSI (1252) Code Page, they can be defined on Windows as a wide-character-string literal, L"characters". If any needed character falls outside the ANSI (1252) Code Page, you can convert the string with the kRecConvertCodePage2UnicodeEx utility function, which converts character codes from UTF-8 or the current Code Page value (kRecSetCodePage) to their 16-bit UNICODE representation.
To broaden the Character Set by the defined characters, the filter value needed in the zone structure is: FILTER_ALL | FILTER_PLUS.
To add characters to a filtered language environment, the binary OR operator should be applied on FILTER_PLUS and the other filter values. The FilterPlus characters are added after the effect of the other filter elements. For example, to validate only letters and digits and the FilterPlus characters (with the punctuation and miscellaneous character categories disabled), the needed value is: FILTER_ALPHA | FILTER_DIGIT | FILTER_PLUS.
To validate only the FilterPlus characters, FILTER_PLUS must be the only filter element in the zone structure field. This disables even the letters validated by the language selection.
The specification of this function in C# is:
RECERR kRecSetFilterPlus(int sid, string pFilterPlus);
kRecSetFilterPlus
RECERR RECAPIKRN kRecSetFilterPlus(int sid, LPCWSTR pFilterPlus)
Setting FilterPlus characters.
The specification of this function in Java is:
int kRecSetFilterPlus(int sid, String pFilterPlus)
The specification of this function in Python is:
def kRecSetFilterPlus(sid: int, pFilterPlus: str) -> int

◆ kRecSetFilterPlusEx()

RECERR RECAPIKRN kRecSetFilterPlusEx | ( | int | sid,
 |  | int | index,
 |  | LPCTSTR | pFilterPlus )

Setting FilterPlus characters, extended.

The kRecSetFilterPlusEx function specifies a set of individual characters, the FilterPlus characters. The FilterPlus characters can broaden the filtered set of characters globally or on a per-zone basis. To allow the use of these FilterPlus characters, the zone's ZONE::filter field should have the FILTER_PLUS, FILTER_PLUS_1, FILTER_PLUS_2 or FILTER_PLUS_3 values enabled.

Parameters
[in] | sid | Settings Collection ID.
[in] | index | Specifies which set of FilterPlus characters to be set. Index 0 sets FILTER_PLUS, index 1 sets FILTER_PLUS_1, etc., up to FILTER_PLUS_3.
[in] | pFilterPlus | Pointer to a zero terminated string containing the FilterPlus characters to be set.
Return values
RECERR
Note
This function sets the value of the setting Kernel.Chr.FilterPlus, "Kernel.Chr.FilterPlus1", "Kernel.Chr.FilterPlus2" or "Kernel.Chr.FilterPlus3", depending on the index.
The character string can be either ASCII, UTF-8 or UTF-16 (Unicode) coded by using the kRecSetFilterPlusExA, kRecSetFilterPlusExU8 or kRecSetFilterPlusExW functions, respectively. Note that the older kRecSetFilterPlus function supports UTF-16 encoding only. The interpretation of the suffix-less kRecSetFilterPlusEx depends on the environment: On Windows it is either A or W, while on Linux and MacOS it is U8.
To broaden the Character Set by the defined characters for e.g. index 2, the filter value needed in the zone structure is: FILTER_ALL | FILTER_PLUS_2.
To add characters to a filtered language environment, the binary OR operator should be applied on the corresponding FILTER_PLUS filter and the other filter element values. The FilterPlus characters are added after the effect of the other filter elements. For example, to validate only letters and digits and the FilterPlus3 characters (with the punctuation and miscellaneous character categories disabled), the needed value is: FILTER_ALPHA | FILTER_DIGIT | FILTER_PLUS_3.
To validate only the FilterPlus characters, one of the FILTER_PLUS flags must be the only filter element in the zone structure field. This disables even the letters validated by the language selection.
Multiple FILTER_PLUS filters can be combined by ORing them. This way theoretically up to 16 FilterPlus character sets can be specified, but in practice it is easier to use the 4 uncombined ones only.
The specification of this function in C# is:
RECERR kRecSetFilterPlusEx(int sid, int index, string pFilterPlus);
kRecSetFilterPlusEx
RECERR RECAPIKRN kRecSetFilterPlusEx(int sid, int index, LPCTSTR pFilterPlus)
Setting FilterPlus characters, extended.
The specification of this function in Java is:
int kRecSetFilterPlusEx(int sid, int index, String pFilterPlus)
The specification of this function in Python is:
def kRecSetFilterPlusEx(sid: int, index: int, pFilterPlus: str) -> int

◆ kRecSetLanguages()

RECERR RECAPIKRN kRecSetLanguages | ( | int | sid,
 |  | const LANG_ENA * | pLanguages )

Setting languages.

The kRecSetLanguages function defines the main part of the Language environment of the Character Set. The available languages are represented by the LANGUAGES enum.

Parameters
[in] | sid | Settings Collection ID.
[in] | pLanguages | Address of a LANG_ENA array containing the enabled/disabled information for each language available.
Return values
RECERR
Note
The Language environment is primarily determined by the language selection, optionally supplemented by the LanguagesPlus characters setting.
The language selection is specified through a LANG_ENA type array, where a LANG_ENABLED value means that the language represented by this element is supported. This array must have LANG_SIZE number of elements.
See also the details of CCJK, Arabic and Hebrew language handling.
The recognition module selected for recognition of a zone may also impose restrictions, e.g. the RER recognition module cannot handle Greek characters.
If this function is not called to specify the language(s) to be recognized, the default value, English language, is applied.
Setting the proper Language environment before calling kRecPreprocessImg is recommended to improve the efficiency of image preprocessing. Especially for Asian languages it is essential that the language be set before kRecPreprocessImg.
For selecting a single language (or few languages) you may find the kRecManageLanguages function handy.
Example of language selection for multi-lingual documents (e.g. English and German):
LANG_ENA pLang[LANG_SIZE];
for (int i=0; i<LANG_SIZE; i++) {
pLang[i] = LANG_DISABLED;
}
pLang[LANG_ENG] = LANG_ENABLED;
pLang[LANG_GER] = LANG_ENABLED;
rc = kRecSetLanguages(sid, pLang);
kRecSetLanguages
RECERR RECAPIKRN kRecSetLanguages(int sid, const LANG_ENA *pLanguages)
Setting languages.
LANG_DISABLED
@ LANG_DISABLED
Definition KernelApi.h:1052
LANG_ENABLED
@ LANG_ENABLED
Definition KernelApi.h:1053
LANG_SIZE
@ LANG_SIZE
Definition KernelApi.h:1275
Automatic Single Language Detection is available for cases when the page contains a single language but this language is not known. For details see also kRecSetSingleLanguageDetection.
This function sets the value of the setting Kernel.Languages. This setting can be retrieved by kRecGetLanguages.
The specification of this function in C# is:
RECERR kRecSetLanguages(int sid, LANG_ENA[] pLanguages);
The specification of this function in Java is:
int kRecSetLanguages(int sid, int[] pLanguages)
The specification of this function in Python is:
def kRecSetLanguages(sid: int, pLanguages: "IntArray") -> int

◆ kRecSetLanguagesPlus()

RECERR RECAPIKRN kRecSetLanguagesPlus | ( | int | sid,
 |  | LPCWSTR | pOcrLplus )

Setting LanguagesPlus characters.

The kRecSetLanguagesPlus function specifies some individual characters, the LanguagesPlus characters. The set of LanguagesPlus characters is added to the set of characters determined by the language selection (kRecSetLanguages). The resulting set of characters is called the Language environment.

Parameters
[in] | sid | Settings Collection ID.
[in] | pOcrLplus | Pointer to a 16-bit UNICODE string containing the LanguagesPlus characters to be set. (The string is terminated with a wide-character zero.)
Return values
RECERR
Note
This function sets the value of the setting Kernel.Chr.LanguagesPlus. (This setting was not saved into setting file in CSDK 15.)
This function is useful if a client believes the accented letters validated for a given language are insufficient, or for handling texts containing foreign words.
When non-selectable languages need to be handled, it is usually best to select English only and validate the needed accented letters individually.
When characters to be added are contained in the ANSI (1252) Code Page, the easiest way to define the string to be passed on Windows is with a wide-character-string literal, L"characters". If any needed character falls outside the ANSI (1252) Code Page, you can convert the string with the kRecConvertCodePage2UnicodeEx utility function which converts character codes from UTF-8 or the current Code Page value (kRecSetCodePage) to their 16-bit UNICODE representation.
Another typical use of the kRecSetLanguagesPlus function: two characters (Small E Acute and Capital E Acute) should be added to the German language:
WCHAR *pLangPlus = L"éÉ"; // Works this way on Windows only!
rc = kRecManageLanguages(sid, SET_LANG, LANG_GER);
rc = kRecSetLanguagesPlus(sid, pLangPlus);
kRecSetLanguagesPlus
RECERR RECAPIKRN kRecSetLanguagesPlus(int sid, LPCWSTR pOcrLplus)
Setting LanguagesPlus characters.
The specification of this function in C# is:
RECERR kRecSetLanguagesPlus(int sid, string pOcrLplus);
The specification of this function in Java is:
int kRecSetLanguagesPlus(int sid, String pOcrLplus)
The specification of this function in Python is:
def kRecSetLanguagesPlus(sid: int, pOcrLplus: str) -> int

◆ kRecSetMissingSymbol()

RECERR RECAPIKRN kRecSetMissingSymbol | ( | int | sid,
 |  | WCHAR | wMiss )

Setting the missing symbol character.

The kRecSetMissingSymbol specifies the code of the missing symbol. The missing symbol is a special character that replaces any character that was recognized by the Engine but could not be represented in the final output document, since the character does not exist in the current Code Page.

Parameters
[in] | sid | Settings Collection ID.
[in] | wMiss | The missing symbol to be set.
Return values
RECERR
Note
During the conversion to the final output document the kRecConvert2DTXT function tries to find a replacement character with a similar shape for one not supported by the current Code Page. Only if this attempt was not successful, the missing symbol will be sent into the final output document.
If this function is not called the default missing character, L'^' (the CIRCUMFLEX character) will be applied.
It is best to use a keyboard character for the missing symbol, so that it is supported by all Code Pages. If the defined missing symbol is itself missing from the selected Code Page, a character with a similar shape is set and a CHR_MISSINGEXPORT_ERR error code is returned.
If the missing symbol to be set is contained within the ANSI 1252 Code Page, you can define it with a character literal, e.g.: L'#'. If it is not, a numeric UNICODE value should be given.
This function sets the value of the setting Kernel.Chr.Missing. This setting can be retrieved by kRecGetMissingSymbol.
The specification of this function in C# is:
RECERR kRecSetMissingSymbol(int sid, char wMiss);
kRecSetMissingSymbol
RECERR RECAPIKRN kRecSetMissingSymbol(int sid, WCHAR wMiss)
Setting the missing symbol character.
The specification of this function in Java is:
int kRecSetMissingSymbol(int sid, char wMiss)
The specification of this function in Python is:
def kRecSetMissingSymbol(sid: int, wMiss: str) -> int

◆ kRecSetRejectionSymbol()

RECERR RECAPIKRN kRecSetRejectionSymbol | ( | int | sid,
 |  | WCHAR | wRej )

Setting the rejection symbol character.

The kRecSetRejectionSymbol function specifies which character is to be used as a symbol for the rejected characters (i.e. unrecognized by the recognition module used in the zone) in the final output document.

Parameters
[in] | sid | Settings Collection ID.
[in] | wRej | The rejection symbol to be set.
Return values
RECERR
Note
In the Engine there is a special internal code (UNICODE_REJECTED) for marking the unrecognized characters (called rejected characters). However, when exporting to the final output document, the recognition result must also contain this information. The character which will be used as a placeholder for rejected characters is the rejection symbol.
If this function is not called, the default rejection character, L'~' (the TILDE character) will be applied.
It is best to use a keyboard character for the rejection symbol, so that it is supported by all Code Pages. If the defined rejection character is missing from the selected Code Page, a character with a similar shape is set and a CHR_MISSINGEXPORT_ERR error code is returned.
If the rejection symbol to be set is contained within the ANSI 1252 Code Page, you can define it with a character literal, e.g.: L'#'. If it is not, a numeric UNICODE value should be given.
This function sets the value of the setting Kernel.Chr.Rejected. This setting can be retrieved by kRecGetRejectionSymbol.
The specification of this function in C# is:
RECERR kRecSetRejectionSymbol(int sid, char wRej);
kRecSetRejectionSymbol
RECERR RECAPIKRN kRecSetRejectionSymbol(int sid, WCHAR wRej)
Setting the rejection symbol character.
The specification of this function in Java is:
int kRecSetRejectionSymbol(int sid, char wRej)
The specification of this function in Python is:
def kRecSetRejectionSymbol(sid: int, wRej: str) -> int

◆ kRecSetSingleLanguageDetection()

RECERR RECAPIKRN kRecSetSingleLanguageDetection | ( | int | sid,
 |  | INTBOOL | bEnable )

Automatic Single Language Detection.

The kRecSetSingleLanguageDetection function enables or disables Automatic Single Language Detection mode.

Parameters
[in] | sid | Settings Collection ID.
[in] | bEnable | Flag that indicates whether Automatic Single Language Detection is enabled or disabled.
Return values
RECERR
Note
The default value of this setting is FALSE. In this case the language of the document must be known and specified before calling the first processing function (typically kRecPreprocessImg). More than one languages can be specified even if the document contains text written in those languages, but it is suggested to use few (not more than 5) languages only. The recognition engine uses all those language dictionaries to recognize the words in the document.
When the language of the document is not known, automatic detection can be requested by calling this function with TRUE parameter and enabling all possible languages with the kRecSetLanguages or kRecManageLanguages functions.
When Automatic Single Language Detection is enabled, the engine works in a special mode: when the first processing function is called (typically kRecPreprocessImg) it tries to determine the language of the page by inspecting the letters and words found on it. The page may contain a single language only, but this language can be any Latin-alphabet or CCJK language or the Arabic one. Further processing in this mode uses the detected language to process the page. If the language cannot be determined, the language of the previous page will be used.
Latin-alphabet languages without dictionary are not supported. See the list of the language dictionaries of the OmniPage CSDK.
Automatic detection of Vietnamese, Thai and Hebrew languages are not supported. Very clean documents in Greek, Russian and other Cyrillic languages can be processed with Single Language Detection, but making your application depend on automatic detection of these languages is not encouraged.
To improve detection accuracy, it is worth limiting the set of possible languages by enabling only those languages in the language array that should be considered. There are some special LANG_ALL language set identifiers to make the selection of languages easier. For example, the following code selects all Latin-alphabet and all Asian languages to be used at single language detection:
rc = kRecSetSingleLanguageDetection(sid, TRUE);
rc = kRecManageLanguages(sid, SET_LANG, LANG_ALL_LATIN);
rc = kRecManageLanguages(sid, ADD_LANG, LANG_ALL_ASIAN);
kRecSetSingleLanguageDetection
RECERR RECAPIKRN kRecSetSingleLanguageDetection(int sid, INTBOOL bEnable)
Automatic Single Language Detection.
LANG_ALL_LATIN
@ LANG_ALL_LATIN
Definition KernelApi.h:1108
LANG_ALL_ASIAN
@ LANG_ALL_ASIAN
Definition KernelApi.h:1109
You can limit the set of languages to be considered in the automatic detection even more precisely. For example, the following code enables some Western plus the Japanese and Korean languages only:
rc = kRecSetSingleLanguageDetection(sid, TRUE);
rc = kRecManageLanguages(sid, SET_LANG, LANG_NO);
rc = kRecManageLanguages(sid, ADD_LANG, LANG_ENG);
rc = kRecManageLanguages(sid, ADD_LANG, LANG_GER);
rc = kRecManageLanguages(sid, ADD_LANG, LANG_FRE);
rc = kRecManageLanguages(sid, ADD_LANG, LANG_JPN);
rc = kRecManageLanguages(sid, ADD_LANG, LANG_KRN);
LANG_JPN
@ LANG_JPN
Definition KernelApi.h:1254
LANG_FRE
@ LANG_FRE
Definition KernelApi.h:1120
LANG_NO
@ LANG_NO
Definition KernelApi.h:1115
LANG_KRN
@ LANG_KRN
Definition KernelApi.h:1260
The kRecGetPageLanguages function can be used to learn the detected language of the page.
Automatic Single Language Detection is performed as a relatively fast initial processing step before character recognition, therefore its accuracy is very much dependent on the image quality and many other conditions. Use it mostly in unattended applications where the document's language is not known.
There is no individual function to detect the language of a page. If you want to learn the language, for example, to show it as a hint for the user before recognition, you must do the following steps:
  1. enable automatic single language detection with kRecSetSingleLanguageDetection
  2. set the languages to choose the single language from with e.g. kRecManageLanguages
  3. call kRecPreprocessImg
  4. learn the detected language by calling kRecGetPageLanguages
This function sets the value of the setting Kernel.OcrMgr.DetectSingleLanguage.
The specification of this function in C# is:
RECERR kRecSetSingleLanguageDetection(int sid, bool bEnable);
The specification of this function in Java is:
int kRecSetSingleLanguageDetection(int sid, int bEnable)
The specification of this function in Python is:
def kRecSetSingleLanguageDetection(sid: int, bEnable: bool) -> int


RecAPI: LANGUAGE_INFO Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
LANGUAGE_INFO Struct Reference
KernelAPI » Language, Character Set and Code Page Handling Module

Language info. More...

#include <KernelApi.h>

Public Attributes

BASIC_LANGUAGE_CHARSET iLangGroup
CONTINENT iContinent
char | EnglishName [17]
char | Name_BCP_47 [11]
char | Name_Int_3 [4]
char | Name_639_1 [3]
char | Name_639_2B [4]
char | Name_639_3 [4]
char | Name_Win_3 [4]
WORD | LangID
RM_FLAGS rm_support

Detailed Description

Language info.

This structure gives detailed information about a given language (kRecGetLanguageInfo). In addition, it can be used to select a set of languages (kRecFindLanguages). The supported standards are ISO/DIS 639-1, ISO/DIS 639-2/B, ISO/DIS 639-3, BCP 47 and Windows 3-letter language codes as well as CSDK internal 3-letter codes. There are some special language codes handled in a different way. See the list of language identifiers for details.

Member Data Documentation

◆ EnglishName

char LANGUAGE_INFO::EnglishName[17]

English descriptive name of the language, zero terminated string.

◆ iContinent

CONTINENT LANGUAGE_INFO::iContinent

Geographical location.

◆ iLangGroup

BASIC_LANGUAGE_CHARSET LANGUAGE_INFO::iLangGroup

Language group (basic character set).

◆ LangID

WORD LANGUAGE_INFO::LangID

Windows LANGID (LCID) for the language. Not all languages have a Windows LANGID; in these cases, this field contains the ID of English.

◆ Name_639_1

char LANGUAGE_INFO::Name_639_1[3]

2 letter language name abbreviation (ISO/DIS 639-1) zero terminated string.

◆ Name_639_2B

char LANGUAGE_INFO::Name_639_2B[4]

3 letter language name abbreviation for bibliography (ISO/DIS 639-2/B) zero terminated string.

◆ Name_639_3

char LANGUAGE_INFO::Name_639_3[4]

3 letter language name abbreviation (ISO/DIS 639-3) zero terminated string.

◆ Name_BCP_47

char LANGUAGE_INFO::Name_BCP_47[11]

BCP 47 language name abbreviation, zero terminated string.

◆ Name_Int_3

char LANGUAGE_INFO::Name_Int_3[4]

3 letter CSDK Internal language name abbreviation, zero terminated string.

◆ Name_Win_3

char LANGUAGE_INFO::Name_Win_3[4]

3 letter language name abbreviation for Windows (non-ISO) zero terminated string.

◆ rm_support

RM_FLAGS LANGUAGE_INFO::rm_support

Recognition modules that are able to process text written in this language.


RecAPI: Spell Checking Module

Macros | Typedefs | Enumerations | Functions
Spell Checking Module
KernelAPI

Spell checking for accuracy improvement. More...

Macros

#define | DICTDESCLEN 64
The maximum length of the vertical dictionary description (including the terminating zero)
#define | MAXUDITEMLEN 64
Maximal character length needed for user dictionary items.

Typedefs

typedef CHECKWORDRETURNCODE * | LPCHECKWORDRETURNCODE
Deprecated. This functionality is no longer supported in CSDK18. It will be removed from the next version of the CSDK.
typedef const CHECKWORDRETURNCODE * | LPCCHECKWORDRETURNCODE
Deprecated. This functionality is no longer supported in CSDK18. It will be removed from the next version of the CSDK.
typedef DWORD RECKRNCALL | CHECKWORD_CB(int nZone, LPCWSTR pTobechecked, LPCHECKWORDRETURNCODE pOpinion, void *pReserved)
Deprecated. This functionality is no longer supported in CSDK18. It will be removed from the next version of the CSDK.
typedef CHECKWORD_CB * | LPCHECKWORD_CB
Deprecated. This functionality is no longer supported in CSDK18. It will be removed from the next version of the CSDK.
typedef char | VDICTDESC[DICTDESCLEN]
Type for storing the description of a vertical dictionary.

Enumerations

enum CHECKWORDRETURNCODE
Deprecated. This functionality is no longer supported in CSDK18. It will be removed from the next version of the CSDK.
enum UDSAVESTYLE {
UDSS_INTERNAL ,
UDSS_ORIGINAL ,
UDSS_TEXT ,
UDSS_UNICODE_TEXT
}
User dictionary saving styles. More...

Functions

RECERR RECAPIKRN | kRecSetSpell (int sid, INTBOOL bChksubsystem)
Enabling checking module.
RECERR RECAPIKRN | kRecGetSpell (int sid, INTBOOL *pEnable)
Inquiring whether the checking module is enabled.
RECERR RECAPIKRN | kRecSetSpellCorrection (int sid, INTBOOL bCorrection)
Retained only for compatibility.
RECERR RECAPIKRN | kRecGetSpellCorrection (int sid, LPINTBOOL pCorrection)
Retained only for compatibility.
RECERR RECAPIKRN | kRecGetFirstSpellLanguage (LANGUAGES *pLang)
Starting enumeration of spell languages.
RECERR RECAPIKRN | kRecGetNextSpellLanguage (LANGUAGES *pLang)
Performing enumeration of spell languages.
RECERR RECAPIKRN | kRecSetSpellLanguage (int sid, LANGUAGES SpellLang)
Setting spell language.
RECERR RECAPIKRN | kRecGetSpellLanguage (int sid, LANGUAGES *pSpellLang)
Getting spelling language.
RECERR RECAPIKRN | kRecGetFirstVerticalDict (LANGUAGES *pLang, VDICTDESC name)
Starting enumeration of vertical dictionaries.
RECERR RECAPIKRN | kRecGetNextVerticalDict (LANGUAGES *pLang, VDICTDESC name)
Performing enumeration of vertical dictionaries.
RECERR RECAPIKRN | kRecSetVerticalDictionaries (int sid, VDICTDESC *names, int nNames)
Setting vertical dictionaries.
RECERR RECAPIKRN | kRecGetVerticalDictionaries (int sid, VDICTDESC *name, int nBuffers, int *nNames)
Getting vertical dictionaries.
RECERR RECAPIKRN | kRecSetUserDictionary (int sid, LPCTSTR pFilename, LPCTSTR pDefaultSection)
Setting user dictionary.
RECERR RECAPIKRN | kRecGetUserDictionary (int sid, LPTSTR pFilename, size_t iSize1, LPTSTR pDefaultSection, size_t iSize2)
Getting user dictionary.
RECERR RECAPIKRN | kRecOpenMaintenanceUD (int sid)
Opening user dictionary for editing.
RECERR RECAPIKRN | kRecGetUDState (int sid, LPINTBOOL pChanged)
Inquiring whether the user dictionary is changed.
RECERR RECAPIKRN | kRecSaveUD (int sid, LPCTSTR pFilename, UDSAVESTYLE saveStyle)
Saving user dictionary.
RECERR RECAPIKRN | kRecCloseMaintenanceUD (int sid)
Closing a user dictionary opened for editing.
RECERR RECAPIKRN | kRecGetFirstSectionUD (int sid, LPTSTR pSection, size_t buflen)
Deprecated. This functionality is no longer supported in CSDK18-19. It will be removed from the next version of the CSDK.
RECERR RECAPIKRN | kRecGetNextSectionUD (int sid, LPTSTR pSection, size_t buflen)
Deprecated. This functionality is no longer supported in CSDK18-19. It will be removed from the next version of the CSDK.
RECERR RECAPIKRN | kRecGetFirstItemUD (int sid, LPCTSTR pSection, LPWSTR pUDitem, size_t buflen, LPDWORD pitemattrib)
Starting enumeration of UDitems.
RECERR RECAPIKRN | kRecGetNextItemUD (int sid, LPWSTR pUDitem, size_t buflen, LPDWORD pitemattrib)
Performing enumeration of items.
RECERR RECAPIKRN | kRecDeleteSectionUD (int sid, LPCTSTR section)
Deprecated. This functionality is no longer supported in CSDK18-19. It will be removed from the next version of the CSDK.
RECERR RECAPIKRN | kRecAddItemUD (int sid, LPCTSTR pSection, LPCWSTR pUDitem, DWORD itemattrib)
Adding an item to the user dictionary.
RECERR RECAPIKRN | kRecAddListUD (int sid, LPCTSTR pFilename, LPCSTR section)
Adding a user dictionary to an other one.
RECERR RECAPIKRN | kRecDeleteItemUD (int sid, LPCTSTR pSection, LPCWSTR pUDitem, DWORD itemattrib)
Removing an item from the user dictionary.
RECERR RECAPIKRN | kRecGetSectionCount (int sid, size_t *pSectCount)
Deprecated. This functionality is no longer supported in CSDK18-19. It will be removed from the next version of the CSDK.
RECERR RECAPIKRN | kRecGetSection (int sid, size_t nSectIndex, LPTSTR pSectName, size_t buflen)
Deprecated. This functionality is no longer supported in CSDK18-19. It will be removed from the next version of the CSDK.
RECERR RECAPIKRN | kRecGetItemCount (int sid, size_t nSectIndex, size_t *pItemCount)
Getting the number of items in the user dictionary.
RECERR RECAPIKRN | kRecGetSectItem (int sid, size_t nSectIndex, size_t nItemIndex, LPWSTR pItem, size_t iBufSize, LPDWORD pFlag)
Deprecated. This functionality is no longer supported in CSDK18-19. It will be removed from the next version of the CSDK.
RECERR RECAPIKRN | kRecGetSectionIndex (int sid, LPCTSTR pSection, size_t *pIndex)
Deprecated. This functionality is no longer supported in CSDK18-19. It will be removed from the next version of the CSDK.
RECERR RECAPIKRN | kRecGetLastInsertPos (int sid, size_t nSectIndex, size_t *pPos)
Deprecated. This functionality is no longer supported in CSDK18-19. It will be removed from the next version of the CSDK.
RECERR RECAPIKRN | kRecCreateEmptySection (int sid, LPCTSTR pSectName)
Deprecated. This functionality is no longer supported in CSDK18-19. It will be removed from the next version of the CSDK.

Detailed Description

Spell checking for accuracy improvement.

This module has an effect during recognition only when the following configurations are used:

  • RM_OMNIFONT_PLUS3W,
  • RM_OMNIFONT_PLUS2W,
  • RM_OMNIFONT_MOR,
  • RM_MAT,
  • RM_HNR.

The modules MAT and HNR are supported on: Windows, PLUS3W is supported on: Windows, Linux, MacOS.

IMPORTANT NOTE: This module runs as part of the OCR engine processing, not as a separated post-processing step. Thus it may help the engines to improve the OCR result, but it cannot rewrite all the results from the OCR. It is always the OCR engine that is responsible for deciding how it uses the opinions coming from the Spell module, i.e. it is not the Spell Module that really modifies the result.

The checking module consists of two separate and independent parts, their combination can be enabled. They determine the acceptability of words and run in the following order:

  1. UD-checking: checking against the User dictionary (words, strings),
  2. Spell checking: using language-specific dictionary elements - main dictionaries and (is specified) vertical dictionaries.

The running order means that if an earlier step declares that a word is possible, the later ones do not re-evaluate it and will not change the decision.

Remember that this checking can still be enabled or disabled separately at the zone level.

The UD-checking runs only when the spell language setting (kRecSetSpellLanguage) is set to LANG_AUTO, LANG_UD or LANG_NO. The Spell checking does not run when this setting is LANG_UD or LANG_NO.

See also
The settings of the Spell Checking Module
Spell Checking Module related pages

Spell checking

Spell checking uses third-party language-specific spell checkers. There are two kinds of the spell checkers:

  • Language dictionaries (language checking), and
  • Vertical dictionaries ("vertical language checking").

Language dictionaries:
The OmniPage CSDK v2025.1 is delivered with 21 different Language dictionary files. These are generic language dictionaries; they contain between 100,000 and 200,000 entries. You can delete or remove any or all of them, but if you want to use a spell language after removing its file the result is undetermined. See the list about the supported spelling languages and the appropriate language dictionary files.

Vertical dictionaries: these are based on specific professions. They can be treated as extensions to the language dictionaries, but they can also be used when no Language dictionary is specified.

The Capture SDK is delivered with 9 different Vertical dictionaries.

Specifying the Spelling language (kRecSetSpellLanguage) (that is, the Language dictionary) and/or a Vertical dictionary (kRecSetVerticalDictionaries) are page-level settings. Once a Language dictionary is specified, the language checking will be applied to all zones on the page, unless their CHK_LANGDICT_PROHIBIT flag is set.

Similarly, once a Vertical dictionary is specified, the vertical language checking will be applied to all zones on the page, unless their CHK_VERTDICT_PROHIBIT flag is set.

When the Spelling language is set to LANG_NO, or when it specifies a language for which there is no Language dictionary, the language checking will not be activated for the page zones.

Spell checking with automatic spell language selection

In the default case, with the Spelling language set to LANG_AUTO, language checking will be based on the recognition language selection (kRecSetLanguages) as follows:

  • If recognition language selection is empty, there will not be language checking.
  • If one recognition language is set, this language will be automatically selected for language checking under the assumption that the appropriate Language dictionary is available.
  • If two or more languages are selected for recognition, language checking will be done for all selected languages that have an available Language dictionary.

UD-checking

The checking module also uses User dictionaries (kRecSetUserDictionary). A User dictionary is a collection of user-specific elements, so-called UDitems. A UDitem is a word as in the case of any wordprocessor's user dictionary.

User dictionary items are UNICODE strings and they must be no longer than MAXUDITEMLEN characters (including the terminating zero). They may contain spaces and punctuation characters.

A string under checking will be accepted if it conforms to at least one item of the User dictionary.

You may find UD-checking particularly useful in several scenarios:

  • If the application uses spell checking and it consistently encounters correctly spelled words marked as uncertain, or
  • when you know that the document contains many proper nouns.

In such cases, the application can reduce unwanted marking and improve recognition accuracy by performing UD-checking. Assuming that the User Dictionary has been already prepared (by adding the required words to it), this will supplement spell checking. That is, in this case, UD-checking is complementary to spell checking.

UD-checking without enabled spell checking is typically used in form-like applications (e.g. questionnaires), or in any scenario where the data to be recognized is highly structured and follows predictable patterns.

Specifying the User dictionary file itself is a page-level setting. Once one is specified, it will be applied to all zones on the page. You can disable UD-checking for specific zones using the CHK_USERDICT_PROHIBIT flag.

User Dictionaries can also be created or modified by KernelAPI calls: kRecOpenMaintenanceUD, kRecCloseMaintenanceUD, kRecAddItemUD, kRecSaveUD, etc.

Language of a word

The LETTER structure contains the fields lang and lang2 to specify the language of the word. There is also a flag in the info field for marking dictionary words. They are used as follows:

 | lang | lang2 | RR_DICTIONARY_WORD
Non-dictionary word | language of the zone* | LANG_NO | false
User dictionary word | LANG_UD | LANG_NO | true
Single-dictionary word | LANG_*** | LANG_NO | true
Multi-dictionary word | primary LANG_*** | secondary LANG_*** | true

* The language of the zone is the most used language in the zone.

See also the section The notion of word in CSDK. In some cases parts of a dashed word could have different languages, for example "semi-doux".

Confidence

The LETTER::err field is a combined value. Its most significant bit is used to express the certainty/uncertainty of the word. (If this bit is set to 1, the word is uncertain RE_SUSPECT_WORD.) The remaining bits express the certainty of the character recognition. A value close to 0 means that the Engine recognized the character with high confidence. A value close to 99 means low confidence. A value of 100 or above means a rejected character. In some cases a word may have some or all characters that are individually suspicious but the characters are not marked as such in the word bit. This is usually a result of language or user dictionary checking, meaning that the word was validated by the checking module.

Applications that examine the character confidence information can use a threshold value, above which the character code is treated as a suspicious result. A value of 64 is recommended for this purpose (RE_SUSPECT_THR). A value less than 64 will indicate that the character was recognized with high confidence. A value of 64 or greater marks that the code is suspicious.

Note
The confidence reporting system works best when all three recognition modules are used in the voting scheme (RM_OMNIFONT_PLUS3W). If other machine print recognition modules are used (RM_OMNIFONT_PLUS2W, RM_OMNIFONT_MTX, etc), confidence information is still available, but the system's ability to report on confidence properly is reduced. This will result in a higher level of false negative and false positive reporting of suspicious recognition results.

Enumeration Type Documentation

◆ UDSAVESTYLE

enum UDSAVESTYLE

User dictionary saving styles.

This enum type specifies the possible output styles at saving user dictionary. It can be used at calling kRecSaveUD.

Enumerator
UDSS_INTERNAL | user dictionary format of the Capture SDK.
UDSS_ORIGINAL | Keeps the original format of the loaded dictionary. When a new one is created, this value is equivalent to UDSS_INTERNAL.
UDSS_TEXT | A Windows ANSI text file containing a word list.
UDSS_UNICODE_TEXT | A Unicode text file containing a word list.

Function Documentation

◆ kRecAddItemUD()

RECERR RECAPIKRN kRecAddItemUD | ( | int | sid,
 |  | LPCTSTR | pSection,
 |  | LPCWSTR | pUDitem,
 |  | DWORD | itemattrib )

Adding an item to the user dictionary.

The kRecAddItemUD function adds a new user dictionary item (or simply UDitem) that is a word to the user dictionary currently opened for editing by kRecOpenMaintenanceUD.

Parameters
[in] | sid | Settings Collection ID.
[in] | pSection | Deprecated. It must be NULL or empty string.
[in] | pUDitem | Pointer to a 16-bit UNICODE string containing the item to be added.
[in] | itemattrib | Unused parameter. It must be 0.
Return values
RECERR
Note
user dictionary items are 16-bit UNICODE strings and they must be no longer than MAXUDITEMLEN characters (including the terminating zero). They may contain spaces and punctuation characters.
When all of the characters to be added are contained in the ANSI (1252) Code Page, the easiest way to define the item string on Windows is with a wide-character-string literal, L"characters". If any needed character falls outside the ANSI (1252) Code Page, you can convert the string with kRecConvertCodePage2UnicodeEx, which converts character codes from UTF-8 or the current single-byte Code Page value (kRecSetCodePage) to their 16-bit UNICODE representation.
Example for creating a user dictionary and adding items to it:
RECERR rc;
LPSTR dictname = "USERDIC1.DIC";
LPCWSTR itemtobeadded1 = L"Los Gatos";
LPCWSTR itemtobeadded2 = L"Budapest";
rc = kRecSetUserDictionary(sid, NULL, NULL);
rc = kRecOpenMaintenanceUD(sid);
rc = kRecAddItemUD(sid, NULL, itemtobeadded1, 0);
rc = kRecAddItemUD(sid, NULL, itemtobeadded2, 0);
rc = kRecSaveUD(sid, dictname, FALSE);
rc = kRecCloseMaintenanceUD(sid);
rc = kRecSetUserDictionary(sid, dictname, NULL);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
kRecOpenMaintenanceUD
RECERR RECAPIKRN kRecOpenMaintenanceUD(int sid)
Opening user dictionary for editing.
kRecSetUserDictionary
RECERR RECAPIKRN kRecSetUserDictionary(int sid, LPCTSTR pFilename, LPCTSTR pDefaultSection)
Setting user dictionary.
kRecAddItemUD
RECERR RECAPIKRN kRecAddItemUD(int sid, LPCTSTR pSection, LPCWSTR pUDitem, DWORD itemattrib)
Adding an item to the user dictionary.
kRecCloseMaintenanceUD
RECERR RECAPIKRN kRecCloseMaintenanceUD(int sid)
Closing a user dictionary opened for editing.
kRecSaveUD
RECERR RECAPIKRN kRecSaveUD(int sid, LPCTSTR pFilename, UDSAVESTYLE saveStyle)
Saving user dictionary.
The specification of this function in C# is:
RECERR kRecAddItemUD(int sid, string section, string pUDitem, uint itemattrib);
The specification of this function in Java is:
int kRecAddItemUD(int sid, String pSection, String pUDitem, long itemattrib)
The specification of this function in Python is:
def kRecAddItemUD(sid: int, pSection: str, pUDitem: str, itemattrib: int) -> int

◆ kRecAddListUD()

RECERR RECAPIKRN kRecAddListUD | ( | int | sid,
 |  | LPCTSTR | pFilename,
 |  | LPCSTR | section )

Adding a user dictionary to an other one.

This function adds all the items of a user dictionary to the one that is opened for maintenance. The specified user dictionary can be in the UD format of the CSDK or a simple word list as well.

Parameters
[in] | sid | Settings Collection ID.
[in] | pFilename | The name of the user dictionary to be added.
[in] | section | Deprecated. It must be NULL.
Return values
RECERR
Note
See also kRecAddItemUD.
The specification of this function in C# is:
RECERR kRecAddListUD(int sid, string filename, string section, bool keepSection);
kRecAddListUD
RECERR RECAPIKRN kRecAddListUD(int sid, LPCTSTR pFilename, LPCSTR section)
Adding a user dictionary to an other one.
The specification of this function in Java is:
int kRecAddListUD(int sid, String pFilename, String section)
The specification of this function in Python is:
def kRecAddListUD(sid: int, pFilename: str, section: str) -> int

◆ kRecCloseMaintenanceUD()

RECERR RECAPIKRN kRecCloseMaintenanceUD ( int sid )

Closing a user dictionary opened for editing.

The kRecCloseMaintenanceUD function closes the user dictionary previously opened by the kRecOpenMaintenanceUD function.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
For saving the latest changes made to the user dictionary, a call to the kRecSaveUD is necessary before calling this function.
If the dictionary is not saved, the changes made disappear even in the current Settings Collection.
The specification of this function in C# is:
RECERR kRecCloseMaintenanceUD(int sid);
The specification of this function in Java is:
int kRecCloseMaintenanceUD(int sid)
The specification of this function in Python is:
def kRecCloseMaintenanceUD(sid: int) -> int

◆ kRecDeleteItemUD()

RECERR RECAPIKRN kRecDeleteItemUD | ( | int | sid,
 |  | LPCTSTR | pSection,
 |  | LPCWSTR | pUDitem,
 |  | DWORD | itemattrib )

Removing an item from the user dictionary.

The kRecDeleteItemUD function deletes a word from the user dictionary currently opened for editing by kRecOpenMaintenanceUD.

Parameters
[in] | sid | Settings Collection ID.
[in] | pSection | Deprecated. It must be NULL or empty string.
[in] | pUDitem | Pointer to a 16-bit UNICODE string containing the word to be deleted. (The string is terminated with a wide-character zero.)
[in] | itemattrib | Unused parameter. It must be 0.
Return values
RECERR
Note
When all the characters of the item string are contained in the ANSI (1252) Code Page, the easiest way to define it on Windows is with a wide-character-string literal, L"characters". If any needed character falls outside the ANSI (1252) Code Page, you can convert the string with the kRecConvertCodePage2UnicodeEx, which converts character codes from UTF-8 or the current single-byte Code Page value (kRecSetCodePage) to their 16-bit UNICODE representation.
The specification of this function in C# is:
RECERR kRecDeleteItemUD(int sid, string pSection, string pUDitem, uint itemattrib);
kRecDeleteItemUD
RECERR RECAPIKRN kRecDeleteItemUD(int sid, LPCTSTR pSection, LPCWSTR pUDitem, DWORD itemattrib)
Removing an item from the user dictionary.
The specification of this function in Java is:
int kRecDeleteItemUD(int sid, String pSection, String pUDitem, long itemattrib)
The specification of this function in Python is:
def kRecDeleteItemUD(sid: int, pSection: str, pUDitem: str, itemattrib: int) -> int

◆ kRecGetFirstItemUD()

RECERR RECAPIKRN kRecGetFirstItemUD | ( | int | sid,
 |  | LPCTSTR | pSection,
 |  | LPWSTR | pUDitem,
 |  | size_t | buflen,
 |  | LPDWORD | pitemattrib )

Starting enumeration of UDitems.

The kRecGetFirstItemUD function (together with the kRecGetNextItemUD) function creates an item-list from the currently opened user dictionary. This function returns the first item of the user dictionary.

Parameters
[in] | sid | Settings Collection ID.
[in] | pSection | Deprecated. It must be NULL or empty string.
[out] | pUDitem | Pointer of a buffer to get the first item of the item-list. (16-bit UNICODE string.)
[in] | buflen | Specifies the size of the buffer in bytes.
[out] | pitemattrib | Unused parameter. It must be NULL.
Return values
RECERR
Note
User dictionary items are 16-bit UNICODE strings and they must be no longer than MAXUDITEMLEN characters (including the terminating zero). They may contain spaces and punctuation characters.
The specification of this function in C# is:
RECERR kRecGetFirstItemUD(int sid, string pSection, out string pUDitem, out uint pitemattrib);
kRecGetFirstItemUD
RECERR RECAPIKRN kRecGetFirstItemUD(int sid, LPCTSTR pSection, LPWSTR pUDitem, size_t buflen, LPDWORD pitemattrib)
Starting enumeration of UDitems.
There is a non-enumerating function replacing kRecGetFirstItemUD and kRecGetNextItemUD in C#:
RECERR kRecGetAllItemsUD(int sid, out string[] itemnames, out uint[] itemattribs);
The specification of this function in Java is:
int kRecGetFirstItemUD(int sid, String pSection, String[] pUDitem, long[] pitemattrib)
The specification of this function in Python is:
def kRecGetFirstItemUD(sid: int, pSection: str) -> Tuple[int, str, int]

◆ kRecGetFirstSpellLanguage()

RECERR RECAPIKRN kRecGetFirstSpellLanguage ( LANGUAGES * pLang )

Starting enumeration of spell languages.

The kRecGetFirstSpellLanguage (together with the kRecGetNextSpellLanguage function) creates a listing of the available Spelling languages. The function returns with the LANGUAGES language identifier of the first Spelling language available for the current Engine configuration.

Parameters
[out] pLang Address of a variable to get the first language.
Return values
RECERR
Note
The content of the resulting list depends on the Engine configuration, i.e. the presence of the Language dictionary files in the Engine Binaries directory. Each supported language is associated with a Language dictionary file. The list of the supported languages.
When there is no available Spelling language (since e.g. the Engine Binaries directory does not contain the Language dictionary file at all), the function returns with SPL_NOMORE_WARN.
The specification of this function in C# is:
RECERR kRecGetFirstSpellLanguage(out LANGUAGES pLang);
LANGUAGES
LANGUAGES
Possible languages.
Definition KernelApi.h:1106
kRecGetFirstSpellLanguage
RECERR RECAPIKRN kRecGetFirstSpellLanguage(LANGUAGES *pLang)
Starting enumeration of spell languages.
There is a non-enumerating function replacing kRecGetFirstSpellLanguage and kRecGetNextSpellLanguage in C#:
RECERR kRecGetAllSpellLanguages(out LANGUAGES[] spelllangs);
The specification of this function in Java is:
int kRecGetFirstSpellLanguage(int[] pLang)
The specification of this function in Python is:
def kRecGetFirstSpellLanguage() -> Tuple[int, int]

◆ kRecGetFirstVerticalDict()

RECERR RECAPIKRN kRecGetFirstVerticalDict | ( | LANGUAGES * | pLang,
 |  | VDICTDESC | name )

Starting enumeration of vertical dictionaries.

This function (together with kRecGetNextVerticalDict) enumerates the available vertical dictionaries. It gives the first of them. It retrieves the identifier of the language the vertical dictionary belongs to and the name of this dictionary.

Parameters
[out] | pLang | Pointer of a variable to store the identifier of the language the dictionary belongs to.
[out] | name | Pointer of a string buffer for getting the description of the dictionary.
Return values
RECERR
Note
The functions kRecGetFirstVerticalDict and kRecGetNextVerticalDict are not thread safe. It is recommended to use them in the main thread after the starting of the application, since this list is invariable during the whole running time.
If there is no vertical dictionary file in the Engine Binary Directory it returns with SPL_NOMORE_WARN.
The specification of this function in C# is:
RECERR kRecGetFirstVerticalDict(out LANGUAGES pLang, out string name);
kRecGetFirstVerticalDict
RECERR RECAPIKRN kRecGetFirstVerticalDict(LANGUAGES *pLang, VDICTDESC name)
Starting enumeration of vertical dictionaries.
There is a non-enumerating function replacing kRecGetFirstVerticalDict and kRecGetNextVerticalDict in C#:
RECERR kRecGetAllVerticalDicts(out LANGUAGES[] vertdictlangs, out string[] vertdicts);
The specification of this function in Java is:
int kRecGetFirstVerticalDict(int[] pLang, String[] name)
The specification of this function in Python is:
def kRecGetFirstVerticalDict() -> Tuple[int, int, str]

◆ kRecGetItemCount()

RECERR RECAPIKRN kRecGetItemCount | ( | int | sid,
 |  | size_t | nSectIndex,
 |  | size_t * | pItemCount )

Getting the number of items in the user dictionary.

This function retrieves the number of items in the current user dictionary.

Parameters
[in] | sid | Settings Collection ID.
[in] | nSectIndex | Deprecated. It must be 0.
[out] | pItemCount | Pointer of a variable to store the number of items.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecGetItemCount(int sid, uint nSectIndex, out uint pItemCount);
kRecGetItemCount
RECERR RECAPIKRN kRecGetItemCount(int sid, size_t nSectIndex, size_t *pItemCount)
Getting the number of items in the user dictionary.
The specification of this function in Java is:
int kRecGetItemCount(int sid, long nSectIndex, long[] pItemCount)
The specification of this function in Java is:
int kRecGetSectItem(int sid, long nSectIndex, long nItemIndex, String[] pItem, long[] pFlag)
kRecGetSectItem
RECERR RECAPIKRN kRecGetSectItem(int sid, size_t nSectIndex, size_t nItemIndex, LPWSTR pItem, size_t iBufSize, LPDWORD pFlag)
Deprecated. This functionality is no longer supported in CSDK18-19. It will be removed from the next ...
The specification of this function in Python is:
def kRecGetItemCount(sid: int, nSectIndex: int) -> Tuple[int, int]
The specification of this function in Python is:
def kRecGetSectItem(sid: int, nSectIndex: int, nItemIndex: int) -> Tuple[int, str, int]

◆ kRecGetNextItemUD()

RECERR RECAPIKRN kRecGetNextItemUD | ( | int | sid,
 |  | LPWSTR | pUDitem,
 |  | size_t | buflen,
 |  | LPDWORD | pitemattrib )

Performing enumeration of items.

The kRecGetNextItemUD function (together with the kRecGetFirstItemUD function creates an item-list from the currently opened user dictionary. This function retrieves the next item.

Parameters
[in] | sid | Settings Collection ID.
[out] | pUDitem | Pointer of a buffer to get the first item of the item-list. (16-bit UNICODE string.)
[in] | buflen | Specifies the size of the buffer in bytes.
[out] | pitemattrib | Unused parameter. It must be NULL.
Return values
RECERR
Note
The buffer must be long enough to store the current UDitem (with the terminating zero). user dictionary items are 16-bit UNICODE strings and they must be no longer than MAXUDITEMLEN characters (including the terminating zero). They may contain spaces and punctuation characters.
Repeated calls to this function get a sequence of the UDitems and generate a return code REC_OK each time. As soon as the function finds no further item to get, it returns with SPL_NOMORE_WARN, signaling that the list is complete.
The specification of this function in C# is:
RECERR kRecGetNextItemUD(int sid, out string pUDitem, out uint pitemattrib);
kRecGetNextItemUD
RECERR RECAPIKRN kRecGetNextItemUD(int sid, LPWSTR pUDitem, size_t buflen, LPDWORD pitemattrib)
Performing enumeration of items.
There is a non-enumerating function replacing kRecGetFirstItemUD and kRecGetNextItemUD in C#:
RECERR kRecGetAllItemsUD(int sid, out string[] itemnames, out uint[] itemattribs);
The specification of this function in Java is:
int kRecGetNextItemUD(int sid, String[] pUDitem, long[] pitemattrib)
The specification of this function in Python is:
def kRecGetNextItemUD(sid: int) -> Tuple[int, str, int]

◆ kRecGetNextSpellLanguage()

RECERR RECAPIKRN kRecGetNextSpellLanguage ( LANGUAGES * pLang )

Performing enumeration of spell languages.

The kRecGetNextSpellLanguage function (together with the kRecGetFirstSpellLanguage function) creates a listing of the available Spelling languages.

Parameters
[out] pLang Address of a variable to get the next spelling language.
Return values
RECERR
Note
The resulting list depends on the Engine configuration (the set of Language dictionary files in the Engine Binaries directory).
Repeated calls to this function get a sequence of the available Spelling languages and generate a return code REC_OK each time. As soon as the function finds no further language to get, it returns with SPL_NOMORE_WARN, signaling that the list is complete.
The specification of this function in C# is:
RECERR kRecGetNextSpellLanguage(out LANGUAGES pLang);
kRecGetNextSpellLanguage
RECERR RECAPIKRN kRecGetNextSpellLanguage(LANGUAGES *pLang)
Performing enumeration of spell languages.
There is a non-enumerating function replacing kRecGetFirstSpellLanguage and kRecGetNextSpellLanguage in C#:
RECERR kRecGetAllSpellLanguages(out LANGUAGES[] spelllangs);
The specification of this function in Java is:
int kRecGetNextSpellLanguage(int[] pLang)
The specification of this function in Python is:
def kRecGetNextSpellLanguage() -> Tuple[int, int]

◆ kRecGetNextVerticalDict()

RECERR RECAPIKRN kRecGetNextVerticalDict | ( | LANGUAGES * | pLang,
 |  | VDICTDESC | name )

Performing enumeration of vertical dictionaries.

This function (together with kRecGetFirstVerticalDict) enumerates the available vertical dictionaries. It gives the next one. It retrieves the identifier of the language the vertical dictionary belongs to and the name of this dictionary.

Parameters
[out] | pLang | Pointer of a variable to store the identifier of the language the dictionary belongs to.
[out] | name | Pointer of a string buffer for getting the description of the dictionary.
Return values
RECERR
Note
The functions kRecGetFirstVerticalDict and kRecGetNextVerticalDict are not thread safe. It is recommended to use them in the main thread after starting the application, since this list is invariable during the whole running time.
If there is no more vertical dictionary file in the Engine Binary Directory it returns with SPL_NOMORE_WARN, otherwise with REC_OK.
The specification of this function in C# is:
RECERR kRecGetNextVerticalDict(out LANGUAGES pLang, out string name);
kRecGetNextVerticalDict
RECERR RECAPIKRN kRecGetNextVerticalDict(LANGUAGES *pLang, VDICTDESC name)
Performing enumeration of vertical dictionaries.
There is a non-enumerating function replacing kRecGetFirstVerticalDict and kRecGetNextVerticalDict in C#:
RECERR kRecGetAllVerticalDicts(out LANGUAGES[] vertdictlangs, out string[] vertdicts);
The specification of this function in Java is:
int kRecGetNextVerticalDict(int[] pLang, String[] name)
The specification of this function in Python is:
def kRecGetNextVerticalDict() -> Tuple[int, int, str]

◆ kRecGetSpell()

RECERR RECAPIKRN kRecGetSpell | ( | int | sid,
 |  | INTBOOL * | pEnable )

Inquiring whether the checking module is enabled.

The kRecGetSpell function inquires whether the checking module is enabled or disabled. (See kRecSetSpell.)

Parameters
[in] | sid | Settings Collection ID.
[out] | pEnable | Address of a flag to get status: TRUE enabled, FALSE disabled.
Return values
RECERR
Note
This function gets the value of the setting Kernel.OcrMgr.Spell.SpellEnabled. This setting can be changed by kRecSetSpell.
The specification of this function in C# is:
RECERR kRecGetSpell(int sid, out bool bChksubsystem);
kRecGetSpell
RECERR RECAPIKRN kRecGetSpell(int sid, INTBOOL *pEnable)
Inquiring whether the checking module is enabled.
The specification of this function in Java is:
int kRecGetSpell(int sid, int[] pEnable)
The specification of this function in Python is:
def kRecGetSpell(sid: int) -> Tuple[int, bool]

◆ kRecGetSpellLanguage()

RECERR RECAPIKRN kRecGetSpellLanguage | ( | int | sid,
 |  | LANGUAGES * | pSpellLang )

Getting spelling language.

The kRecGetSpellLanguage function inquires the current spelling language setting of the checking module.

Parameters
[in] | sid | Settings Collection ID.
[out] | pSpellLang | Address of a variable to get the current Spelling language setting.
Return values
RECERR
Note
This function gets the value of the setting Kernel.OcrMgr.Spell.SpellLang. This setting can be changed by kRecSetSpellLanguage.
The specification of this function in C# is:
RECERR kRecGetSpellLanguage(int sid, out LANGUAGES pSpellLang);
kRecGetSpellLanguage
RECERR RECAPIKRN kRecGetSpellLanguage(int sid, LANGUAGES *pSpellLang)
Getting spelling language.
The specification of this function in Java is:
int kRecGetSpellLanguage(int sid, int[] pSpellLang)
The specification of this function in Python is:
def kRecGetSpellLanguage(sid: int) -> Tuple[int, int]

◆ kRecGetUDState()

RECERR RECAPIKRN kRecGetUDState | ( | int | sid,
 |  | LPINTBOOL | pChanged )

Inquiring whether the user dictionary is changed.

The kRecGetUDState function inquires information about any change in the user dictionary.

Parameters
[in] | sid | Settings Collection ID.
[out] | pChanged | Address of a variable to get the modified flag.
Return values
RECERR
Note
If the retrieved value is TRUE the user dictionary has been modified since the last kRecSaveUD or since opening the dictionary with the kRecOpenMaintenanceUD.
The specification of this function in C# is:
RECERR kRecGetUDState(int sid, out bool pChanged);
kRecGetUDState
RECERR RECAPIKRN kRecGetUDState(int sid, LPINTBOOL pChanged)
Inquiring whether the user dictionary is changed.
The specification of this function in Java is:
int kRecGetUDState(int sid, int[] pChanged)
The specification of this function in Python is:
def kRecGetUDState(sid: int) -> Tuple[int, bool]

◆ kRecGetUserDictionary()

RECERR RECAPIKRN kRecGetUserDictionary | ( | int | sid,
 |  | LPTSTR | pFilename,
 |  | size_t | iSize1,
 |  | LPTSTR | pDefaultSection,
 |  | size_t | iSize2 )

Getting user dictionary.

The kRecGetUserDictionary function gets the name of the current user dictionary.

Parameters
[in] | sid | Settings Collection ID.
[out] | pFilename | Pointer of a buffer to get the name of the current user dictionary. If there is no user dictionary specified, an empty string is returned.
[in] | iSize1 | Length of the buffer for the name of the user dictionary.
[out] | pDefaultSection | Deprecated. It must be NULL.
[in] | iSize2 | Deprecated. It must be 0.
Return values
RECERR
Note
This function gets the value of the setting Kernel.OcrMgr.Spell.UserDictionary.FileName. This setting can be changed by kRecSetUserDictionary.
The specification of this function in C# is:
RECERR kRecGetUserDictionary(int sid, out string pFilename, out string pDefaultSection);
kRecGetUserDictionary
RECERR RECAPIKRN kRecGetUserDictionary(int sid, LPTSTR pFilename, size_t iSize1, LPTSTR pDefaultSection, size_t iSize2)
Getting user dictionary.
The specification of this function in Java is:
int kRecGetUserDictionary(int sid, String[] pFilename, String pDefaultSection, long iSize2)
The specification of this function in Python is:
def kRecGetUserDictionary(sid: int) -> Tuple[int, str, str]

◆ kRecGetVerticalDictionaries()

RECERR RECAPIKRN kRecGetVerticalDictionaries | ( | int | sid,
 |  | VDICTDESC * | name,
 |  | int | nBuffers,
 |  | int * | nNames )

Getting vertical dictionaries.

This function gets the names of the current Vertical dictionaries, up to the specified limit. Any enabled vertical dictionaries beyond the specified limit will not be listed.

Parameters
[in] | sid | Settings Collection ID.
[out] | name | Array of buffers to store the descriptions of the vertical dictionaries.
[in] | nBuffers | Number of buffers in name.
[out] | nNames | Pointer of a variable to store the number of vertical dictionaries.
Return values
RECERR
Note
This function gets the value of the setting Kernel.OcrMgr.Spell.VerticalDictionaries. This setting can be changed by kRecSetVerticalDictionaries.
The specification of this function in C# is:
RECERR kRecGetVerticalDictionaries(int sid, out string[] names);
// or for getting only the number of dictionaries
RECERR kRecGetVerticalDictionaries(int sid, out int nNames);
kRecGetVerticalDictionaries
RECERR RECAPIKRN kRecGetVerticalDictionaries(int sid, VDICTDESC *name, int nBuffers, int *nNames)
Getting vertical dictionaries.
The specification of this function in Java is:
int kRecGetVerticalDictionaries(int sid, VDICTDESCArray names)
The specification of this function in Python is:
def kRecGetVerticalDictionaries(sid: int) -> Tuple[int, "VDICTDESCArray"]

◆ kRecOpenMaintenanceUD()

RECERR RECAPIKRN kRecOpenMaintenanceUD ( int sid )

Opening user dictionary for editing.

The kRecOpenMaintenanceUD function opens a user dictionary for editing purposes: to list its contents, to add or delete UDitems, to save the changes.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
The program should call the kRecCloseMaintenanceUD for proper closing before terminating the Engine with the kRecQuit call.
Changes made to the user dictionary need a separate saving step with the kRecSaveUD function before closing the dictionary.
The specification of this function in C# is:
RECERR kRecOpenMaintenanceUD(int sid);
The specification of this function in Java is:
int kRecOpenMaintenanceUD(int sid)
The specification of this function in Python is:
def kRecOpenMaintenanceUD(sid: int) -> int

◆ kRecSaveUD()

RECERR RECAPIKRN kRecSaveUD | ( | int | sid,
 |  | LPCTSTR | pFilename,
 |  | UDSAVESTYLE | saveStyle )

Saving user dictionary.

The kRecSaveUD function saves the user dictionary to a file.

Parameters
[in] | sid | Settings Collection ID.
[in] | pFilename | Pointer to the name of the user dictionary file. If it is NULL, the current dictionary name is used as set by a previous call to the kRecSetUserDictionary function.
[in] | saveStyle | It specifies the saving format of the user dictionary. In the previous version of the Capture SDK this parameter was a INTBOOL type, where the FALSE value was equal to UDSS_INTERNAL, and the TRUE value was equal to UDSS_ORIGINAL. The type UDSAVESTYLE has been created in such a way that a source had used with the previous CSDK requires only a rebuild without any rewriting for the same operation.
Return values
RECERR
Note
This function must be called before kRecCloseMaintenanceUD.
Saving the user dictionary under the same name activates the modifications only in the specified Settings Collection. To use the new dictionary in other collections reload the saved file with kRecSetUserDictionary.
Saving the user dictionary under a different file name does not specify that the saved user dictionary will be set for use automatically. For this a separate kRecSetUserDictionary call is necessary.
The specification of this function in C# is:
RECERR kRecSaveUD(int sid, string pFilename, UDSAVESTYLE saveStyle);
UDSAVESTYLE
UDSAVESTYLE
User dictionary saving styles.
Definition KernelApi.h:10610
The specification of this function in Java is:
int kRecSaveUD(int sid, String pFilename, UDSAVESTYLE saveStyle)
The specification of this function in Python is:
def kRecSaveUD(sid: int, pFilename: str, saveStyle: int) -> int

◆ kRecSetSpell()

RECERR RECAPIKRN kRecSetSpell | ( | int | sid,
 |  | INTBOOL | bChksubsystem )

Enabling checking module.

The kRecSetSpell function enables or disables the checking module. Its running may improve the overall throughput by marking suspicious words and characters, making it easier to correct them. It can also be set to improve accuracy, by auto-correcting suspicious recognized words.

Parameters
[in] | sid | Settings Collection ID.
[in] | bChksubsystem | Flag that indicates whether the checking module is enabled or disabled.
Return values
RECERR
Note
The language for the spell checking (the Spelling language) can be specified with the kRecSetSpellLanguage function. The user dictionary can be specified with the kRecSetUserDictionary function. During the UD-checking, the recognized result of a zone is checked against the UDitems of the User dictionary.
If this function is not called, by default the running of the checking module will be enabled.
Example for recognizing a multi-lingual document with checking (enabled German spell checking but no UD-checking):
HPAGE hPage;
LANG_ENA pLang[LANG_SIZE];
int sid = 0; // Settings Collection ID
. . .
for (int i=0; i<LANG_SIZE; i++) {
pLang[i] = LANG_DISABLED;
}
pLang[LANG_GER] = LANG_ENABLED;
pLang[LANG_FRE] = LANG_ENABLED;
pLang[LANG_ITA] = LANG_ENABLED;
rc = kRecSetLanguages(sid, pLang);
rc = kRecSetSpell(sid, TRUE);
rc = kRecSetSpellLanguage(sid, LANG_GER);
rc = kRecSetUserDictionary(sid, NULL, NULL);
rc = kRecRecognize(sid, hPage, NULL);
kRecSetLanguages
RECERR RECAPIKRN kRecSetLanguages(int sid, const LANG_ENA *pLanguages)
Setting languages.
LANG_ENA
LANG_ENA
Language enable/disable.
Definition KernelApi.h:1051
LANG_DISABLED
@ LANG_DISABLED
Definition KernelApi.h:1052
LANG_ENABLED
@ LANG_ENABLED
Definition KernelApi.h:1053
LANG_SIZE
@ LANG_SIZE
Definition KernelApi.h:1275
LANG_FRE
@ LANG_FRE
Definition KernelApi.h:1120
LANG_GER
@ LANG_GER
Definition KernelApi.h:1119
LANG_ITA
@ LANG_ITA
Definition KernelApi.h:1132
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
kRecRecognize
RECERR RECAPIKRN kRecRecognize(int sid, HPAGE hPage, LPCTSTR pFilename)
Recognizing a page.
kRecSetSpell
RECERR RECAPIKRN kRecSetSpell(int sid, INTBOOL bChksubsystem)
Enabling checking module.
kRecSetSpellLanguage
RECERR RECAPIKRN kRecSetSpellLanguage(int sid, LANGUAGES SpellLang)
Setting spell language.
This function sets the value of the setting Kernel.OcrMgr.Spell.SpellEnabled. This setting can be retrieved by kRecGetSpell.
The specification of this function in C# is:
RECERR kRecSetSpell(int sid, bool bChksubsystem);
The specification of this function in Java is:
int kRecSetSpell(int sid, int bChksubsystem)
The specification of this function in Python is:
def kRecSetSpell(sid: int, bChksubsystem: bool) -> int

◆ kRecSetSpellLanguage()

RECERR RECAPIKRN kRecSetSpellLanguage | ( | int | sid,
 |  | LANGUAGES | SpellLang )

Setting spell language.

The kRecSetSpellLanguage function specifies the Spelling language for the spell checking of the checking module.

Parameters
[in] | sid | Settings Collection ID.
[in] | SpellLang | Identifier of the Spelling language to be set.
Return values
RECERR
Note
Specifying the Spelling language is a page-level setting. Once spell checking is specified, it is applied to all zones on the page, except in zones with their CHK_LANGDICT_PROHIBIT flag set.
When the Spelling language is LANG_AUTO, the real language of the spell checking is determined using the language selection for recognition as follows:
  • If the language selection for recognition is empty, then there will not be spell checking at all.
  • If only one language has been set for the Language environment of the Character Set (kRecSetLanguages) this language will be automatically selected for the spell checking assuming that the appropriate Language dictionary file is also available.
  • If the language selection contains two or more languages the spell checking will be done for all these languages (if they have a Language dictionary file).
When the spelling language is LANG_NO, spell checking will not be activated for the zones of the page, i.e. it may use only a user dictionary.
The application should call this (and other checking related functions) BEFORE calling the kRecRecognize or kRecProcessPages function.
If this function is not called to specify the Spelling language, the default value of LANG_AUTO will be applied.
The available spelling languages can be enumerated through the kRecGetFirstSpellLanguage kRecGetNextSpellLanguage function-pair. They will enumerate the dictionaries present in the Engine Binary directory.
This function sets the value of the setting Kernel.OcrMgr.Spell.SpellLang. This setting can be retrieved by kRecGetSpellLanguage.
The specification of this function in C# is:
RECERR kRecSetSpellLanguage(int sid, LANGUAGES SpellLang);
The specification of this function in Java is:
int kRecSetSpellLanguage(int sid, int SpellLang)
The specification of this function in Python is:
def kRecSetSpellLanguage(sid: int, SpellLang: int) -> int

◆ kRecSetUserDictionary()

RECERR RECAPIKRN kRecSetUserDictionary | ( | int | sid,
 |  | LPCTSTR | pFilename,
 |  | LPCTSTR | pDefaultSection )

Setting user dictionary.

The kRecSetUserDictionary function specifies a user dictionary for the checking module.

Parameters
[in] | sid | Settings Collection ID.
[in] | pFilename | Name of the user dictionary file. If it is NULL, a new and empty user dictionary will be created in memory.
[in] | pDefaultSection | Deprecated. It must be NULL or empty string.
Return values
RECERR
Note
A user dictionary can be used either as a complementary part of the Language dictionary, or alone (without enabling a Spelling language).
If this function is not called by default, or the specified file name is an empty string, no UD-checking is enabled.
If the filename parameter specifies an existing user dictionary file, it must be either a native dictionary file created by a previous kRecSaveUD call, or it must be a word-list file. A word-list file is a text file; it contains words, one in each line. The checking module loads Unicode based word-list files properly, while 8-bit code page based files are treated as Windows ANSI based ones. Note that the UDCREATE tool used in the previous toolkit version to convert word-list files to native dictionary files is not distributed any more. (To create a native dictionary from a word-list file, simply load it and save the file to have it converted.)
To reload the dictionary file: call this function twice using a NULL filename parameter at the first call. This is useful when the file content has been changed externally or in another Settings Collection.
This function sets the value of the setting Kernel.OcrMgr.Spell.UserDictionary.FileName. However, changing directly the value of this setting is not enough for correct working, this function should be called instead. This setting can be retrieved by kRecGetUserDictionary.
The specification of this function in C# is:
RECERR kRecSetUserDictionary(int sid, string pFilename, string pDefaultSection);
The specification of this function in Java is:
int kRecSetUserDictionary(int sid, String pFilename, String pDefaultSection)
The specification of this function in Python is:
def kRecSetUserDictionary(sid: int, pFilename: str, pDefaultSection: str) -> int

◆ kRecSetVerticalDictionaries()

RECERR RECAPIKRN kRecSetVerticalDictionaries | ( | int | sid,
 |  | VDICTDESC * | names,
 |  | int | nNames )

Setting vertical dictionaries.

This function specifies vertical dictionaries for the checking module.

Parameters
[in] | sid | Settings Collection ID.
[in] | names | The descriptions of the vertical dictionaries to be selected.
[in] | nNames | The number of vertical dictionaries to be set.
Return values
RECERR
Note
For unsetting the vertical dictionaries, pass either a NULL pointer in parameter names, or zero in parameter nNames, or an empty string as the first name.
Specifying vertical dictionaries is a page-level setting. Once it is specified, it is applied to all zones on the page, except in zones with their CHK_VERTDICT_PROHIBIT flag set. This is useful for excluding zones from the Vertical dictionary checking.
The descriptions of vertical dictionaries to be set can be collected from their enumerations (kRecGetFirstVerticalDict, kRecGetNextVerticalDict).
This function sets the value of the setting Kernel.OcrMgr.Spell.VerticalDictionaries. This setting can be retrieved by kRecGetVerticalDictionaries.
The specification of this function in C# is:
RECERR kRecSetVerticalDictionaries(int sid, string[] name);
kRecSetVerticalDictionaries
RECERR RECAPIKRN kRecSetVerticalDictionaries(int sid, VDICTDESC *names, int nNames)
Setting vertical dictionaries.
The specification of this function in Java is:
int kRecSetVerticalDictionaries(int sid, String[] names)
The specification of this function in Python is:
def kRecSetVerticalDictionaries(sid: int, names: List[str]) -> int


RecAPI: Direct TXT Output Converter Module

Enumerations | Functions
Direct TXT Output Converter Module
KernelAPI

Simple output converters. More...

Enumerations

enum DTXTOUTPUTFORMATS {
DTXT_TXTS ,
DTXT_TXTCSV ,
DTXT_TXTF ,
DTXT_PDFIOT ,
DTXT_XMLCOORD ,
DTXT_BINARY ,
DTXT_IOTPDF ,
DTXT_IOTPDF_MRC ,
DTXT_ALTO ,
DTXT_HOCR ,
DTXT_XMLIMG ,
DTXT_FORMPROC
}
DTXT output formats. More...

Functions

RECERR RECAPIKRN | kRecSetDTXTFormat (int sid, DTXTOUTPUTFORMATS dFormat)
Changing DTXT format.
RECERR RECAPIKRN | kRecGetDTXTFormat (int sid, DTXTOUTPUTFORMATS *pdFormat)
Getting DTXT format.
RECERR RECAPIKRN | kRecConvert2DTXT (int sid, const HPAGE *ahPage, int nPage, LPCTSTR pFilename)
Converting pages with DTXT.
RECERR RECAPIKRN | kRecConvert2DTXTEx (int sid, const HPAGE *ahPage, int nPage, IMAGEINDEX iiImg, LPCTSTR pFilename)
Converting pages with DTXT.
RECERR RECAPIKRN | kRecMakePagesSearchable (int sid, LPCTSTR pFilename, int fromPage, const HPAGE *ahPage, int nPage, IMAGEINDEX iiImg)
Making a PDF page searchable.

Detailed Description

Simple output converters.

This module gives you the possibility to convert recognized text simply and quickly. That is, you use the output of the recognition module as is (without reading order and paragraph detection). Therefore the DirectTXT Outputs are simpler than the Layout Retention Output conversions (available in RecAPIPlus) and also faster to produce, because they do not include slow detection processes.

There are different functions for starting the DTXT conversion. The older function kRecConvert2DTXT can create all the possible DTXT formats. Its newer successor is kRecConvert2DTXTEx, which has an additional IMAGEINDEX parameter for controlling the orientation of the pages creating a PDF file. This latter functions also can create all DTXT formats.

For existing PDF files a special conversion method can be applied. The function kRecMakePagesSearchable inserts invisible text (coming from a recognition step) into the PDF file (in-place), i.e. it makes the file searchable.

You can have control over DirectTXT output behavior through various settings. The root of DirectTXT settings is Kernel.DTxt. These settings can be queried and modified through Settings Manager Module. The following DirectTXT output types can be selected by calling kRecSetDTXTFormat:

The code page used at generating DTXT_TXT* output files can be specified by the setting Kernel.Chr.CodePage, or the function kRecSetCodePage.

The DirectTXT Text (DTXT_TXTS) output is a simple text file. The settings used by this converter are as follows:

  • Shared settings
    • Kernel.DTxt.UnicodeFileHeader
    • Kernel.DTxt.IntelByteOrder
    • Kernel.DTxt.PageBreak
    • Kernel.DTxt.txt.LineBreak
  • Exclusive settings
    • Kernel.DTxt.txt.IgnoreSpaceAtEOL
    • Kernel.DTxt.txt.CellLineBreak
    • Kernel.DTxt.txt.BeginCell
    • Kernel.DTxt.txt.EndCell
    • Kernel.DTxt.txt.CellSeparator
    • Kernel.DTxt.txt.ZoneSeparator

The DirectTXT CSV (DTXT_TXTCSV) output is a simple format to represent tables. Microsoft Excel can read this format. The settings used by this converter are as follows:

  • Shared settings
    • Kernel.DTxt.UnicodeFileHeader
    • Kernel.DTxt.IntelByteOrder
    • Kernel.DTxt.PageBreak
  • Exclusive settings
    • Kernel.DTxt.csv.EndOfRecord
    • Kernel.DTxt.csv.BeginField
    • Kernel.DTxt.csv.EndField
    • Kernel.DTxt.csv.FieldSeparator
    • Kernel.DTxt.csv.EndOfLineAsFieldSeparator
    • Kernel.DTxt.csv.EndOfCellLineAsFieldSeparator
    • Kernel.DTxt.csv.RecordSeparator

When you want to process forms, you can collect data into one row for each page. E.g. Kernel.DTxt.PageBreak = ""; Kernel.DTxt.csv.RecordSeparator = 2

The DirectTXT Formatted Text (DTXT_TXTF) delivers plain text, but attempts to keep layout as detected in the original image: this creates a text file that simulates columns and boxes using tabulators. The settings used by this converter are as follows:

  • Shared settings
    • Kernel.DTxt.UnicodeFileHeader
    • Kernel.DTxt.IntelByteOrder
    • Kernel.DTxt.PageBreak
    • Kernel.DTxt.txt.LineBreak

The newer DirectTXT PDF formats (DTXT_IOTPDF and DTXT_IOTPDF_MRC) (supported on: Windows, Linux, Embedded Linux, MacOS) contain the whole image of the original page and the text behind the image on a separate layer. These pdf files especially suit the purpose of page archiving, because they contain both the image and the searchable recognized text. There are possibilities to affect on the quality of the generated PDF file. For details see the section about newer image formats.

  • Exclusive settings
    • Kernel.DTxt.PDF.CompressContentStream
    • Kernel.DTxt.PDF.Linearized
    • Kernel.DTxt.PDF.SplitMaxPages
    • Kernel.DTxt.PDF.SplitMaxSize
    • Kernel.IMF.PDF.Compatibility

See also PDF Files in CSDK 2025.1.

DTXT_PDFIOT is deprecated now. Although it can be used, but DTXT_IOTPDF and DTXT_IOTPDF_MRC are suggested to use instead.
The DirectTXT PDF (DTXT_IOTPDF) output (supported on: Windows, Linux, Embedded Linux, MacOS) contains the whole image of the original page and the text behind the image on a separate layer. These pdf files especially suit the purpose of page archiving, because they contain both the image and the searchable recognized text. The following settings affect the DTXT_PDFIOT output (deprecated):

  • Exclusive settings
    • Kernel.DTxt.PDF.BWFormat
    • Kernel.DTxt.PDF.ColorFormat
    • Kernel.DTxt.PDF.BWQuality
    • Kernel.DTxt.PDF.ColorQuality
    • Kernel.DTxt.PDF.BWMaxDPI
    • Kernel.DTxt.PDF.ColorMaxDPI
    • Kernel.DTxt.PDF.CompressContentStream
    • Kernel.DTxt.PDF.Linearized
    • Kernel.DTxt.PDF.PDFA

See also PDF Files in CSDK 2025.1.

The DirectTXT XML (DTXT_XMLCOORD) output is typically used for further processing recognized data. You can easily parse (e.g. MSXML) or transform (XSLT) the output xml file. The format of the xml output is specified by the same scheme as the Layout Retention Xml Output (http://www.scansoft.com/omnipage/xml/ssdoc-schema3.xsd). The settings used by this converter are as follows:

  • Exclusive settings
    • Kernel.DTxt.xml.XSD
    • Kernel.DTxt.xml.InsertCharacters
    • Kernel.DTxt.txt.SchemaLocation
    • Kernel.DTxt.txt.Title
    • Kernel.DTxt.txt.Subject
    • Kernel.DTxt.txt.Author
    • Kernel.DTxt.txt.Company
    • Kernel.DTxt.txt.Comment

The DirectTXT ALTO (DTXT_ALTO) option generates ALTO output format (http://www.loc.gov/standards/alto). This XML output is always in UTF-8, ignoring the current code page setting (Kernel.Chr.CodePage).

  • Exclusive settings
    • Kernel.DTxt.ALTO.IgnoreSpaceAtEOL
    • Kernel.DTxt.ALTO.Version
    • Kernel.DTxt.ALTO.InsertCharacters

Setting "Kernel.DTxt.ALTO.InsertCharacters" to true (default) requires applying the ALTO version 4.0 scheme by setting "Kernel.DTxt.ALTO.Version" to 40 (default). When writing ALTO version 2.0 (Kernel.DTxt.ALTO.Version = 20), the following restrictions will apply:

  • The "language" attribute name will be used instead of "LANG"
  • ALTO Strings (CSDK: Word) will not have any language attribute.

Regardless of ALTO versions, a single language attribute will be returned only, even where CSDK detects two or more (for example, in a TextBlock). This is an XML restriction: multiple XML attributes with the same name ("LANG" or "language") cannot be used within a single XML label.

Mapping CSDK structures to supported ALTO terms:

CSDK | ALTO
HPAGE | Page
Zone (WT_GRAPHIC) | Illustration
Zone (WT_TABLE) | ComposedBlock (TYPE="Table")
Zone (WT_FLOW, ...) | TextBlock
LETTER | Glyph
RLINE | GraphicalElement
kRecGetFrameInfo (CELL_INFO.rect) | GraphicalElement

The ALTO TextLine, String, SP, and HYP elements are calculated from LETTER attributes.

In the rare case when a single character is composed of multiple Unicodes (and therefore multiple LETTER structures), those are combined into one ALTO glyph element with the CONTENT attribute having a string of composing codes. For example, in case of the Thai language, where combining marks are commonly used, the CONTENT attribute of the output glyph element may contain more than one UTF-8 characters (the main character and one or more non-spacing marks). This does not comply with ALTO schema version 4, which requires exactly 1 character per glyph. However, CSDK does this on purpose, because these codes belong together.

The DirectTXT hOCR (DTXT_HOCR) option generates hOCR output format (https://en.wikipedia.org/wiki/HOCR). This XHTML output is always in UTF-8, ignoring the current code page setting (Kernel.Chr.CodePage).

Mapping CSDK structures to supported hOCR terms:

CSDK | hOCR
HPAGE | ocr_page
Zone (WT_GRAPHIC) | ocr_photo
Zone (WT_TABLE) | ocr_table
Zone (WT_FLOW, ...) | ocr_carea and ocr_par
RLINE | ocr_separator
kRecGetFrameInfo (CELL_INFO.rect) | ocr_separator

The hOCR ocr_line and ocrx_word elements are calculated from LETTER attributes.

The DirectTXT Binary (DTXT_BINARY) output is used for creating files directly from the LETTER array (i.e. the recognition result) without any character conversion and formatting. It is designed for the barcodes containing binary data (for example BAR_C128 or BAR_PDF417 barcodes containing encrypted data). This method does not perform code page conversion. The lines do not contain spaces at the end of them, except when these spaces are in itself the binary data (i.e. this method removes the zero width end-line spaces). Using this output method, the barcode modules must be forced to generate also binary result, which can be specified by the setting Kernel.OcrMgr.BarBinary. See the topics Binary output, The settings of the BAR Recognition Engine Module.

When you specify an already existing file name, all the types except DTXT_ALTO, DTXT_HOCR and DTXT_BINARY are appended. You can set and get the output format using kRecSetDTXTFormat and kRecGetDTXTFormat. To perform conversion use kRecConvert2DTXT.

The DTXT module can be especially useful for applications that do not require formatting but speed is an important factor. For example: indexing, archiving, or form processing applications.

For a collected list of the DTXT settings see the Settings of the Direct TXT Module.

Enumeration Type Documentation

◆ DTXTOUTPUTFORMATS

enum DTXTOUTPUTFORMATS

DTXT output formats.

The following output formats can be created by Direct TXT output converter. All of them except DTXT_ALTO, DTXT_HOCR and DTXT_BINARY are appendable. Some of the selectable output formats can be balanced by settings. See Settings of the Direct TXT Module.

Enumerator
DTXT_TXTS | Text Standard. Details...
DTXT_TXTCSV | Text CSV. Details...
DTXT_TXTF | Text Formatted. Details...
DTXT_PDFIOT | Deprecated (see usage of new formats). PDF Image on Text. Supported on: Windows, Linux, Embedded Linux, MacOS. Details...
DTXT_XMLCOORD | XML Simple. Details...
DTXT_BINARY | Binary output. Details...
DTXT_IOTPDF | Image on Text PDF with changeable compression level. Supported on: Windows, Linux, Embedded Linux, MacOS. Details...
DTXT_IOTPDF_MRC | Image on Text PDF with MRC technology. Supported on: Windows, Linux, Embedded Linux, MacOS. Details...
DTXT_ALTO | ALTO xml. Details...
DTXT_HOCR | hOCR xhtml. Details...
DTXT_XMLIMG | Preparing pages for the TableXTract tool. Supported on: Windows.
DTXT_FORMPROC | FormProc. Feed this output to FormProc as input.

Function Documentation

◆ kRecConvert2DTXT()

RECERR RECAPIKRN kRecConvert2DTXT | ( | int | sid,
 |  | const HPAGE * | ahPage,
 |  | int | nPage,
 |  | LPCTSTR | pFilename )

Converting pages with DTXT.

This function converts the given pages using Direct TXT output converter.

Parameters
[in] | sid | Settings Collection ID.
[in] | ahPage | Array of HPAGEs to be converted.
[in] | nPage | Number of HPAGEs in ahPage.
[in] | pFilename | File name of the resulted file.
Return values
RECERR
Note
You might find kRecConvert2DTXTEx better to use; that is the suggested fuction to call. This function is equivalent to kRecConvert2DTXTEx(sid, ahPage, nPage, II_CURRENT, pFilename) in the default case when there is no original image.
HPAGE's may be rather big memory areas, thus keeping them in memory simultaneously may cause memory errors. All the DTXT types except DTXT_ALTO, DTXT_HOCR and DTXT_BINARY are appendable, thus it is recommended to append them page-by-page (or per some pages) to the same file instead of using a large array containing all of the HPAGE's.
If hPage contains DataStream this function may put the image into the output file without recompression. See the details in the section about DataStream.
Some of the settings used by this function can be modified with calling the kRecSetDTXTFormat. The rest of the used settings can be changed only through the Settings Manager Module. For more information see the Settings of the Direct TXT Module or the description of the module.
The code page used at generating DTXT_TXT* output files can be specified by the setting Kernel.Chr.CodePage, or the function kRecSetCodePage.
The specification of this function in C# is:
RECERR kRecConvert2DTXT(int sid, IntPtr[] ahPage, string pFilename);
// or
RECERR kRecConvert2DTXT(int sid, IntPtr ahPage, string pFilename);
kRecConvert2DTXT
RECERR RECAPIKRN kRecConvert2DTXT(int sid, const HPAGE *ahPage, int nPage, LPCTSTR pFilename)
Converting pages with DTXT.
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
The specification of this function in Java is:
int kRecConvert2DTXT(int sid, HPAGE[] ahPage, String pFilename)
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
The specification of this function in Python is:
def kRecConvert2DTXT(sid: int, ahPage: "HPAGE", pFilename: str) -> int

◆ kRecConvert2DTXTEx()

RECERR RECAPIKRN kRecConvert2DTXTEx | ( | int | sid,
 |  | const HPAGE * | ahPage,
 |  | int | nPage,
 |  | IMAGEINDEX | iiImg,
 |  | LPCTSTR | pFilename )

Converting pages with DTXT.

This function converts the given pages using Direct TXT output converter.

Parameters
[in] | sid | Settings Collection ID.
[in] | ahPage | Array of HPAGEs to be converted.
[in] | nPage | Number of HPAGEs in ahPage.
[in] | iiImg | Index of the image to be saved. (II_CURRENT or II_ORIGINAL)
[in] | pFilename | File name of the resulted file.
Return values
RECERR
Note
This function is the successor of the kRecConvert2DTXT function.
HPAGE's may be rather big memory areas, thus keeping them in memory simultaneously may cause memory errors. All the DTXT types except DTXT_ALTO, DTXT_HOCR and DTXT_BINARY are appendable, thus it is recommended to append them page-by-page (or per some pages) to the same file instead of using a large array containing all of the HPAGE's.
In case of DTXT_XMLCOORD output iiImg specifies the orientation of the coordinates written into the XML file. II_ORIGINAL can be used even if the original image does not exist.
If hPage contains DataStream this function may put the image into the output file without recompression. See the details in the section about DataStream.
In case of different PDF outputs iiImg specifies the image used to create the PDF file. II_ORIGINAL can be used only if the original image or DataStream is available. See also kRecSetPreserveOriginalImg and the documentation of DataStream.
Some of the settings used by this function can be modified with calling the kRecSetDTXTFormat. The rest of the used settings can be changed only through the Settings Manager Module. For more information see the Settings of the Direct TXT Module or the description of the module.
The code page used at generating DTXT_TXT* output files can be specified by the setting Kernel.Chr.CodePage, or the function kRecSetCodePage.
The specification of this function in C# is:
RECERR kRecConvert2DTXTEx(int sid, IntPtr[] ahPage, IMAGEINDEX iiImg, string pFilename);
// or
RECERR kRecConvert2DTXTEx(int sid, IntPtr ahPage, IMAGEINDEX iiImg, string pFilename);
kRecConvert2DTXTEx
RECERR RECAPIKRN kRecConvert2DTXTEx(int sid, const HPAGE *ahPage, int nPage, IMAGEINDEX iiImg, LPCTSTR pFilename)
Converting pages with DTXT.
IMAGEINDEX
IMAGEINDEX
Index of each image type in HPAGE.
Definition KernelApi.h:991
The specification of this function in Java is:
int kRecConvert2DTXTEx(int sid, HPAGE[] ahPage, IMAGEINDEX iiImg, String pFilename)
The specification of this function in Python is:
def kRecConvert2DTXTEx(sid: int, ahPage: "HPAGE", iiImg: int, pFilename: str) -> int

◆ kRecGetDTXTFormat()

RECERR RECAPIKRN kRecGetDTXTFormat | ( | int | sid,
 |  | DTXTOUTPUTFORMATS * | pdFormat )

Getting DTXT format.

This function retrieves the Direct TXT output format.

Parameters
[in] | sid | Settings Collection ID.
[out] | pdFormat | Pointer of a variable to store the output format.
Return values
RECERR
Note
This function gets the value of the setting Kernel.DTxt.DirectTxtFormat. This setting can be changed by kRecSetDTXTFormat.
The specification of this function in C# is:
RECERR kRecGetDTXTFormat(int sid, out DTXTOUTPUTFORMATS pdFormat);
DTXTOUTPUTFORMATS
DTXTOUTPUTFORMATS
DTXT output formats.
Definition KernelApi.h:9582
kRecGetDTXTFormat
RECERR RECAPIKRN kRecGetDTXTFormat(int sid, DTXTOUTPUTFORMATS *pdFormat)
Getting DTXT format.
The specification of this function in Java is:
int kRecGetDTXTFormat(int sid, DTXTOUTPUTFORMATS[] pdFormat)
The specification of this function in Python is:
def kRecGetDTXTFormat(sid: int) -> Tuple[int, int]

◆ kRecMakePagesSearchable()

RECERR RECAPIKRN kRecMakePagesSearchable | ( | int | sid,
 |  | LPCTSTR | pFilename,
 |  | int | fromPage,
 |  | const HPAGE * | ahPage,
 |  | int | nPage,
 |  | IMAGEINDEX | iiImg )

Making a PDF page searchable.

This function writes invisible textual information into a PDF to make it searchable/readable

Parameters
[in] | sid | Settings Collection ID.
[in] | pFilename | Name of the file to be made searchable
[in] | fromPage | Index of the first page to be made searchable (zero start index). The function processes the nPage pages starting from fromPage.
[in] | ahPage | Array of HPAGE's containing the searchable/textual data (comes from kRecRecognize).
[in] | nPage | Number of HPAGE's in ahPage
[in] | iiImg | Index of the image to use for orienting the pages. (II_ORIGINAL or II_CURRENT)
Return values
RECERR
Note
The orientation of the processed page is not changed if iiImg is II_ORIGINAL. (The text might be rotated to the correct position if needed.) On the other hand, when iiImg is II_CURRENT the function may rotate the pages to make them upright standing. The image itself is not touched even in that case just rotated matrix added.
The file pFilename should not be opened during kRecMakePagesSearchable. It is recommended to make searchable page-by-page instead of using an array with lots of HPAGE's. Since each open/close requires greater resources, grouping HPAGE's are supported. However HPAGE's may be rather big memory areas, thus keeping them in memory simultaneously may cause memory errors.
Page-by-page sample:
"Kernel.OcrMgr.PDF.ProcessingMode"=PDF_PM_GRAPHICS_ONLY
HPAGE hPage;
rc = kRecLoadImgF(sid, pFilename, &hPage, i);
rc = kRecPreprocessImg(sid, hPage);
rc = kRecRecognize(sid, hPage, NULL);
rc = kRecMakePagesSearchable(sid, pFilename, i, &hPage, 1, II_CURRENT);
rc = kRecFreeImg(hPage);
kRecMakePagesSearchable
RECERR RECAPIKRN kRecMakePagesSearchable(int sid, LPCTSTR pFilename, int fromPage, const HPAGE *ahPage, int nPage, IMAGEINDEX iiImg)
Making a PDF page searchable.
kRecPreprocessImg
RECERR RECAPIKRN kRecPreprocessImg(int sid, HPAGE hPage)
Image preprocessing.
kRecFreeImg
RECERR RECAPIKRN kRecFreeImg(HPAGE hPage)
Removing a page.
II_CURRENT
@ II_CURRENT
Definition KernelApi.h:1001
kRecLoadImgF
RECERR RECAPIKRN kRecLoadImgF(int sid, LPCTSTR pFilename, HPAGE *phPage, int nPage)
Loading a page directly from an image file.
kRecRecognize
RECERR RECAPIKRN kRecRecognize(int sid, HPAGE hPage, LPCTSTR pFilename)
Recognizing a page.
PDF_PM_GRAPHICS_ONLY
@ PDF_PM_GRAPHICS_ONLY
Only the graphic areas are recognized.
Definition KernelApi.h:8701
Page grouping sample:
HIMGFILE hIFile = NULL;
HPAGE hPage[NPAGES];
..
rc = kRecOpenImgFile(pFilename, &hIFile, IMGF_READ, (IMF_FORMAT)0);
..
for(ipage)
rc = kRecLoadImg(sid, hIFile, hPage+ipages, first_page+ipage);
..
rc = kRecCloseImgFile(hIFile);
..
//Preprocessing must be somewhere between load and recognize.
//So you can also attach it to the loop of either load or recognize.
for(ipage)
rc = kRecPreprocessImg(sid, hPage[ipage]);
..
for(ipage)
rc = kRecRecognize(sid, hPage[ipage], NULL);
..
rc = kRecMakePagesSearchable(sid, pFilename, first_page, hPage, NPAGES, II_CURRENT);
..
for(ipage)
rc = kRecFreeImg(hPage[ipage]);
HIMGFILE
struct tagIMGFILEHANDLE * HIMGFILE
Handle of image files.
Definition KernelApi.h:11244
IMF_FORMAT
IMF_FORMAT
Image formats.
Definition KernelApi.h:11179
kRecCloseImgFile
RECERR RECAPIKRN kRecCloseImgFile(HIMGFILE hIFile)
Closing an image file.
kRecLoadImg
RECERR RECAPIKRN kRecLoadImg(int sid, HIMGFILE hIFile, HPAGE *phPage, int iPage)
Loading a page from an opened image file.
kRecOpenImgFile
RECERR RECAPIKRN kRecOpenImgFile(LPCTSTR pFilename, HIMGFILE *pHIMGFILE, int mode, IMF_FORMAT filetype)
Opening an image file.
IMGF_READ
#define IMGF_READ
Opening file for reading only. The file can be shared. (Use it with kRecOpenImgFile....
Definition KernelApi.h:11253
An interesting trick, which can be useful sometimes: this function can change the orientation of the pages in the PDF file even if it gets HPAGE's having no letters (if preprocess have been already called and II_CURRENT is passed in iiImg).
The specification of this function in C# is:
RECERR kRecMakePagesSearchable(int sid, string pFilename, int fromPage, IntPtr[] ahPage, IMAGEINDEX iiImg);
// or
RECERR kRecMakePagesSearchable(int sid, string pFilename, int fromPage, IntPtr ahPage, IMAGEINDEX iiImg);
The specification of this function in Java is:
int kRecMakePagesSearchable(int sid, String pFilename, int fromPage, HPAGE[] ahPage, IMAGEINDEX iiImg)
The specification of this function in Python is:
def kRecMakePagesSearchable(sid: int, pFilename: str, fromPage: int, ahPage: "HPAGE", iiImg: int) -> int

◆ kRecSetDTXTFormat()

RECERR RECAPIKRN kRecSetDTXTFormat | ( | int | sid,
 |  | DTXTOUTPUTFORMATS | dFormat )

Changing DTXT format.

This function changes the Direct TXT output format setting.

Parameters
[in] | sid | Settings Collection ID.
[in] | dFormat | The output format to be set.
Return values
RECERR
Note
This function sets the value of the setting Kernel.DTxt.DirectTxtFormat. This setting can be retrieved by kRecGetDTXTFormat.
The specification of this function in C# is:
RECERR kRecSetDTXTFormat(int sid, DTXTOUTPUTFORMATS dFormat);
kRecSetDTXTFormat
RECERR RECAPIKRN kRecSetDTXTFormat(int sid, DTXTOUTPUTFORMATS dFormat)
Changing DTXT format.
The specification of this function in Java is:
int kRecSetDTXTFormat(int sid, DTXTOUTPUTFORMATS dFormat)
The specification of this function in Python is:
def kRecSetDTXTFormat(sid: int, dFormat: int) -> int


RecAPI: Document Classifier Module

Classes | Typedefs | Functions
Document Classifier Module
KernelAPI

Document Classifier API. More...

Classes

struct CLASSIFY_INFO
Structure for information about classification. More...

Typedefs

typedef struct RECDCSTRUCT * DCHANDLE
Handle of a Document Classifier object.

Functions

RECERR RECAPIKRN | kRecOpenDCProject (int sid, LPCTSTR pDCProjectFile, DCHANDLE *phDCProject)
Opening Document Classifier Project File.
RECERR RECAPIKRN | kRecCloseDCProject (DCHANDLE hDCProject)
Closing a Document Classifier Project.
RECERR RECAPIKRN | kRecGetFirstDCClass (DCHANDLE hDCProject, DCHANDLE *phDCClass)
Starting enumeration of Document Classes.
RECERR RECAPIKRN | kRecGetNextDCClass (DCHANDLE hDCPrevClass, DCHANDLE *phDCClass)
Performing enumeration of Document Classes.
RECERR RECAPIKRN | kRecClassifyPage (int sid, DCHANDLE hDCProject, HPAGE hPage, DCHANDLE *phDCPredictedClass, unsigned *pConfidenceLevel, CLASSIFY_INFO **pClassifyInfo, LPLONG pLength, INTBOOL *pIsConfident)
Classifying a page.
RECERR RECAPIKRN | kRecClassifyText (int sid, DCHANDLE hDCProject, LPCTSTR pText, DCHANDLE *phDCPredictedClass, unsigned *pConfidenceLevel, CLASSIFY_INFO **pClassifyInfo, LPLONG pLength, INTBOOL *pIsConfident)
Classifying text.
RECERR RECAPIKRN | kRecClassifyDocument (int sid, DCHANDLE hDCProject, LPCTSTR pFileName, int iPage, DCHANDLE *phDCPredictedClass, unsigned *pConfidenceLevel, CLASSIFY_INFO **pClassifyInfo, LPLONG pLength, INTBOOL *pIsConfident)
Classifying the given page of a document.
RECERR RECAPIKRN | kRecGetDCClassName (DCHANDLE hDCClass, LPTSTR *ppName)
Returning the name of a Document Class.
RECERR RECAPIKRN | kRecSetDCConfidenceThreshold (DCHANDLE hDCProject, int ConfidenceThreshold)
Set the confidence threshold of a Document Classifier Project.
RECERR RECAPIKRN | kRecGetDCConfidenceThreshold (DCHANDLE hDCProject, int *pConfidenceThreshold)
Get the confidence threshold of a Document Classifier Project.

Detailed Description

Document Classifier API.

For detailed description of this module see its separated documentation https://docshield.tungstenautomation.com/OmniPageCaptureSDK/en_US/2025.1.0-m7NwYtqyAo/help/OmniPageCapture_SDKdocumentclassificationassistant/c_Welcome.html.

Function Documentation

◆ kRecClassifyDocument()

RECERR RECAPIKRN kRecClassifyDocument | ( | int | sid,
 |  | DCHANDLE | hDCProject,
 |  | LPCTSTR | pFileName,
 |  | int | iPage,
 |  | DCHANDLE * | phDCPredictedClass,
 |  | unsigned * | pConfidenceLevel,
 |  | CLASSIFY_INFO ** | pClassifyInfo,
 |  | LPLONG | pLength,
 |  | INTBOOL * | pIsConfident )

Classifying the given page of a document.

This function classifies a document or the given page of the document. The document can contain scanned pages, one page from a PDF file or plain text.

Parameters
[in] | sid | Settings Collection ID.
[in] | hDCProject | Handle of the Document Classifier Project returned by kRecOpenDCProject.
[in] | pFileName | Name of the file containing the document. It can be image file, PDF or text file.
[in] | iPage | The page number of the page to be processed. This parameter is not used if the input file is text file.
[out] | phDCPredictedClass | Address of a variable to store the handle of the predicted Document Class. The returned handle can be NULL.
[out] | pConfidenceLevel | Address of a variable to store the confidence of the prediction. The returned value is between 0 and 100.
[out] | pClassifyInfo | Address of a variable to store info about classifying.
[out] | pLength | Address of a variable to store the length of the array returned in pClassifyInfo. This is equal to the number of classes.
[out] | pIsConfident | Address of a variable to return if the classification is confident. The returned value is TRUE if the confidence of the prediction is greater than or equal to the preset confidence threshold.
Return values
RECERR
Note
Use kRecOpenDCProject to open a Document Classifier Project File and obtain a handle.
This function decides if the input is an image file, PDF or text file, based on the filename extension. DC_UNKNOWNEXTENSION_ERR is returned if the extension is unknown.
If the input is an image file or PDF, the function loads and preprocesses it. If text based classification is enabled, the image is recognized as well.
If the input is a text file (i.e. the filename extension is .txt), only text based classification is possible. The program supports the following text encodings: Unicode (both UTF-16 and UTF-8, with or without Byte Order Mark) and non-Unicode text encoded with Windows default codepage (as set in the Control Panel > Region and Language > Administrative pane > Change system locale).
The function returns the handle of the predicted class, and the confidence of the prediction. You can query the name of the class with kRecGetDCClassName. The function returns an array of CLASSIFY_INFO structures (pClassifyInfo). The length of the array is equal to the number of defined classes, and returned in pLength. The array contains the confidence levels for each class. The confidence threshold can be defined with Document Classifier Assistant. It is stored in the Document Classifier Project File, and can be queried (kRecGetDCConfidenceThreshold) and changed (kRecSetDCConfidenceThreshold) after the project is loaded.
The array returned in pClassifyInfo should be released using kRecFree.
The specification of this function in C# is:
RECERR kRecClassifyDocument(int sid, IntPtr hDCProject, string pFileName, int nPage, out IntPtr phDCBestClass, out UInt32 confidence, out CLASSIFY_INFO[] pClassifyInfo, out bool isConfident);
kRecClassifyDocument
RECERR RECAPIKRN kRecClassifyDocument(int sid, DCHANDLE hDCProject, LPCTSTR pFileName, int iPage, DCHANDLE *phDCPredictedClass, unsigned *pConfidenceLevel, CLASSIFY_INFO **pClassifyInfo, LPLONG pLength, INTBOOL *pIsConfident)
Classifying the given page of a document.
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
CLASSIFY_INFO
Structure for information about classification.
Definition KernelApi.h:13653
The specification of this function in Java is:
int kRecClassifyDocument(int sid, DCHANDLE hDCProject, String pFileName, int iPage, DCHANDLE phDCPredictedClass, long[] pConfidenceLevel, ClassifyInfoArray pClassifyInfo, int[] pIsConfident)
DCHANDLE
struct RECDCSTRUCT * DCHANDLE
Handle of a Document Classifier object.
Definition KernelApi.h:13646
The specification of this function in Python is:
def kRecClassifyDocument(sid: int, hDCProject: "DCHANDLE", pFileName: str, iPage: int) -> Tuple[int, "DCHANDLE", int, "ClassifyInfoArray", bool]

◆ kRecClassifyPage()

RECERR RECAPIKRN kRecClassifyPage | ( | int | sid,
 |  | DCHANDLE | hDCProject,
 |  | HPAGE | hPage,
 |  | DCHANDLE * | phDCPredictedClass,
 |  | unsigned * | pConfidenceLevel,
 |  | CLASSIFY_INFO ** | pClassifyInfo,
 |  | LPLONG | pLength,
 |  | INTBOOL * | pIsConfident )

Classifying a page.

This function classifies the given HPAGE.

Parameters
[in] | sid | Settings Collection ID.
[in] | hDCProject | Handle of the Document Classifier Project returned by kRecOpenDCProject.
[in] | hPage | Handle of the page to be classified.
[out] | phDCPredictedClass | Address of a variable to store the handle of the predicted Document Class. The returned handle can be NULL.
[out] | pConfidenceLevel | Address of a variable to store the confidence of the prediction. The returned value is between 0 and 100.
[out] | pClassifyInfo | Address of a variable to store info about classifying.
[out] | pLength | Address of a variable to store the length of the array returned in pClassifyInfo. This is equal to the number of classes.
[out] | pIsConfident | Address of a variable to return if the classification is confident. The returned value is TRUE if the confidence of the prediction is greater than or equal to the preset confidence threshold.
Return values
RECERR
Note
If the classifier method (defined in Document Classifier Project) is Text or Combined, the function recognizes the image unless the hPage contains letters at the entry. The langauge of the recognition is defined in the Document Classifier Project. Upon returning hPage contains the result of recognition (OCR zones, letters).
The function returns the handle of the predicted class, and the confidence of the prediction. The function returns an array of CLASSIFY_INFO structures (pClassifyInfo). The length of the array is equal to the number of defined classes, and returned in pLength. The array contains the confidence levels for each class. The confidence threshold can be defined with Document Classifier Assistant. It is stored in the Document Classifier Project File, and can be queried (kRecGetDCConfidenceThreshold) and changed (kRecSetDCConfidenceThreshold) after the project is loaded.
The array returned in pClassifyInfo should be released using kRecFree.
The specification of this function in C# is:
RECERR kRecClassifyPage(int sid, IntPtr hDCProject, IntPtr hPage, out IntPtr bestClass, out UInt32 confidence, out CLASSIFY_INFO[] pClassifyInfos, out bool isClassfied);
kRecClassifyPage
RECERR RECAPIKRN kRecClassifyPage(int sid, DCHANDLE hDCProject, HPAGE hPage, DCHANDLE *phDCPredictedClass, unsigned *pConfidenceLevel, CLASSIFY_INFO **pClassifyInfo, LPLONG pLength, INTBOOL *pIsConfident)
Classifying a page.
The specification of this function in Java is:
int kRecClassifyPage(int sid, DCHANDLE hDCProject, HPAGE hPage, DCHANDLE phDCPredictedClass, long[] pConfidenceLevel, ClassifyInfoArray pClassifyInfo, int[] pIsConfident)
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
The specification of this function in Python is:
def kRecClassifyPage(sid: int, hDCProject: "DCHANDLE", hPage: "HPAGE") -> Tuple[int, "DCHANDLE", int, "ClassifyInfoArray", bool]

◆ kRecClassifyText()

RECERR RECAPIKRN kRecClassifyText | ( | int | sid,
 |  | DCHANDLE | hDCProject,
 |  | LPCTSTR | pText,
 |  | DCHANDLE * | phDCPredictedClass,
 |  | unsigned * | pConfidenceLevel,
 |  | CLASSIFY_INFO ** | pClassifyInfo,
 |  | LPLONG | pLength,
 |  | INTBOOL * | pIsConfident )

Classifying text.

This function classifies the given text.

Parameters
[in] | sid | Settings Collection ID.
[in] | hDCProject | Handle of the Document Classifier Project returned by kRecOpenDCProject.
[in] | pText | NULL terminated text to be classified.
[out] | phDCPredictedClass | Address of a variable to store the handle of the predicted Document Class. The returned handle can be NULL.
[out] | pConfidenceLevel | Address of a variable to store the confidence of the prediction. The returned value is between 0 and 100.
[out] | pClassifyInfo | Address of a variable to store info about classifying.
[out] | pLength | Address of a variable to store the length of the array returned in pClassifyInfo. This is equal to the number of classes.
[out] | pIsConfident | Address of a variable to return if the classification is confident. The returned value is TRUE if the confidence of the prediction is greater than or equal to the preset confidence threshold.
Return values
RECERR
Note
Use kRecOpenDCProject to open a Document Classifier Project File and obtain a handle.
The function returns the handle of the predicted class, and the confidence of the prediction. The function returns an array of CLASSIFY_INFO structures (pClassifyInfo). The length of the array is equal to the number of defined classes, and returned in pLength. The array contains the confidence levels for each class. The confidence threshold can be defined with Document Classifier Assistant. It is stored in the Document Classifier Project File, and can be queried (kRecGetDCConfidenceThreshold) and changed (kRecSetDCConfidenceThreshold) after the project is loaded.
The array returned in pClassifyInfo should be released using kRecFree.
The specification of this function in C# is:
RECERR kRecClassifyText(int sid, IntPtr hDCProject, string pText, out IntPtr phDCBestClass, out UInt32 confidence, out CLASSIFY_INFO[] pClassifyInfo, out bool isConfident);
kRecClassifyText
RECERR RECAPIKRN kRecClassifyText(int sid, DCHANDLE hDCProject, LPCTSTR pText, DCHANDLE *phDCPredictedClass, unsigned *pConfidenceLevel, CLASSIFY_INFO **pClassifyInfo, LPLONG pLength, INTBOOL *pIsConfident)
Classifying text.
The specification of this function in Java is:
int kRecClassifyText(int sid, DCHANDLE hDCProject, String pText, DCHANDLE phDCPredictedClass, long[] pConfidenceLevel, ClassifyInfoArray pClassifyInfo, int[] pIsConfident)
The specification of this function in Python is:
def kRecClassifyText(sid: int, hDCProject: "DCHANDLE", pText: str) -> Tuple[int, "DCHANDLE", int, "ClassifyInfoArray", bool]

◆ kRecCloseDCProject()

RECERR RECAPIKRN kRecCloseDCProject ( DCHANDLE hDCProject )

Closing a Document Classifier Project.

This function closes a Document Classifier Project opened by kRecOpenDCProject.

Parameters
[in] hDCProject Handle of the Document Classifier Project.
Return values
RECERR
Note
The specification of this function in C# is:
RECERR kRecCloseDCProject(IntPtr hDCProject);
kRecCloseDCProject
RECERR RECAPIKRN kRecCloseDCProject(DCHANDLE hDCProject)
Closing a Document Classifier Project.
The specification of this function in Java is:
int kRecCloseDCProject(DCHANDLE hDCProject)
The specification of this function in Python is:
def kRecCloseDCProject(hDCProject: "DCHANDLE") -> int

◆ kRecGetDCClassName()

RECERR RECAPIKRN kRecGetDCClassName | ( | DCHANDLE | hDCClass,
 |  | LPTSTR * | ppName )

Returning the name of a Document Class.

This function returns the name of a Document Class.

Parameters
[in] | hDCClass | Handle of the Document Class.
[out] | ppName | Address of a variable to store the name of the Document Class.
Return values
RECERR
Note
Use this function to obtain the name of the Document Class.
The specification of this function in C# is:
RECERR kRecGetDCClassName(IntPtr hDCClass, out string ppName)
kRecGetDCClassName
RECERR RECAPIKRN kRecGetDCClassName(DCHANDLE hDCClass, LPTSTR *ppName)
Returning the name of a Document Class.
The specification of this function in Java is:
int kRecGetDCClassName(DCHANDLE hDCClass, String[] ppName)
The specification of this function in Python is:
def kRecGetDCClassName(hDCClass: "DCHANDLE") -> Tuple[int, str]

◆ kRecGetDCConfidenceThreshold()

RECERR RECAPIKRN kRecGetDCConfidenceThreshold | ( | DCHANDLE | hDCProject,
 |  | int * | pConfidenceThreshold )

Get the confidence threshold of a Document Classifier Project.

The kRecGetDCConfidenceThreshold returns the confidence threshold of the given Document Classifier Project.

Parameters
[in] | hDCProject | Handle of the Document Classifier Project returned by kRecOpenDCProject.
[out] | pConfidenceThreshold | Address of an integer variable to get the confidence threshold.
Note
The confidence threshold is a number between 0 and 100. It can be set with Document Classifier Assistant during the Training and Testing Process, and stored in Document Classifier Project File. The threshold can be queried and changed after the Document Classifier Project File is loaded.
The specification of this function in C# is:
RECERR kRecGetDCConfidenceThreshold(IntPtr hDCProject, out int ConfidenceThreshold);
kRecGetDCConfidenceThreshold
RECERR RECAPIKRN kRecGetDCConfidenceThreshold(DCHANDLE hDCProject, int *pConfidenceThreshold)
Get the confidence threshold of a Document Classifier Project.
The specification of this function in Java is:
int kRecGetDCConfidenceThreshold(DCHANDLE hDCProject, int[] pConfidenceThreshold)
The specification of this function in Python is:
def kRecGetDCConfidenceThreshold(hDCProject: "DCHANDLE") -> Tuple[int, int]

◆ kRecGetFirstDCClass()

RECERR RECAPIKRN kRecGetFirstDCClass | ( | DCHANDLE | hDCProject,
 |  | DCHANDLE * | phDCClass )

Starting enumeration of Document Classes.

This function returns the handle of the first Document Class of the given project.

Parameters
[in] | hDCProject | Handle of the Document Classifier Project.
[out] | phDCClass | Address of a variable to store the handle of the first Document Class.
Return values
RECERR
Note
The Document Classes can be queried using the kRecGetFirstDCClass and kRecGetNextDCClass function-pair.
The name of the class can be queried by kRecGetDCClassName().
The specification of this function in C# is:
RECERR kRecGetFirstDCClass(IntPtr hDCProject, out IntPtr hDCClass);
kRecGetFirstDCClass
RECERR RECAPIKRN kRecGetFirstDCClass(DCHANDLE hDCProject, DCHANDLE *phDCClass)
Starting enumeration of Document Classes.
The specification of this function in Java is:
int kRecGetFirstDCClass(DCHANDLE hDCProject, DCHANDLE phDCClass)
The specification of this function in Python is:
def kRecGetFirstDCClass(hDCProject: "DCHANDLE") -> Tuple[int, "DCHANDLE"]

◆ kRecGetNextDCClass()

RECERR RECAPIKRN kRecGetNextDCClass | ( | DCHANDLE | hDCPrevClass,
 |  | DCHANDLE * | phDCClass )

Performing enumeration of Document Classes.

This function returns the handle of the next Document Class of the given project.

Parameters
[in] | hDCPrevClass | Handle of the previous Document Class.
[out] | phDCClass | Address of a variable to store the handle of the next Document Class.
Return values
RECERR
Note
The Document Classes can be queried using the kRecGetFirstDCClass and kRecGetNextDCClass function-pair.
The name of the class can be queried by kRecGetDCClassName().
The specification of this function in C# is:
RECERR kRecGetNextDCClass(IntPtr hDCPrevClass, out IntPtr hDCClass);
kRecGetNextDCClass
RECERR RECAPIKRN kRecGetNextDCClass(DCHANDLE hDCPrevClass, DCHANDLE *phDCClass)
Performing enumeration of Document Classes.
The specification of this function in Java is:
int kRecGetNextDCClass(DCHANDLE hDCPrevClass, DCHANDLE phDCClass)
The specification of this function in Python is:
def kRecGetNextDCClass(hDCPrevClass: "DCHANDLE") -> Tuple[int, "DCHANDLE"]

◆ kRecOpenDCProject()

RECERR RECAPIKRN kRecOpenDCProject | ( | int | sid,
 |  | LPCTSTR | pDCProjectFile,
 |  | DCHANDLE * | phDCProject )

Opening Document Classifier Project File.

The kRecOpenDCProject opens a Document Classifier Project File (*.dcp).

Parameters
[in] | sid | Settings Collection ID.
[in] | pDCProjectFile | Path to the Project File.
[out] | phDCProject | Address of a variable to store the handle of the Document Classifier Project.
Return values
RECERR
Note
Use the Document Classifier Assistant to create, train and test a Document Classifier Project. Document Classifier Assistant lets you define classes, add training and test documents to the classes, train and test the document classifier. After Training and Testing Process you can export a Document Classifier Project File, which contains all the necessary information to perform classification. CSDK provides API (Document Classifier API) for loading the Document Classifier Project File and classify documents.
If the project is no longer needed it should be closed by invoking the kRecCloseDCProject function.
The specification of this function in C# is:
RECERR kRecOpenDCProject(int sid, string pDCProjectFile, out IntPtr hDCProject);
kRecOpenDCProject
RECERR RECAPIKRN kRecOpenDCProject(int sid, LPCTSTR pDCProjectFile, DCHANDLE *phDCProject)
Opening Document Classifier Project File.
The specification of this function in Java is:
int kRecOpenDCProject(int sid, String pDCProjectFile, DCHANDLE hDCProject)
The specification of this function in Python is:
def kRecOpenDCProject(sid: int, pDCProjectFile: str) -> Tuple[int, "DCHANDLE"]

◆ kRecSetDCConfidenceThreshold()

RECERR RECAPIKRN kRecSetDCConfidenceThreshold | ( | DCHANDLE | hDCProject,
 |  | int | ConfidenceThreshold )

Set the confidence threshold of a Document Classifier Project.

The kRecSetDCConfidenceThreshold sets the confidence threshold of the given Document Classifier Project.

Parameters
[in] | hDCProject | Handle of the Document Classifier Project returned by kRecOpenDCProject.
[in] | ConfidenceThreshold | The value of the current confidence threshold;
Note
The confidence threshold is a number between 0 and 100. It can be set with Document Classifier Assistant during the Training and Testing Process, and stored in Document Classifier Project File. The threshold can be queried and changed during the after the Document Classifier Project File is loaded.
The specification of this function in C# is:
RECERR kRecSetDCConfidenceThreshold(IntPtr hDCProject, int ConfidenceThreshold);
kRecSetDCConfidenceThreshold
RECERR RECAPIKRN kRecSetDCConfidenceThreshold(DCHANDLE hDCProject, int ConfidenceThreshold)
Set the confidence threshold of a Document Classifier Project.
The specification of this function in Java is:
int kRecSetDCConfidenceThreshold(DCHANDLE hDCProject, int ConfidenceThreshold)
The specification of this function in Python is:
def kRecSetDCConfidenceThreshold(hDCProject: "DCHANDLE", ConfidenceThreshold: int) -> int


RecAPI: CLASSIFY_INFO Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
CLASSIFY_INFO Struct Reference
KernelAPI » Document Classifier Module

Structure for information about classification. More...

#include <KernelApi.h>

Public Attributes

DCHANDLE hDCClass
unsigned | confidence
short | reserved1 [8]
short | reserved2 [8]

Detailed Description

Structure for information about classification.

Member Data Documentation

◆ confidence

unsigned CLASSIFY_INFO::confidence

Confidence value (0-100). 100 means the most confident.

◆ hDCClass

DCHANDLE CLASSIFY_INFO::hDCClass

Handle of the Document Class.

◆ reserved1

short CLASSIFY_INFO::reserved1[8]

For internal use only.

◆ reserved2

short CLASSIFY_INFO::reserved2[8]

For internal use only.


RecAPI: KernelAPIS

Functions
KernelAPIS
KernelAPI

Dynamic linking of KernelAPI. This module is supported on: Windows. More...

Functions

RECERR RECAPIKRN | kRecInitS (LPCTSTR pRecPath, LPCTSTR pCompanyName, LPCTSTR pProductName)
Initializing KernelAPIS.
RECERR RECAPIKRN | kRecQuitS (void)
Closing KernelAPIS.
RECERR RECAPIKRN | kRecSetLicenseS (LPCTSTR pLicenseFile, LPCTSTR pCode)
Setting the OEM license information.

Detailed Description

Dynamic linking of KernelAPI. This module is supported on: Windows.

There may be a general problem with DLL's that they must be located on one of some predetermined pathes. It may constrain the distribution of the integrating application. The KernelAPIS module solves this problem.

KernelAPIS is a wrapper on the module KernelAPI, which makes possible to separate the integrating application from the files of the OmniPage CSDK 2025.1 without putting the folder of the CSDK into the environment variable PATH. In fact, this may be one of some little static libraries. Depending on how the release version of the integrating application uses the C run-time libraries, one of the following KernelAPIS static libraries should be linked to the application:

  • KrnAPIS_MS.LIB - multi-threaded C run-time library - statically linked,
  • KrnAPIS_MDyn.LIB - multi-threaded C run-time library - dynamically linked.

The debug version of the integrating application requires a static library to be linked as follows:

  • KrnAPIS_MSd.LIB - multi-threaded C run-time library - statically linked,
  • KrnAPIS_MDynd.LIB - multi-threaded C run-time library - dynamically linked.

It is a thin interface layer for binding the Engine at run-time. It loads the KernelAPI from a specified path and gets all the entry points of the KernelAPI.DLL (kRecInitS). Unloading also can be controlled by the integrating application (kRecQuitS).

Function Documentation

◆ kRecInitS()

RECERR RECAPIKRN kRecInitS | ( | LPCTSTR | pRecPath,
 |  | LPCTSTR | pCompanyName,
 |  | LPCTSTR | pProductName )

Initializing KernelAPIS.

This function initializes the module KernelAPIS, which includes the initialization of KernelAPI. Except for kRecSetLicenseS, the functions of KernelAPI should not be called before initialization. This function allows the integrating application to bind the Engine by enumerating the modules installed in the Engine Binary directory, determining the configuration of the Engine and initializing its modules (i.e. by calling kRecInit from inside).

Parameters
[in] | pRecPath | Full path to the Engine Binary directory, i.e. where the Engine files are located. NULL kRecInitS searches Engine files beside the application process EXE. Relative path from the application process EXE where the Engine files are located.
[in] | pCompanyName | Name of the User's Company. It can be NULL. Default value: OmniPage. It can be used for creating a company-specific working folder for temporary and other files generated by KernelAPI.
[in] | pProductName | Name of the Product or Application. It can be NULL. Default value: CSDK22. It can be used for creating an application-specific working folder for temporary and other files generated by KernelAPI.
Return values
RECERR
Note
This function is an alternative call to the kRecInit function, use one of these for Engine initialization.
To close KernelAPIS and also the Engine, the application has to call the kRecQuitS function.
If the specified directory is invalid, or exists but does not contain the Engine files, an API_INIT_ERR value is returned.
This function DOES NOT initialize the scanning module, its initialization requires a separate kRecScanInit function call.
You can speed up Engine initialization by removing superfluous modules from the Engine Binary directory.

◆ kRecQuitS()

RECERR RECAPIKRN kRecQuitS ( void )

Closing KernelAPIS.

This function closes the module KernelAPIS, which includes the closing of KernelAPI. This function should be called only when the initialization used by the integrating application calls kRecInitS.

Return values
RECERR

◆ kRecSetLicenseS()

RECERR RECAPIKRN kRecSetLicenseS | ( | LPCTSTR | pLicenseFile,
 |  | LPCTSTR | pCode )

Setting the OEM license information.

The kRecSetLicenseS function sets the OEM license information. In the case of an OEM distribution this function must be called before kRecInitS.
For details see the description of kRecSetLicense


RecAPI: RecAPIPlus

Topics
RecAPIPlus

This is the "C" level Document Oriented API of the OmniPage CSDK. This API level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. More...

Topics

General Service Functions Module
General Service Functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
Simple Multipage Document Handling Module
Simple document handling functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
One Step Functions Module
One step functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
Layout Retention Output Module
Layout Retention Output. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
Text Marking and Redaction Module
Text Marking and Redaction. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
Form Data Extraction Module
Data collection from filled forms with CSV output. Form processing is supported on: Windows, Linux, MacOS.
Scanner Enhancement Technology Tools (SET Tools)
Scanner Enhancement Technology Tools (SET Tools). This module is supported on: Windows.
RecAPIPlusS
Dynamic linking of RecAPIPlus. This module is supported on: Windows.

Detailed Description

This is the "C" level Document Oriented API of the OmniPage CSDK. This API level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.

This part of RecAPI is an extension of the KernelAPI. Remember that the KernelAPI can be used of its own, and the kRecInit function initializes it. If RecAPIPlus is used, the function set from both interfaces can be used. In this case the RecInitPlus function starts RecAPIPlus and you must not use kRecInit. RecAPIPlus takes care of the organizing and exporting of documents. When the recognition of a page is finished, the RecInsertPage function puts the page into the document. This page will no longer be accessible via KernelAPI functions. The pages of the document can be moved, deleted and new ones can be inserted at any place. If a document is finished, it can be saved and can be later reloaded and edited. The format of the document is the same as the OmniPage 2025.1 native (OPD) format. CSDK 2025.1 can open OPD files made by OmniPage 15.

List of header files of this module:

  • RecAPIPlus.h - The main header including KernelAPI.h and containing all the modules of RecAPIPlus.

The library file that should be linked is RecAPIPlus.lib, but there is an alternative solution: the dynamic linking using RecAPIPlusS (supported on: Windows).


RecAPI: General Service Functions Module

Functions
General Service Functions Module
RecAPIPlus

General Service Functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. More...

Functions

RECERR RECAPIPLS | RecInitPlus (LPCTSTR pCompanyName, LPCTSTR pProductName)
Initialize the RecAPIPlus.
RECERR RECAPIPLS | RecQuitPlus (void)
Uninitialize the RecAPIPlus.
RECERR RECAPIPLS | RecSaveSettings (int sid, LPCTSTR pStsFile)
Save RecAPIPlus settings.
RECERR RECAPIPLS | RecLoadSettings (int sid, LPCTSTR pStsFile)
Load RecAPIPlus settings.
RECERR RECAPIPLS | RecSetDefaultSettings (int sid)
Set RecAPIPlus settings to default.
RECERR RECAPIPLS | RecSetOCRThreadCount (int sid, int thCount)
Set the OCR thread count of the internal workflow manager.
RECERR RECAPIPLS | RecGetOCRThreadCount (int sid, int *thCount)
Get the current OCR thread count of the internal workflow manager.

Detailed Description

General Service Functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.

The following functions are responsible for the initialization and termination, for loading and saving RecAPIPlus settings, and for setting the count of the OCR threads. RecInitPlus, RecQuitPlus, RecSaveSettings, RecLoadSettings, RecSetDefaultSettings, RecSetOCRThreadCount, RecGetOCRThreadCount.

Function Documentation

◆ RecGetOCRThreadCount()

RECERR RECAPIPLS RecGetOCRThreadCount | ( | int | sid,
 |  | int * | thCount )

Get the current OCR thread count of the internal workflow manager.

The internal workflow manager creates more than one thread when it runs.

Parameters
[in] | sid | Settings Collection ID.
[out] | thCount | Current thread count.
Return values
RECERR
Note
Multithreading is supported on: Windows, Linux.
This function gets the value of the setting Kernel.RPP.RecThreadCount. This setting can be changed by RecSetOCRThreadCount.
The specification of this function in C# is:
RECERR RecGetOCRThreadCount(int sid, out int thCount);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
RecGetOCRThreadCount
RECERR RECAPIPLS RecGetOCRThreadCount(int sid, int *thCount)
Get the current OCR thread count of the internal workflow manager.
The specification of this function in Java is:
int RecGetOCRThreadCount(int sid, int[] thCount)
The specification of this function in Python is:
def RecGetOCRThreadCount(sid: int) -> Tuple[int, int]

◆ RecInitPlus()

RECERR RECAPIPLS RecInitPlus | ( | LPCTSTR | pCompanyName,
 |  | LPCTSTR | pProductName )

Initialize the RecAPIPlus.

When the program uses RecAPIPlus, it has to call RecInitPlus instead of kRecInit. With only a few exceptions (kRecSetLicense, kRecGetVersion) the functions of KernelAPI should not be called before initialization. This function initializes every module which is initialized in the kRecInit and additionally intializes the document manager subsystem. Use this function to implicitly bind the Engine to the application. When this function is used for the Engine initialization, the RECAPIPLUS.LIB import library must be linked to the application. If you are going to use functions from both KernelAPI and RecAPIPlus, you have to import both KERNELAPI.LIB and RECAPIPLUS.LIB.

Parameters
[in] | pCompanyName | Name of the User's Company. It can be NULL. Default value: on Windows systems is OmniPage, on Linux systems is omnipage, on MacOS is OmniPage. It is used for creating a company-specific working folder for temporary and other files generated by KernelAPI.
[in] | pProductName | Name of the Product or Application. It can be NULL. Default value: on Windows systems is CSDK22, on Linux systems is csdk-2025.1, on MacOS is CSDK-2025.1. It is used for creating an application-specific working folder for temporary and other files generated by KernelAPI.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
This function DOES NOT initialize the scanning subsystem, its initialization requires a separate kRecScanInit function call.
This function also initializes the KernelAPI.
The specification of this function in C# is:
RECERR RecInitPlus(string companyName, string productName);
RecInitPlus
RECERR RECAPIPLS RecInitPlus(LPCTSTR pCompanyName, LPCTSTR pProductName)
Initialize the RecAPIPlus.
The specification of this function in Java is:
int RecInitPlus(String pCompanyName, String pProductName)
The specification of this function in Python is:
def RecInitPlus(pCompanyName: Optional[str], pProductName: Optional[str], csdkPath: Optional[str] = None) -> int

◆ RecLoadSettings()

RECERR RECAPIPLS RecLoadSettings | ( | int | sid,
 |  | LPCTSTR | pStsFile )

Load RecAPIPlus settings.

This loads all settings under the ApiPlus subtree.

Parameters
[in] | sid | Settings Collection ID.
[in] | pStsFile | Full path to a setting filename.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RecLoadSettings(int sid, string stsFilename);
RecLoadSettings
RECERR RECAPIPLS RecLoadSettings(int sid, LPCTSTR pStsFile)
Load RecAPIPlus settings.
The specification of this function in Java is:
int kRecLoadSettings(int sid, String pFileName)
kRecLoadSettings
RECERR RECAPIKRN kRecLoadSettings(int sid, LPCTSTR pFileName)
Loading settings.
The specification of this function in Python is:
def kRecLoadSettings(sid: int, pFileName: str) -> int

◆ RecQuitPlus()

RECERR RECAPIPLS RecQuitPlus ( void )

Uninitialize the RecAPIPlus.

The RecQuitPlus function stops the CSDK. It frees all the resources allocated by the Engine. Must be used in pair with the RecInitPlus.

Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
If the scanning subsystem was also initialized, it requires a separate kRecScanQuit call.
The function RecQuitPlus removes all the Settings Collections, pending and user settings, and sets the remaining settings to default, so the setting states are the same after every subsequent RecQuitPlus - RecInitPlus pair. In previous versions of CSDK the RecQuitPlus did not do these steps, thus after a subsequent RecInitPlus all the settings existed and had the same value as before the previous RecQuitPlus. This behaviour can be simulated in CSDK v16 or later doing a workaround: Before RecQuitPlus:
  1. save the required setting values from the required Settings Collections,
After RecInitPlus:
  1. create all the required user settings,
  2. create the required Settings Collections,
  3. load the proper setting files into the proper Settings Collections.
The specification of this function in C# is:
RECERR RecQuitPlus();
RecQuitPlus
RECERR RECAPIPLS RecQuitPlus(void)
Uninitialize the RecAPIPlus.
The specification of this function in Java is:
int RecQuitPlus()
The specification of this function in Python is:
def RecQuitPlus() -> int

◆ RecSaveSettings()

RECERR RECAPIPLS RecSaveSettings | ( | int | sid,
 |  | LPCTSTR | pStsFile )

Save RecAPIPlus settings.

This saves all settings under the ApiPlus subtree.

Parameters
[in] | sid | Settings Collection ID.
[in] | pStsFile | Full path to a setting filename.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RecSaveSettings(int sid, string stsFilename);
RecSaveSettings
RECERR RECAPIPLS RecSaveSettings(int sid, LPCTSTR pStsFile)
Save RecAPIPlus settings.
The specification of this function in Java is:
int kRecSaveSettings(int sid, String pFileName)
kRecSaveSettings
RECERR RECAPIKRN kRecSaveSettings(int sid, LPCTSTR pFileName)
Saving settings of KernelAPI.
The specification of this function in Python is:
def kRecSaveSettings(sid: int, pFileName: str) -> int

◆ RecSetDefaultSettings()

RECERR RECAPIPLS RecSetDefaultSettings ( int sid )

Set RecAPIPlus settings to default.

This resets all settings under the ApiPlus subtree to defaults.

Parameters
[in] sid Settings Collection ID.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RecSetDefaultSettings(int sid);
RecSetDefaultSettings
RECERR RECAPIPLS RecSetDefaultSettings(int sid)
Set RecAPIPlus settings to default.
The specification of this function in Java is:
int RecSetDefaultSettings(int sid)
The specification of this function in Python is:
def RecSetDefaultSettings(sid: int) -> int

◆ RecSetOCRThreadCount()

RECERR RECAPIPLS RecSetOCRThreadCount | ( | int | sid,
 |  | int | thCount )

Set the OCR thread count of the internal workflow manager.

The internal workflow manager creates more than one thread when it runs. If the thread count of the workflow manager is not set (i.e. its value is -1, which is the default) the number of recognizing threads equals to the logical CPU's number. Otherwise, it equals to the adjusted value.

Parameters
[in] | sid | Settings Collection ID.
[in] | thCount | Thread count.
Return values
RECERR
Note
Multithreading is supported on: Windows, Linux.
This function sets the value of the setting Kernel.RPP.RecThreadCount. This setting can be retrieved by RecGetOCRThreadCount.
The specification of this function in C# is:
RECERR RecSetOCRThreadCount(int sid, int thCount);
RecSetOCRThreadCount
RECERR RECAPIPLS RecSetOCRThreadCount(int sid, int thCount)
Set the OCR thread count of the internal workflow manager.
The specification of this function in Java is:
int RecSetOCRThreadCount(int sid, int thCount)
The specification of this function in Python is:
def RecSetOCRThreadCount(sid: int, thCount: int) -> int


RecAPI: Simple Multipage Document Handling Module

Typedefs | Enumerations | Functions
Simple Multipage Document Handling Module
RecAPIPlus

Simple document handling functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. More...

Typedefs

typedef struct RECDOCSTRUCT * HDOC
Document handle.

Enumerations

enum HPAGESaveFlags {
HPSF_Default = 0x0000 ,
HPSF_SaveAll = 0xFFFF
}
Possible enumerations for the "APIPlus.HPAGE.SaveFlags" setting. More...

Functions

RECERR RECAPIPLS | RecCreateDoc (int sid, LPCTSTR pDocFile, HDOC *phDoc, int mode)
Create an OmniPage document file or folder.
RECERR RECAPIPLS | RecOpenDoc (int sid, LPCTSTR pDocFile, HDOC *phDoc)
Open an OmniPage document file or folder.
RECERR RECAPIPLS | RecCloseDoc (int sid, HDOC hDoc)
Close an OmniPage document.
RECERR RECAPIPLS | RecDeleteDoc (LPCTSTR pDocName)
Deletes an OmniPage document file or folder.
RECERR RECAPIPLS | RecSaveDoc (int sid, HDOC hDoc, LPCTSTR pDocFile)
Save an OmniPage document to file.
RECERR RECAPIPLS | RecGetPageCount (int sid, HDOC hDoc, int *pnPages)
Get the number of pages of an OmniPage document.
RECERR RECAPIPLS | RecInsertPage (int sid, HDOC hDoc, HPAGE hPage, int iPage)
Insert an HPAGE as a new page into a document.
RECERR RECAPIPLS | RecUpdatePage (int sid, HDOC hDoc, int iPage, HPAGE hPage)
Update a page in a document specified by an HPAGE.
RECERR RECAPIPLS | RecGetPage (int sid, HDOC hDoc, int iPage, HPAGE *phPage)
Retrieve HPAGE from a document.
RECERR RECAPIPLS | RecDeletePage (int sid, HDOC hDoc, int iPage)
Delete a page from a document.
RECERR RECAPIPLS | RecMovePage (int sid, HDOC hDoc, int iPageFrom, int iPageTo)
Move a page in a document.
RECERR RECAPIPLS | RecConvert2Doc (int sid, HDOC hDoc, LPCTSTR pOutputFilename)
Convert and export an OmniPage document to the final output document.
RECERR RECAPIPLS | RecGetPageStatistics (int sid, HDOC hDoc, int iPage, STATISTIC *stat)
Getting recognition statistics.
RECERR RECAPIPLS | RecCreatePageStore (int sid, HDOC hDoc, int storeId, HPAGE hPage)
Create a Page Store inside a document and attach a page to it.
RECERR RECAPIPLS | RecDeletePageStore (int sid, HDOC hDoc, int storeId)
Delete a Page Store from inside a document.
RECERR RECAPIPLS | RecGetPageStore (int sid, HDOC hDoc, int storeId, HPAGE *phPage)
Create a handle for an existing Page Store inside a document.
RECERR RECAPIPLS | RecFormatPageStore (int sid, HPAGE hPage)
Run Format Detection on a page attached to a Page Store.

Document Storage Mode

These values can be used as the mode at RecCreateDoc.

#define | DOC_NORMAL 0
Normal Storage mode: The document is a compound file. This mode is supported on: Windows. On other platforms it works as DOC_FOLDER.
#define | DOC_FOLDER 1
Folder Storage mode: The document is a set of files in a folder.

Detailed Description

Simple document handling functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.

With these functions the User's application can implement document-based solutions. The application can create (RecCreateDoc) multi-page documents. The application can insert recognized pages (HPAGE's) that have been processed using KernelAPI functions.

The RecAPIPlus Document can be handled at two levels:

  • Page level: In this case the Document is a set of Page Stores. Pages are independent of each other, not used as a connected document. (E.g. Page Stores are not assigned to a page number inside the document; they just have an identifier which is independent from their final place in a document.)
    See RecCreatePageStore, RecGetPageStore.
    Page level functions are needed mostly if recognition is done in multiple processes. After creating the document in one process it can be opened in other processes, too, and concurrent page level use is possible in all those processes (of course the processes should work on different pages).
  • Document level: In this case pages are inserted into the document at a given page number (RecInsertPage). The application can delete or move pages or save and load the document to and from the proprietary OPD file type. When the document is ready, the application can export it (RecConvert2Doc) into the output file, using the appropriate output format like PDF, Word, etc. (RecSetOutputFormat). Document level functions must be called in a single process only.

It is not necessary to step to the Document level; an HDOC can be used exclusively on the Page level, too. This is useful when pages are processed in multiple processes, saved to Page Stores, then when all the pages are done, converted to a file or files with kRecConvert2DTXT calls.

Typedef Documentation

◆ HDOC

typedef struct RECDOCSTRUCT* HDOC

Document handle.

This is handle for an OmniPage document. Every function which handles a document needs it as an input parameter.

Enumeration Type Documentation

◆ HPAGESaveFlags

enum HPAGESaveFlags

Possible enumerations for the "APIPlus.HPAGE.SaveFlags" setting.

Enumerator
HPSF_Default | Save default elements.
HPSF_SaveAll | Save all HPAGE elements.

Function Documentation

◆ RecCloseDoc()

RECERR RECAPIPLS RecCloseDoc | ( | int | sid,
 |  | HDOC | hDoc )

Close an OmniPage document.

This closes an OmniPage document when it is no longer being used. The document handle becomes invalid.

Parameters
[in] | sid | Settings Collection ID.
[in] | hDoc | Document handle.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
In DOC_NORMAL mode the OPD file is automatically saved before closing.
The specification of this function in C# is:
RECERR RecCloseDoc(int sid, IntPtr hDoc);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
RecCloseDoc
RECERR RECAPIPLS RecCloseDoc(int sid, HDOC hDoc)
Close an OmniPage document.
The specification of this function in Java is:
int RecCloseDoc(int sid, HDOC hDoc)
HDOC
struct RECDOCSTRUCT * HDOC
Document handle.
Definition RecAPIPlus.h:244
The specification of this function in Python is:
def RecCloseDoc(sid: int, hDoc: "HDOC") -> int

◆ RecConvert2Doc()

RECERR RECAPIPLS RecConvert2Doc | ( | int | sid,
 |  | HDOC | hDoc,
 |  | LPCTSTR | pOutputFilename )

Convert and export an OmniPage document to the final output document.

This creates a document file from an OmniPage document. The new document file's type and format can be given by RecSetOutputFormat.

Parameters
[in] | sid | Settings Collection ID.
[in] | hDoc | Document handle.
[in] | pOutputFilename | Pointer to an output file name.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. However not all the output formats are supported on all of these platforms. See details.
In the Microsoft Word and PowerPoint programs, the size of the page is limited. The width and height of the page must be between 0.1 and 22 inches. Because of this, if you scanned or loaded a page that is larger than this limit, you cannot save it into Flowing Page or True Page formats with *.rtf and *.docx and *.pptx file extensions. These formats try to retain the original page size and layout. If you try to save this, you will get an error message and the file will not be saved.
The specification of this function in C# is:
RECERR RecConvert2Doc(int sid, IntPtr hDoc, string outputFilename);
RecConvert2Doc
RECERR RECAPIPLS RecConvert2Doc(int sid, HDOC hDoc, LPCTSTR pOutputFilename)
Convert and export an OmniPage document to the final output document.
The specification of this function in Java is:
int RecConvert2Doc(int sid, HDOC hDoc, String pOutputFilename)
The specification of this function in Python is:
def RecConvert2Doc(sid: int, hDoc: "HDOC", pOutputFilename: str) -> int

◆ RecCreateDoc()

RECERR RECAPIPLS RecCreateDoc | ( | int | sid,
 |  | LPCTSTR | pDocFile,
 |  | HDOC * | phDoc,
 |  | int | mode )

Create an OmniPage document file or folder.

This creates a new OmniPage document, and also a disk file or folder for it. It also generates a document handle for this document.

Parameters
[in] | sid | Settings Collection ID.
[in] | pDocFile | Path to the OPD file (DOC_NORMAL mode) or folder (DOC_FOLDER mode). In DOC_NORMAL mode if pDocFile is an empty string, OPD file will not be created after closing the document. If you are not interested in persistent OPD files, use empty string as file name. It speeds up RecCreateDoc / RecInsertPage / RecConvert2Doc / RecCloseDoc workflow. In DOC_FOLDER mode pDocFile cannot be an empty string.
[out] | phDoc | Contains the handle of the created document.
[in] | mode | Specifies the Document Storage Mode. Can be either DOC_NORMAL or DOC_FOLDER.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The OmniPage document file extension is "OPD", but other extensions can be used as well.
DOC_NORMAL mode is supported on: Windows. On other platforms it works as DOC_FOLDER.
The created OPD file or folder can be deleted by RecDeleteDoc.
The specification of this function in C# is:
RECERR RecCreateDoc(int sid, string DocFile, out IntPtr hDoc, DOCOPENMODE mode);
RecCreateDoc
RECERR RECAPIPLS RecCreateDoc(int sid, LPCTSTR pDocFile, HDOC *phDoc, int mode)
Create an OmniPage document file or folder.
The specification of this function in Java is:
int RecCreateDoc(int sid, String pDocFile, HDOC phDoc, int mode)
The specification of this function in Python is:
def RecCreateDoc(sid: int, pDocFile: str, mode: int) -> Tuple[int, "HDOC"]

◆ RecCreatePageStore()

RECERR RECAPIPLS RecCreatePageStore | ( | int | sid,
 |  | HDOC | hDoc,
 |  | int | storeId,
 |  | HPAGE | hPage )

Create a Page Store inside a document and attach a page to it.

Parameters
[in] | sid | Settings Collection ID.
[in] | hDoc | Document handle.
[in] | storeId | Page Store identifier.
[in] | hPage | Handle of a page.
Return values
RECERR
Note
This function is supported on: Windows, Linux, Embedded Linux, MacOS.
hPage is saved to the Page Store. Any future changes done to hPage will also be saved to the store when hPage is kRecFreeImg'd. The Page Store is not removed even when hPage is freed; it is removed only by RecDeletePageStore or RecDeleteDoc.
The storeId identifier can be any positive number. (It could be the 1 based serial number of the given page, but this is not necessary.) A second call of this function with the same storeId overwrites the previous content. Take care not to have the previous hPage still in memory as multiple Page Store handles are not supported.
hDoc must have been created in DOC_FOLDER mode.
This function is designed for a multiprocessing environment. Page Stores can be created in a different process, too, not only in the one that created the Document.
The specification of this function in C# is:
RECERR RecCreatePageStore(int sid, IntPtr hDoc, int storeId, IntPtr hPage);
RecCreatePageStore
RECERR RECAPIPLS RecCreatePageStore(int sid, HDOC hDoc, int storeId, HPAGE hPage)
Create a Page Store inside a document and attach a page to it.
The specification of this function in Java is:
int RecCreatePageStore(int sid, HDOC hDoc, int storeId, HPAGE hPage)
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
The specification of this function in Python is:
def RecCreatePageStore(sid: int, hDoc: "HDOC", storeId: int, hPage: "HPAGE") -> int

◆ RecDeleteDoc()

RECERR RECAPIPLS RecDeleteDoc ( LPCTSTR pDocName )

Deletes an OmniPage document file or folder.

This deletes an existing OmniPage document file or folder in the file system.

Parameters
[in] pDocName Path to the OPD file or folder.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RecDeleteDoc(string DocName);
RecDeleteDoc
RECERR RECAPIPLS RecDeleteDoc(LPCTSTR pDocName)
Deletes an OmniPage document file or folder.
The specification of this function in Java is:
int RecDeleteDoc(String pDocName)
The specification of this function in Python is:
def RecDeleteDoc(pDocName: str) -> int

◆ RecDeletePage()

RECERR RECAPIPLS RecDeletePage | ( | int | sid,
 |  | HDOC | hDoc,
 |  | int | iPage )

Delete a page from a document.

This removes a page from an open OmniPage document. The page will be deleted.

Parameters
[in] | sid | Settings Collection ID.
[in] | hDoc | Document handle.
[in] | iPage | Page index.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RecDeletePage(int sid, IntPtr hDoc, int iPage);
RecDeletePage
RECERR RECAPIPLS RecDeletePage(int sid, HDOC hDoc, int iPage)
Delete a page from a document.
The specification of this function in Java is:
int RecDeletePage(int sid, HDOC hDoc, int iPage)
The specification of this function in Python is:
def RecDeletePage(sid: int, hDoc: "HDOC", iPage: int) -> int

◆ RecDeletePageStore()

RECERR RECAPIPLS RecDeletePageStore | ( | int | sid,
 |  | HDOC | hDoc,
 |  | int | storeId )

Delete a Page Store from inside a document.

Parameters
[in] | sid | Settings Collection ID.
[in] | hDoc | Document handle.
[in] | storeId | Page Store identifier.
Return values
RECERR
Note
This function is supported on: Windows, Linux, Embedded Linux, MacOS.
Take care not to have a handle for the Page Store in memory. Free the handle (if any) with kRecFreeImg before deleting the store.
The specification of this function in C# is:
RECERR RecDeletePageStore(int sid, IntPtr hDoc, int storeId);
RecDeletePageStore
RECERR RECAPIPLS RecDeletePageStore(int sid, HDOC hDoc, int storeId)
Delete a Page Store from inside a document.
The specification of this function in Java is:
int RecDeletePageStore(int sid, HDOC hDoc, int storeId)
The specification of this function in Python is:
def RecDeletePageStore(sid: int, hDoc: "HDOC", storeId: int) -> int

◆ RecFormatPageStore()

RECERR RECAPIPLS RecFormatPageStore | ( | int | sid,
 |  | HPAGE | hPage )

Run Format Detection on a page attached to a Page Store.

Parameters
[in] | sid | Settings Collection ID.
[in] | hPage | Page Store handle.
Return values
RECERR
Note
This function is supported on: Windows, Linux, Embedded Linux, MacOS.
hPage must be a Page Store handle, not a simple Page handle. Detected format data is saved to the Page Store and will be used for document conversion.
The specification of this function in C# is:
RECERR RecFormatPageStore(int sid, IntPtr hPage);
RecFormatPageStore
RECERR RECAPIPLS RecFormatPageStore(int sid, HPAGE hPage)
Run Format Detection on a page attached to a Page Store.
The specification of this function in Java is:
int RecFormatPageStore(int sid, HPAGE hPage)
The specification of this function in Python is:
def RecFormatPageStore(sid: int, hPage: "HPAGE") -> int

◆ RecGetPage()

RECERR RECAPIPLS RecGetPage | ( | int | sid,
 |  | HDOC | hDoc,
 |  | int | iPage,
 |  | HPAGE * | phPage )

Retrieve HPAGE from a document.

It copies most of the information from a document page to a HPAGE.

Parameters
[in] | sid | Session ID.
[in] | hDoc | Document handle.
[in] | iPage | Index of the requested page.
[out] | phPage | Contains the handle of the requested page. If the retrieved HPAGE is no longer needed, it is necessary to call kRecFreeImg for that.
Return values
RECERR
Note
If you want to store and retrieve a HPAGE with all its elements like recognized letters you have to change "APIPlus.HPAGE.SaveFlags" setting (HPAGESaveFlags) to HPSF_SaveAll before calling RecInsertPage.
The specification of this function in C# is:
RECERR RecGetPage(int sid, IntPtr hDoc, int iPage, out IntPtr hPage);
RecGetPage
RECERR RECAPIPLS RecGetPage(int sid, HDOC hDoc, int iPage, HPAGE *phPage)
Retrieve HPAGE from a document.
The specification of this function in Java is:
int RecGetPage(int sid, HDOC hDoc, int iPage, HPAGE phPage)
The specification of this function in Python is:
def RecGetPage(sid: int, hDoc: "HDOC", iPage: int) -> Tuple[int, "HPAGE"]

◆ RecGetPageCount()

RECERR RECAPIPLS RecGetPageCount | ( | int | sid,
 |  | HDOC | hDoc,
 |  | int * | pnPages )

Get the number of pages of an OmniPage document.

This asks the current number of pages in the OmniPage document.

Parameters
[in] | sid | Settings Collection ID.
[in] | hDoc | Document handle.
[out] | pnPages | Contains the page number.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RecGetPageCount(int sid, IntPtr hDoc, out int nPages);
RecGetPageCount
RECERR RECAPIPLS RecGetPageCount(int sid, HDOC hDoc, int *pnPages)
Get the number of pages of an OmniPage document.
The specification of this function in Java is:
int RecGetPageCount(int sid, HDOC hDoc, int[] pnPages)
The specification of this function in Python is:
def RecGetPageCount(sid: int, hDoc: "HDOC") -> Tuple[int, int]

◆ RecGetPageStatistics()

RECERR RECAPIPLS RecGetPageStatistics | ( | int | sid,
 |  | HDOC | hDoc,
 |  | int | iPage,
 |  | STATISTIC * | stat )

Getting recognition statistics.

This function retrieves the statistics of the recognition of the specified page. The values are the number of characters, words and rejected characters and time information for each part of the recognition process.

Parameters
[in] | sid | Settings Collection ID.
[in] | hDoc | Document handle.
[in] | iPage | Index of the page to be examined.
[out] | stat | Buffer for statistics.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RecGetPageStatistics(int sid, IntPtr hDoc, int iPage, out STATISTIC stat);
RecGetPageStatistics
RECERR RECAPIPLS RecGetPageStatistics(int sid, HDOC hDoc, int iPage, STATISTIC *stat)
Getting recognition statistics.
STATISTIC
Recognition statistics.
Definition KernelApi.h:651
The specification of this function in Java is:
int RecGetPageStatistics(int sid, HDOC hDoc, int iPage, STATISTIC stat)
The specification of this function in Python is:
def RecGetPageStatistics(sid: int, hDoc: "HDOC", iPage: int) -> Tuple[int, "STATISTIC"]

◆ RecGetPageStore()

RECERR RECAPIPLS RecGetPageStore | ( | int | sid,
 |  | HDOC | hDoc,
 |  | int | storeId,
 |  | HPAGE * | phPage )

Create a handle for an existing Page Store inside a document.

Parameters
[in] | sid | Settings Collection ID.
[in] | hDoc | Document handle.
[in] | storeId | Page Store identifier.
[out] | phPage | Contains the handle of the requested Page Store.
Return values
RECERR
Note
This function is supported on: Windows, Linux, Embedded Linux, MacOS.
The returned Page Store handle is attached to the Page Store. The content of the file is read only as needed, and any changes done to the returned HPAGE are written to the store. The handle must be freed by kRecFreeImg when not needed any more. Freeing the handle does not remove the Page Store itself!
Take care not to have multiple handles for the same Page Store! Close all Page Store handles before RecConvert2Doc.
A similar function is RecGetPage, but that one creates an independent page (a copy).
The specification of this function in C# is:
RECERR RecGetPageStore(int sid, IntPtr hDoc, int storeId, out IntPtr hPage);
RecGetPageStore
RECERR RECAPIPLS RecGetPageStore(int sid, HDOC hDoc, int storeId, HPAGE *phPage)
Create a handle for an existing Page Store inside a document.
The specification of this function in Java is:
int RecGetPageStore(int sid, HDOC hDoc, int storeId, HPAGE phPage)
The specification of this function in Python is:
def RecGetPageStore(sid: int, hDoc: "HDOC", storeId: int) -> Tuple[int, "HPAGE"]

◆ RecInsertPage()

RECERR RECAPIPLS RecInsertPage | ( | int | sid,
 |  | HDOC | hDoc,
 |  | HPAGE | hPage,
 |  | int | iPage )

Insert an HPAGE as a new page into a document.

This inserts an HPAGE into an opened document. During insertion, PageFormatter is applied and at the end of the process, this function frees the HPAGE. The HPAGE must contain a BW or OCR image. By default you must not free HPAGE, because RecInsertPage frees it (see also notes). This page will no longer be accessible via KernelAPI functions.

Parameters
[in] | sid | Settings Collection ID.
[in] | hDoc | Document handle.
[in] | hPage | Handle of a page.
[in] | iPage | Insert before this page. -1 append the page.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
hPage can be either a simple page handle or a Page Store handle. In the first case the page is saved to a Page Store then formatted. In the latter case the existing Page Store is just assigned to the specified page number then formatted.
If the application changes APIPlus.FreehPageAfterInsert setting to false, HPAGE will not be freed and the application can use it, but it has to be freed later. In this case there is no connection between the HPAGE and the HDOC after the function returns, i.e. modifications on either do not affect on the other.
The specification of this function in C# is:
RECERR RecInsertPage(int sid, IntPtr hDoc, IntPtr hPage, int iPage);
RecInsertPage
RECERR RECAPIPLS RecInsertPage(int sid, HDOC hDoc, HPAGE hPage, int iPage)
Insert an HPAGE as a new page into a document.
The specification of this function in Java is:
int RecInsertPage(int sid, HDOC hDoc, HPAGE hPage, int iPage)
The specification of this function in Python is:
def RecInsertPage(sid: int, hDoc: "HDOC", hPage: "HPAGE", iPage: int) -> int

◆ RecMovePage()

RECERR RECAPIPLS RecMovePage | ( | int | sid,
 |  | HDOC | hDoc,
 |  | int | iPageFrom,
 |  | int | iPageTo )

Move a page in a document.

This changes the page index of a page in an open OmniPage document.

Parameters
[in] | sid | Settings Collection ID.
[in] | hDoc | Document handle.
[in] | iPageFrom | Starting page index.
[in] | iPageTo | Destination page index.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RecMovePage(int sid, IntPtr hDoc, int iPageFrom, int iPageTo);
RecMovePage
RECERR RECAPIPLS RecMovePage(int sid, HDOC hDoc, int iPageFrom, int iPageTo)
Move a page in a document.
The specification of this function in Java is:
int RecMovePage(int sid, HDOC hDoc, int iPageFrom, int iPageTo)
The specification of this function in Python is:
def RecMovePage(sid: int, hDoc: "HDOC", iPageFrom: int, iPageTo: int) -> int

◆ RecOpenDoc()

RECERR RECAPIPLS RecOpenDoc | ( | int | sid,
 |  | LPCTSTR | pDocFile,
 |  | HDOC * | phDoc )

Open an OmniPage document file or folder.

This opens an existing OmniPage document file or folder in the file system. It also generates a document handle for this document.

Parameters
[in] | sid | Settings Collection ID.
[in] | pDocFile | Path to the OPD file or folder.
[out] | phDoc | Contains the handle of the opened document.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
An OPD file or folder can be deleted by RecDeleteDoc.
The specification of this function in C# is:
RECERR RecOpenDoc(int sid, string DocFile, out IntPtr hDoc);
RecOpenDoc
RECERR RECAPIPLS RecOpenDoc(int sid, LPCTSTR pDocFile, HDOC *phDoc)
Open an OmniPage document file or folder.
The specification of this function in Java is:
int RecOpenDoc(int sid, String pDocFile, HDOC phDoc)
The specification of this function in Python is:
def RecOpenDoc(sid: int, pDocFile: str) -> Tuple[int, "HDOC"]

◆ RecSaveDoc()

RECERR RECAPIPLS RecSaveDoc | ( | int | sid,
 |  | HDOC | hDoc,
 |  | LPCTSTR | pDocFile )

Save an OmniPage document to file.

This saves an OmniPage document to another file.

Parameters
[in] | sid | Settings Collection ID.
[in] | pDocFile | Path to the OPD file.
[in] | hDoc | Document handle.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
In DOC_FOLDER mode pDocFile must be the same folder as specified in RecCreateDoc.
An OPD file or folder can be deleted by RecDeleteDoc.
The specification of this function in C# is:
RECERR RecSaveDoc(int sid, IntPtr hDoc, string DocFile);
RecSaveDoc
RECERR RECAPIPLS RecSaveDoc(int sid, HDOC hDoc, LPCTSTR pDocFile)
Save an OmniPage document to file.
The specification of this function in Java is:
int RecSaveDoc(int sid, HDOC hDoc, String pDocFile)
The specification of this function in Python is:
def RecSaveDoc(sid: int, hDoc: "HDOC", pDocFile: str) -> int

◆ RecUpdatePage()

RECERR RECAPIPLS RecUpdatePage | ( | int | sid,
 |  | HDOC | hDoc,
 |  | int | iPage,
 |  | HPAGE | hPage )

Update a page in a document specified by an HPAGE.

This overwrites a page in an open OmniPage document. The input page is HPAGE which will be freed at the end of the function, and cannot be used anymore (see also notes).

Parameters
[in] | sid | Settings Collection ID.
[in] | hDoc | Document handle.
[in] | iPage | Page index.
[in] | hPage | Handle of a page.
Return values
RECERR
Note
This function is supported on: Windows.
If the application changes APIPlus.FreehPageAfterInsert setting to false, HPAGE will not be freed and the application can use it, but it has to be freed later. In this case there is no connection between the HPAGE and the HDOC after the function returns, i.e. modifications on either do not affect on the other.
The specification of this function in C# is:
RECERR RecUpdatePage(int sid, IntPtr hDoc, int iPage, IntPtr hPage);
RecUpdatePage
RECERR RECAPIPLS RecUpdatePage(int sid, HDOC hDoc, int iPage, HPAGE hPage)
Update a page in a document specified by an HPAGE.
The specification of this function in Java is:
int RecUpdatePage(int sid, HDOC hDoc, int iPage, HPAGE hPage)
The specification of this function in Python is:
def RecUpdatePage(sid: int, hDoc: "HDOC", iPage: int, hPage: "HPAGE") -> int


RecAPI: One Step Functions Module

Functions
One Step Functions Module
RecAPIPlus

One step functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. More...

Functions

RECERR RECAPIPLS | RecProcessPagesEx (int sid, LPCTSTR pDocFile, LPCTSTR *pImageFiles, LPONETOUCH_CB pCallback, void *pContext)
Load, Preprocess, Recognize, Format, Export input images.
RECERR RECAPIPLS | RecGetRPPErrorList (RPPERRORS **rppErrs)
Getting errors from last RecProcessPagesEx.
RECERR RECAPIPLS | RecExecuteWorkflow (int sid, LPCTSTR pWFfilename)
Execute a predefined workflow.

Detailed Description

One step functions. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.

RecAPIPlus has two one-step functions. The RecProcessPagesEx function uses the 1-2-3 workflow from OmniPage 2025.1. It can process multiple image files with multiple pages or it can work from scanner. During the process, it uses all settings as previously set by the application. It does the following in one step: loading, image preprocessing, recognition, page/document formatting, exporting. RecExecuteWorkflow function executes workflow files created by OmniPage 2025.1 and ITest.

One-step functions manage their tasks across multiple threads, striving to achieve the optimal synchronization of the components. For more information about multi-threading see the topic Multi-threading in RecAPI.

Multi-threading is supported on: Windows, Linux only. Thus on other platforms RecExecuteWorkflow is not supported, and RecProcessPagesEx performs a sequential workflow.

See also the details about support of different output formats on different platforms.

Function Documentation

◆ RecExecuteWorkflow()

RECERR RECAPIPLS RecExecuteWorkflow | ( | int | sid,
 |  | LPCTSTR | pWFfilename )

Execute a predefined workflow.

Workflows can be created using the Workflow Assistant application (AssistantApp.exe) or using the same interface through OmniPage 2025.1 or ITest.

Parameters
[in] | sid | Settings Collection ID.
[in] | pWFfilename | Full path to the workflow file.
Return values
RECERR
Note
The Workflow may interact with the user by means of dialog boxes. These dialogs require a HWND. This HWND can be set with a setting:
HSETTING hSts;
HWND hWnd = Application main HWND or GetDesktopWindow();
kRecSettingGetHandle(NULL, "APIPlus.HWND", &hSts, NULL);
kRecSettingSetInt(0, hSts, (int)hWnd);
kRecSettingGetHandle
RECERR RSTSAPI kRecSettingGetHandle(HSETTING root_of_query, const char *symb_name, HSETTING *ret_handle, INTBOOL *has_setting)
Getting the handle of a node.
kRecSettingSetInt
RECERR RSTSAPI kRecSettingSetInt(int sid, HSETTING sett, int new_value)
Setting the value of an STS_INT or STS_ENUM or STS_BOOL setting.
HSETTING
struct RECSTSSTRUCT * HSETTING
Handle of a setting.
Definition KrnStsApi.h:287
This function is supported on: Windows.
See details about size limits of input images.
The specification of this function in C# is:
RECERR RecExecuteWorkflow(int sid, string workflowFilename);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
RecExecuteWorkflow
RECERR RECAPIPLS RecExecuteWorkflow(int sid, LPCTSTR pWFfilename)
Execute a predefined workflow.
.
The specification of this function in Java is:
int RecExecuteWorkflow(int sid, String pWFfilename)
The specification of this function in Python is:
def RecExecuteWorkflow(sid: int, pWFfilename: str) -> int

◆ RecGetRPPErrorList()

RECERR RECAPIPLS RecGetRPPErrorList ( RPPERRORS ** rppErrs )

Getting errors from last RecProcessPagesEx.

The RecGetRPPErrorList function returns the error list of last RecProcessPagesEx call.

Parameters
[out] rppErrs Pointer of a variable to store a pointer of an internal array. This array contains data for the errors happened.
Return values
RECERR
Note
RPPERRORS *rppErrs;
RecGetRPPErrorList(&rppErrs);
while (rppErrs != NULL)
{
LPCSTR p = NULL;
kRecGetErrorInfo(rppErrs->rc, &p);
printf("RC:%d/%s, obj:%S - page:%d\n", rppErrs->rc, p, rppErrs->obj, rppErrs->page);
rppErrs = rppErrs->next;
}
kRecGetErrorInfo
RETCODEINFO RECAPIKRN kRecGetErrorInfo(RECERR ErrCode, LPCSTR *lpErrSym)
Getting additional information about an error.
RecGetRPPErrorList
RECERR RECAPIPLS RecGetRPPErrorList(RPPERRORS **rppErrs)
Getting errors from last RecProcessPagesEx.
_RPPERRORS
Error list item.
Definition KernelApi.h:9900
_RPPERRORS::obj
LPWSTR obj
Definition KernelApi.h:9903
_RPPERRORS::next
struct _RPPERRORS * next
Definition KernelApi.h:9904
_RPPERRORS::page
int page
Definition KernelApi.h:9902
_RPPERRORS::rc
RECERR rc
Definition KernelApi.h:9901
The specification of this function in C# is:
RECERR kRecGetRPPErrorList(out RPPERROR[] rppErrs);
kRecGetRPPErrorList
RECERR RECAPIKRN kRecGetRPPErrorList(RPPERRORS **rppErrs)
Getting errors from last kRecProcessPagesEx.
The specification of this function in Java is:
int kRecGetRPPErrorList(RPPErrorsArray ppErrors)
The specification of this function in Python is:
def kRecGetRPPErrorList() -> Tuple[int, "RPPErrorsArray"]

◆ RecProcessPagesEx()

RECERR RECAPIPLS RecProcessPagesEx | ( | int | sid,
 |  | LPCTSTR | pDocFile,
 |  | LPCTSTR * | pImageFiles,
 |  | LPONETOUCH_CB | pCallback,
 |  | void * | pContext )

Load, Preprocess, Recognize, Format, Export input images.

This is a high-level function. It loads, preprocesses, recognizes, formats and exports every input image to a single document file.

Parameters
[in] | sid | Settings Collection ID.
[in] | pDocFile | Full path of the final output document.
[in] | pImageFiles | Pointer to an array of string pointers that define a set of image files with full path. Wildcard symbols can be used, e.g. *.tif. The last element must be NULL. If a single empty string is specified, the image file open dialog will appear. If pImageFiles is NULL the images come from scanner.
[in] | pCallback | One-touch callback function for calling back by the Engine page-by-page.
[in] | pContext | User data passed to the callback function by the Engine.
Return values
RECERR
Note
There are two special return values at this function: API_ERRORS_HAPPENED_WARN and API_WARNINGS_HAPPENED_WARN. These warnings sign that there are errors or warnings happened during the RecProcessPagesEx call, but some of the pages have been processed correctly. The program can query the complete list of errors occured using RecGetRPPErrorList.
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. However multithreading is supported on: Windows, Linux only, so this function performs a sequential workflow on other platforms.
It uses the programmed OmniPage 1-2-3 Workflow.
See details about size limits of input images.
The progress monitor callback function is called as usual independently of the one-touch callback. Use one-touch callback function for calling back by the Engine page-by-page If you do not want to abort the current process return TRUE.
The parameter notused of the ONETOUCH_CB is not considered at all.
The maximum number of recognition threads started by this function can be specified by the setting Kernel.RPP.RecThreadCount.
The format of the output document can be set by the RecSetOutputFormat function.
// ONETOUCH_CB
INTBOOL __declspec(dllexport) RECKRNCALL onetouch_cb(INTBOOL bMore, void *pContext, LPCSTR *notused)
{
INTBOOL r = FALSE;
//bMore is FALSE
return (Abort) ? FALSE : TRUE;
}
...
{
RECERR rc = REC_OK;
RecSetOutputFormat(0, "converters.text.rtf2000");
RecSetOutputLevel(0, OL_RFP);
#ifdef INPUT_FROM_FILES
LPCSTR ifiles[6] = { NULL, NULL, NULL };
ifiles[0] = "path/test1.tif";
ifiles[1] = "path/test2.tif";
// or
ifiles[0] = "path/test*.*"; // all test image files will be processed
// or
ifiles[0] = ""; // the workflow will ask for input files
rc = RecProcessPagesEx(0, "test.rtf", ifiles, NULL, NULL);
// or
#else
// NULL is used, the function will scan from the default scanner.
// The function will scan until the ADF becomes empty.
rc = RecProcessPagesEx(0, "test.rtf", NULL, onetouch_cb, NULL);
#endif
...
}
REC_OK
@ REC_OK
Successful operation, no error.
Definition RECERR_doc.h:20
RecProcessPagesEx
RECERR RECAPIPLS RecProcessPagesEx(int sid, LPCTSTR pDocFile, LPCTSTR *pImageFiles, LPONETOUCH_CB pCallback, void *pContext)
Load, Preprocess, Recognize, Format, Export input images.
RecSetOutputLevel
RECERR RECAPIPLS RecSetOutputLevel(int sid, OUTPUTLEVEL outLevel)
Set the level of format retention for the final output document.
RecSetOutputFormat
RECERR RECAPIPLS RecSetOutputFormat(int sid, LPCTSTR pFormatname)
Set the output format.
OL_RFP
@ OL_RFP
Definition RecAPIPlus.h:1128
The specification of this function in C# is:
RECERR RecProcessPagesEx(int sid, string pDocFile, string[] pImageFiles, ONETOUCH_CB callback);
ONETOUCH_CB
INTBOOL RECKRNCALL ONETOUCH_CB(INTBOOL bMore, void *pContext, LPCTSTR *notused)
The user-written "One-touch" callback function.
Definition KernelApi.h:929
The specification of this function in Java is:
int RecProcessPagesEx(int sid, String pDocFile, String[] pImageFiles, OneTouchCallback pCallback)
The specification of this function in Python is:
def RecProcessPagesEx(sid: int, pDocFile: str, pImageFiles: List[str], pCallback: "OneTouchCallback") -> int


RecAPI: Layout Retention Output Module

Classes | Macros | Typedefs | Enumerations | Functions
Layout Retention Output Module
RecAPIPlus

Layout Retention Output. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. More...

Classes

struct | _OUTPUTCONVERTERINFO
Output document converter information (ANSI) More...
struct | OUTPUTCONVERTERINFOW
Output document converter information (Unicode) More...

Macros

#define OUTPUTCONVERTERINFO WORA(OUTPUTCONVERTERINFO)
Output document converter information.

Typedefs

typedef struct _OUTPUTCONVERTERINFO OUTPUTCONVERTERINFOA
Output document converter information (ANSI)

Enumerations

enum DocFormatter_Mode {
DFM_Lite = 0x00 ,
DFM_CharacterStyleConsolidation = 0x01 ,
DFM_ParagraphStyleConsolidation = 0x02 ,
DFM_StyleConsolidation = 0x03 ,
DFM_HeaderFooter = 0x04 ,
DFM_CrossrefFind = 0x08 ,
DFM_MarginConsolidation = 0x10 ,
DFM_HeadingConsolidation = 0x20 ,
DFM_Essay = 0x2F ,
DFM_Full = 0xFF
}
Document formatter methods. More...
enum | TColorQValues
Color quality. More...
enum | TPDFCompatibTypeValues
Compatibility. More...
enum TPDFOpenDisplayModeValues {
}
Display mode. More...
enum TPDFOpenPGLayoutValues {
}
Page layer. More...
enum | R2_HEADERS_RETENTION
HeadersFooters. More...
enum | TWriteIndex
Index Page. More...
enum | TPDFSecurityValues
PDFSecurity type. More...
enum | R2_PAGEBREAKS
PageBreaks. More...
enum | R2_PICTURES_BPP
Picture color. More...
enum | R2_PICTURES_DPI
Pictures. More...
enum | TSignatureTypevalues
Signature type. More...
enum | R2_TABLES_RETENTION
Tables. More...
enum | TMRCTypeValues
MRC use. More...
enum OUTPUTLEVEL {
OL_AUTO ,
OL_NOFORMAT ,
OL_RFP ,
OL_TRUEPAGE ,
OL_FLOWINGPAGE ,
OL_SPREADSHEET
}
Output level of the exported document. More...

Functions

RECERR RECAPIPLS | RecSetOutputFormat (int sid, LPCTSTR pFormatname)
Set the output format.
RECERR RECAPIPLS | RecGetOutputFormat (int sid, LPTSTR pFormatname, int len)
Ask the output format.
RECERR RECAPIPLS | RecGetFirstOutputFormat (LPTSTR pFormatname, int len)
Start the enumeration of the output formats.
RECERR RECAPIPLS | RecGetNextOutputFormat (LPTSTR pFormatname, int len)
Continue the enumeration of the output formats.
RECERR RECAPIPLS | RecGetOutputFormatInfo (LPCTSTR pFormatName, OUTPUTCONVERTERINFO *pInfo)
Get information about the specified output document format converter.
RECERR RECAPIPLS | RecGetOutputSettingsHandle (int sid, HSETTING *hSetting)
Gets the settings handle for the currently set output format.
RECERR RECAPIPLS | RecSetOutputLevel (int sid, OUTPUTLEVEL outLevel)
Set the level of format retention for the final output document.
RECERR RECAPIPLS | RecGetOutputLevel (int sid, OUTPUTLEVEL *poutLevel)
Ask the current level of format retention for the final output document.

Detailed Description

Layout Retention Output. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.

RecAPIPlus provides complex accurate layout retention outputs with several file formats such as RTF, DOC, WordML, XLS, PDF, WP, WAV. The RecConvert2Doc and RecProcessPagesEx functions export the given document into the previously mentioned output file formats. See the details about support of different output formats on different platforms.

In several cases our goal is to retain the original layout in the output document, as far as possible. The different converters have different capabilities for retaining the layout. There are 5 output levels (OUTPUTLEVEL) for the several layout retentions. Not every converter can realize every output mode. For example a Word document or a PDF document has Flowing Page and True Page modes, which are very similar to the original output and there are simple text converters, which can retain only the simple text in Plain Text mode (formerly No Format mode) and the text with its attributes in Formatted Text mode (formerly Retain Font and Paragraphs mode).

Besides the output modes, converters have many settings, which can influence the layout (list of converter settings). You can use these settings through the Settings Manager Module.

Page consolidation

When scanning pages from a document with uniform margins, typically the page images do not place the body text content in precisely the same position on each page, due to scanning variations. Previously, users had to manually restore uniform margins after the recognition result was exported. This toolkit examines incoming pages and if it determines that they have similar text area and layout, page consolidation is automatically performed. The program calculates ideal margins, then identifies a vector for each page describing the difference between the actual and ideal margins. These vectors are then applied during the output process to the following file types: RTF, WordML, PDF, DOCX and XPS. This consolidation is totally automatic and cannot be influenced. However, the User can decide whether the converter should apply these vectors or not, by using the setting ConsolidatePages of the given converters.

Macro Definition Documentation

◆ OUTPUTCONVERTERINFO

#define OUTPUTCONVERTERINFO WORA(OUTPUTCONVERTERINFO)

Output document converter information.

On Windows this type can be used as OUTPUTCONVERTERINFOA or OUTPUTCONVERTERINFOW depending on _UNICODE macro. On Linux and MacOS this is equivalent to OUTPUTCONVERTERINFOA.

Typedef Documentation

◆ OUTPUTCONVERTERINFOA

typedef struct _OUTPUTCONVERTERINFO OUTPUTCONVERTERINFOA

Output document converter information (ANSI)

This structure describes the converter module and its target format. This is used by the RecGetOutputFormatInfo function.

Enumeration Type Documentation

◆ DocFormatter_Mode

enum DocFormatter_Mode

Document formatter methods.

These are the possible values of the setting Formatter.df.mode.

Enumerator
DFM_Lite | Add page to document.
DFM_CharacterStyleConsolidation | Find/Consolidate Character styles.
DFM_ParagraphStyleConsolidation | Find/Consolidate Paragraph styles.
DFM_StyleConsolidation | Find/Consolidate Paragraph and character styles too.
DFM_HeaderFooter | Find header/footers. It requires to have at least 2 pages in a document.
DFM_CrossrefFind | Find footnotes.
DFM_MarginConsolidation | Margin consolidation.
DFM_HeadingConsolidation | Find/Consolidate Headings (using special styles)
DFM_Essay | Style and headings consolidation, find header/footers, footnotes/hrefs.
DFM_Full | All.

◆ OUTPUTLEVEL

enum OUTPUTLEVEL

Output level of the exported document.

Pre-defined levels of the format retention for the final output document. The different property values belonging to these settings are documented in the RecSetOutputLevel function. See also the table of the supported output levels by each converters.

Enumerator
OL_AUTO | Converter default
OL_NOFORMAT | Plain text (formerly No formatting mode).
OL_RFP | Formatted Text (formerly Retain Font and Paragraphs mode).
OL_TRUEPAGE | True Page.
OL_FLOWINGPAGE | Flowing Page.
OL_SPREADSHEET | Spreadsheet.

◆ R2_HEADERS_RETENTION

enum R2_HEADERS_RETENTION

HeadersFooters.

You can set how headers and footers should be handled. You can set it for every converter, but the default value is different. For more information, see the setting HeadersFooters in the summary table of converter settings.

◆ R2_PAGEBREAKS

enum R2_PAGEBREAKS

PageBreaks.

For several converters you can set how you want page breaks to be handled. For more information, see the setting PageBreaks in the summary table of converter settings.

◆ R2_PICTURES_BPP

enum R2_PICTURES_BPP

Picture color.

For several converters, you can set the color of the image. For more information, see the setting PictureColor in the summary table of converter settings.

◆ R2_PICTURES_DPI

enum R2_PICTURES_DPI

Pictures.

For every converter you can set how you would like to handle images. The default values are different for the different converters. For more information, see the setting Pictures in the summary table of converter settings.

◆ R2_TABLES_RETENTION

enum R2_TABLES_RETENTION

Tables.

For every converter, except the Excel and Html converters, you can set how you would like to handle tables. For more information, see the setting Tables in the summary table of converter settings.

◆ TColorQValues

enum TColorQValues

Color quality.

For the PDF converters you can set the color quality. The default is R2ID_PDFCOLORQUALITY_MIN for every PDF converter. For more information, see the setting ColorQuality in the summary table of converter settings.

◆ TMRCTypeValues

enum TMRCTypeValues

MRC use.

For PDF converters you can set the MRC type. The default is: R2ID_PDFMRC_NO for every PDF converter. For more information, see the setting UseMRC in the summary table of converter settings. The newer ones can be used with 5 different predefined levels (1-5) by calling kRecSetCompressionLevel. See the Tungsten Omnipage Capture SDK User's Guide for more details, in the Imaging Module, MRC image compression level comparison subsection. About MRC Level in Saving MRC PDF files in KernelAPI Saving MRC PDF files in KernelAPI.

◆ TPDFCompatibTypeValues

enum TPDFCompatibTypeValues

Compatibility.

For the PDF converters you can set this compatibility value. For more information, see the setting Compatibility in the summary table of converter settings.

◆ TPDFOpenDisplayModeValues

enum TPDFOpenDisplayModeValues

Display mode.

For any PDF converters you can set this mode values specifying how the pdf file should be displayed when opened.

Enumerator
R2ID_PDF_ODM_NONE | Neither document outline nor thumbnail images visible (def in pdf)
R2ID_PDF_ODM_OUTLINE | Document outline visible
R2ID_PDF_ODM_THUMBNAIL | Thumbnail images visible
R2ID_PDF_ODM_FULL_SCREEN | The PDF file opens in full screen mode
R2ID_PDF_ODM_VISIBLE_OC | PDF 1.5 //Optional content group panel visible
R2ID_PDF_ODM_ATTACHMENTS | PDF 1.6 //Attachments panel visible

◆ TPDFOpenPGLayoutValues

enum TPDFOpenPGLayoutValues

Page layer.

For any PDF converters you can set this values specifying the pdf page layout when opened.

Enumerator
R2ID_PDF_OPGL_SINGLEPAGE | Display one page at a time (def in pdf)
R2ID_PDF_OPGL_ONECOLUMN | Display the pages in one column
R2ID_PDF_OPGL_TWOCOLUMNLEFT | Display the pages in two columns, with odd-numbered pages on the left
R2ID_PDF_OPGL_TWOCOLUMNRIGHT | Display the pages in two columns, with odd-numbered pages on the right
R2ID_PDF_OPGL_TWOPAGELEFT | PDF 1.5 //Display the pages two at a time, with odd-numbered pages on the left
R2ID_PDF_OPGL_TWOPAGERIGHT | PDF 1.5 //Display the pages two at a time, with odd-numbered pages on the right

◆ TPDFSecurityValues

enum TPDFSecurityValues

PDFSecurity type.

For PDF converters you can set the security type. For more information, see the setting PDFSecurity.Type in the summary table of converter settings.

◆ TSignatureTypevalues

enum TSignatureTypevalues

Signature type.

For the PDF converters you can set the signature type. The default is: R2ID_SIGTYPENONE for every PDF converter. For more information, see the setting Signature.SignatureType in the summary table of converter settings.

◆ TWriteIndex

enum TWriteIndex

Index Page.

You can switch on the Index Page generation in simple or 'InFrame' mode using HTML output converters. If it is switched on, an index page is generated with links to the recognized and converted pages. In this case, you can change the text of the navigation links by changing NavNextText, NavPrevText or NavTOCText. For more information, see the setting IndexPage in the summary table of converter settings.

Function Documentation

◆ RecGetFirstOutputFormat()

RECERR RECAPIPLS RecGetFirstOutputFormat | ( | LPTSTR | pFormatname,
 |  | int | len )

Start the enumeration of the output formats.

This starts the enumeration of the document output formats in the current thread.

Parameters
[out] | pFormatname | Buffer containing the converter name.
[in] | len | Length of the buffer.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. However not all the output formats are supported on all these platforms. See details.
The specification of this function in C# is:
RECERR RecGetFirstOutputFormat(StringBuilder formatName);
// or
RECERR RecGetFirstOutputFormat(out string formatName);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
RecGetFirstOutputFormat
RECERR RECAPIPLS RecGetFirstOutputFormat(LPTSTR pFormatname, int len)
Start the enumeration of the output formats.
There is a non-enumerating function replacing RecGetFirstOutputFormat and RecGetNextOutputFormat in C#:
RECERR RecGetAllOutputFormats(out string[] formatnames);
The specification of this function in Java is:
int RecGetFirstOutputFormat(String[] pFormatname)
The specification of this function in Python is:
def RecGetFirstOutputFormat() -> Tuple[int, str]

◆ RecGetNextOutputFormat()

RECERR RECAPIPLS RecGetNextOutputFormat | ( | LPTSTR | pFormatname,
 |  | int | len )

Continue the enumeration of the output formats.

This continues the enumeration of the document output formats in the current thread.

Parameters
[out] | pFormatname | Buffer containing the converter name.
[in] | len | Length of the buffer.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. However not all the output formats are supported on all these platforms. See details.
The specification of this function in C# is:
RECERR RecGetNextOutputFormat(StringBuilder formatName);
// or
RECERR RecGetNextOutputFormat(out string formatName);
RecGetNextOutputFormat
RECERR RECAPIPLS RecGetNextOutputFormat(LPTSTR pFormatname, int len)
Continue the enumeration of the output formats.
There is a non-enumerating function replacing RecGetFirstOutputFormat and RecGetNextOutputFormat in C#:
RECERR RecGetAllOutputFormats(out string[] formatnames);
The specification of this function in Java is:
int RecGetNextOutputFormat(String[] pFormatname)
The specification of this function in Python is:
def RecGetNextOutputFormat() -> Tuple[int, str]

◆ RecGetOutputFormat()

RECERR RECAPIPLS RecGetOutputFormat | ( | int | sid,
 |  | LPTSTR | pFormatname,
 |  | int | len )

Ask the output format.

This asks the output document format for the RecConvert2Doc, RecProcessPagesEx functions.

Parameters
[in] | sid | Settings Collection ID.
[out] | pFormatname | Buffer containing the converter name.
[in] | len | Length of the buffer.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. However not all the output formats are supported on all these platforms. See details.
This function gets the value of the setting APIPlus.Output.TextFormat. This setting can be changed by RecSetOutputFormat.
The specification of this function in C# is:
RECERR RecGetOutputFormat(int sid, StringBuilder formatName);
// or
RECERR RecGetOutputFormat(int sid, out string formatName);
RecGetOutputFormat
RECERR RECAPIPLS RecGetOutputFormat(int sid, LPTSTR pFormatname, int len)
Ask the output format.
The specification of this function in Java is:
int RecGetOutputFormat(int sid, String[] pFormatname)
The specification of this function in Python is:
def RecGetOutputFormat(sid: int) -> Tuple[int, str]

◆ RecGetOutputFormatInfo()

RECERR RECAPIPLS RecGetOutputFormatInfo | ( | LPCTSTR | pFormatName,
 |  | OUTPUTCONVERTERINFO * | pInfo )

Get information about the specified output document format converter.

Parameters
[in] | pFormatName | The name of the output conversion format.
[out] | pInfo | Pointer to an OUTPUTCONVERTERINFO variable.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. However not all the output formats are supported on all these platforms. See details.
The specification of this function in C# is:
RECERR RecGetOutputFormatInfo(string formatName, out OUTPUTCONVERTERINFO pInfo);
RecGetOutputFormatInfo
RECERR RECAPIPLS RecGetOutputFormatInfo(LPCTSTR pFormatName, OUTPUTCONVERTERINFO *pInfo)
Get information about the specified output document format converter.
OUTPUTCONVERTERINFO
#define OUTPUTCONVERTERINFO
Output document converter information.
Definition RecAPIPlus.h:1088
The specification of this function in Java is:
int RecGetOutputFormatInfo(String pFormatName, OUTPUTCONVERTERINFO pInfo)
The specification of this function in Python is:
def RecGetOutputFormatInfo(pFormatName: str, pInfo: "OUTPUTCONVERTERINFO") -> int

◆ RecGetOutputLevel()

RECERR RECAPIPLS RecGetOutputLevel | ( | int | sid,
 |  | OUTPUTLEVEL * | poutLevel )

Ask the current level of format retention for the final output document.

Parameters
[in] | sid | Settings Collection ID.
[out] | poutLevel | Pointer to output level variable.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. However not all the output formats are supported on all these platforms. See details.
This function gets the value of the setting APIPlus.Output.OutputLevel. This setting can be modified by RecSetOutputLevel.
The specification of this function in C# is:
RECERR RecGetOutputLevel(int sid, out OUTPUTLEVEL outLevel);
OUTPUTLEVEL
OUTPUTLEVEL
Output level of the exported document.
Definition RecAPIPlus.h:1125
RecGetOutputLevel
RECERR RECAPIPLS RecGetOutputLevel(int sid, OUTPUTLEVEL *poutLevel)
Ask the current level of format retention for the final output document.
The specification of this function in Java is:
int RecGetOutputLevel(int sid, OUTPUTLEVEL[] poutLevel)
The specification of this function in Python is:
def RecGetOutputLevel(sid: int) -> Tuple[int, int]

◆ RecGetOutputSettingsHandle()

RECERR RECAPIPLS RecGetOutputSettingsHandle | ( | int | sid,
 |  | HSETTING * | hSetting )

Gets the settings handle for the currently set output format.

Parameters
[in] | sid | Settings Collection ID.
[out] | hSetting | Pointer to the setting handle
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. However not all the output formats are supported on all these platforms. See details.
For example for the "RTF2000" converter, this function returns the handle for the "Converters.Text.RTF2000" setting.
The specification of this function in C# is:
RECERR RecGetOutputSettingsHandle(int sid, out IntPtr hSetting);
RecGetOutputSettingsHandle
RECERR RECAPIPLS RecGetOutputSettingsHandle(int sid, HSETTING *hSetting)
Gets the settings handle for the currently set output format.

◆ RecSetOutputFormat()

RECERR RECAPIPLS RecSetOutputFormat | ( | int | sid,
 |  | LPCTSTR | pFormatname )

Set the output format.

It sets the output document format for the RecConvert2Doc, RecProcessPagesEx functions.

Parameters
[in] | sid | Settings Collection ID.
[in] | pFormatname | Converter name.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. However not all the output formats are supported on all these platforms. See details.
This function sets the value of the setting APIPlus.Output.TextFormat. This setting can be retrieved by RecGetOutputFormat.
See the list of the selectable output formats for more information. In addition see the connection between output formats and output levels, and the information about vertical text support of each converter.
The converter name must be the root of the given converter in the setting tree (e.g. Converters.Text.DocX). For more information see the list of converter settings.
The settings of a given converter are created when the converter is selected for the first time (RecSetOutputFormat). Thus before this action the mentioned settings cannot be accessed.
The specification of this function in C# is:
RECERR RecSetOutputFormat(int sid, string formatName);
RecSetOutputFormat
RECERR RECAPIPLS RecSetOutputFormat(int sid, LPCTSTR pFormatname)
Set the output format.
The specification of this function in Java is:
int RecSetOutputFormat(int sid, String pFormatname)
The specification of this function in Python is:
def RecSetOutputFormat(sid: int, pFormatname: str) -> int

◆ RecSetOutputLevel()

RECERR RECAPIPLS RecSetOutputLevel | ( | int | sid,
 |  | OUTPUTLEVEL | outLevel )

Set the level of format retention for the final output document.

This function can simplify the specifying of output formatting details for the output document.

Parameters
[in] | sid | Settings Collection ID.
[in] | outLevel | The output level.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. However not all the output formats are supported on all these platforms. See details.
This function sets the value of the setting APIPlus.Output.OutputLevel. This setting can be retrieved by RecGetOutputLevel. In addition, each converter has a setting OutputMode, of which value is used when the OutputLevel is OL_AUTO.
Output levels:
  • Plain Text (formerly No formatting mode) - All formatting information is ignored and replaced by a default value. (One column, left aligned paragraphs, no font attributes, a default font, etc.) Tables and graphics are retained and placed within the text. Highlights, strikeouts and marking for redaction are not transmitted, but redacted text is blacked-out.
  • Formatted Text (formerly Retain Font and Paragraphs mode) - The formatting information on fonts and paragraphs is retained, but the layout related information is ignored. Highlights and strikeouts and redactions are conserved. (This level has a special purpose when saving to Excel: each detected table or spreadsheet in a document is saved to a separate worksheet. Other content is placed on the last worksheet and functions as an index. The tables are replaced by hyperlinks to their own sheet.)
  • True Page - This keeps the look of the original layout of the pages. This is done by absolute positioning of the texts, pictures and tables on the page with boxes, frames or other target application specific methods. This level is only available for target applications capable of handling these. True Page level is the only choice for the XML converter and for all PDF converters except for ‘PDF Edited’. Limitation: in case of docx and rtf converters, drop caps are written out as normal text.
  • Flowing Page - Preserves the original layout of the pages, including retaining columns. Boxes and frames are only used when necessary. This level is only available with target applications that can handle columns.
  • Spreadsheet - This level exports the results in tabular form, suitable for use in spreadsheet applications. Each page is placed in a separate worksheet. This level is only available for the Excel and the HTML 3.2 formats.
In the Microsoft Word and PowerPoint programs, the size of the page is limited. The width and height of the page must be between 0.1 and 22 inches. Because of this, if you scanned or loaded a page that is larger than this limit, you cannot save it into Flowing Page or True Page formats with *.rtf and *.docx and *.pptx file extensions. These formats try to retain the original page size and layout. If you try to save this, you will get an error message and the file will not be saved.
See also the connection between output formats and output levels, and the information about vertical text support of each converter.
The specification of this function in C# is:
RECERR RecSetOutputLevel(int sid, OUTPUTLEVEL outLevel);
RecSetOutputLevel
RECERR RECAPIPLS RecSetOutputLevel(int sid, OUTPUTLEVEL outLevel)
Set the level of format retention for the final output document.
The specification of this function in Java is:
int RecSetOutputLevel(int sid, OUTPUTLEVEL outLevel)
The specification of this function in Python is:
def RecSetOutputLevel(sid: int, outLevel: int) -> int


RecAPI: _OUTPUTCONVERTERINFO Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
_OUTPUTCONVERTERINFO Struct Reference
RecAPIPlus » Layout Retention Output Module

Output document converter information (ANSI) More...

#include <RecAPIPlus.h>

Public Attributes

char | Name [64]
char | DLL [16]
char | Ext [8]

Detailed Description

Output document converter information (ANSI)

This structure describes the converter module and its target format. This is used by the RecGetOutputFormatInfo function.

Member Data Documentation

◆ DLL

char _OUTPUTCONVERTERINFO::DLL[16]

Currently not used. Name of the output converter DLL file containing the converter.

◆ Ext

char _OUTPUTCONVERTERINFO::Ext[8]

Default extension for the final output document.

◆ Name

char _OUTPUTCONVERTERINFO::Name[64]

Name of the output text format.


RecAPI: OUTPUTCONVERTERINFOW Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
OUTPUTCONVERTERINFOW Struct Reference
RecAPIPlus » Layout Retention Output Module

Output document converter information (Unicode) More...

#include <RecAPIPlus.h>

Public Attributes

WCHAR | Name [64]
WCHAR | DLL [16]
WCHAR | Ext [8]

Detailed Description

Output document converter information (Unicode)

This structure describes the converter module and its target format. This is used by the RecGetOutputFormatInfo function.

Member Data Documentation

◆ DLL

WCHAR OUTPUTCONVERTERINFOW::DLL[16]

Currently not used. Name of the output converter DLL file containing the converter.

◆ Ext

WCHAR OUTPUTCONVERTERINFOW::Ext[8]

Default extension for the final output document.

◆ Name

WCHAR OUTPUTCONVERTERINFOW::Name[64]

Name of the output text format.


RecAPI: Text Marking and Redaction Module

Classes | Macros | Typedefs | Enumerations | Functions
Text Marking and Redaction Module
RecAPIPlus

Text Marking and Redaction. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS. More...

Classes

struct _FoundText
Search result. More...

Macros

#define FT_TEXTLEN 256
Maximum possible search length.

Typedefs

typedef struct RECFT * | HFINDTEXT
Handle type for FindText functions.
typedef struct _FoundText | FoundText
Search result.

Enumerations

enum FindTextAction {
FT_HIGHLIGHT ,
FT_STRIKEOUT ,
FT_MARKFORREDACT
}
RecProcessText flags. More...

Functions

RECERR RECAPIPLS | RecFindTextFirst (HDOC hDoc, int page, int position, LPCWSTR *wordlist, int flags, int wordEnvLen, HFINDTEXT *hFt, FoundText *outFt)
Starts the text search.
RECERR RECAPIPLS | RecFindTextNext (HFINDTEXT hFt, FoundText *outFt)
Gets the next search result.
RECERR RECAPIPLS | RecProcessText (HFINDTEXT hFt, const FoundText *ft, FindTextAction flags, INTBOOL set)
Marks the selection for redaction.
RECERR RECAPIPLS | RecRedactText (HFINDTEXT hFt, const FoundText *ft)
Redacts the selection immmediately.
RECERR RECAPIPLS | RecExecuteRedaction (HDOC hDoc)
Performs redaction on all text strings previously marked for redaction.
RECERR RECAPIPLS | RecFindTextClose (HFINDTEXT hFt)
Frees the search data.

Position indices for RecFindTextFirst function

Special page and character index values. These values can be used in both the page index (page) and the character index (position) parameters of the RecFindTextFirst function.

#define | FT_FIRST 0
Specifies the first page or character.
#define | FT_LAST -1
Specifies the last page or character.

RecFindTextFirst flags

Possible values for flags in RecFindTextFirst function (should be used as a bitmask).

#define | FT_WHOLEWORD 1
Finds only whole word match (character sequences starting and ending with whitespace or punctuation.
#define | FT_MATCHCASE 2
Match case sensitive.
#define | FT_FUZZYMATCH 4
Use fuzzy match (Accept matches with one insertion, deletion or change).
#define | FT_BACKWARD 8
Find backwards from the current position.

Detailed Description

Text Marking and Redaction. RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.

These functions make it possible to search for multiple strings simultaneously in a document. They also allow highlighting, striking out and redaction to be applied to the matches. They also support a batch redaction mode, where the matches are only marked for redaction first, and then the redaction can be performed in one step on all marked strings in the whole document. For more on redaction, see Chapter 2 (New Features) in the User's Guide.

Typedef Documentation

◆ FoundText

typedef struct _FoundText FoundText

Search result.

The result of the search (RecFindTextFirst, RecFindTextNext), and also the input for text marking and redaction (RecProcessText, RecRedactText)

Enumeration Type Documentation

◆ FindTextAction

enum FindTextAction

RecProcessText flags.

These flags can be used for specifying which flags to be changed by RecProcessText.

Note
Redaction replaces the characters in a dense set of gate characters to make them blacked out, and replaces the related content with a black rectangle on all variants of the image (II_ORIGINAL, II_CURRENT, II_BW and II_THUMBNAIL). Highlight and strikeout modify the text attributes, but do not modify the image. Therefore highlight and strikeout cannot be exported with image-on-text PDF.
Enumerator
FT_HIGHLIGHT | Places a yellow background behind the characters. Cannot be exported with Plain Text formatting.
FT_STRIKEOUT | Strikes out the characters with a single line. Cannot be exported with Plain Text formatting.
FT_MARKFORREDACT | Marks the characters for later redaction. Cannot be exported with Plain Text formatting.

Function Documentation

◆ RecExecuteRedaction()

RECERR RECAPIPLS RecExecuteRedaction ( HDOC hDoc )

Performs redaction on all text strings previously marked for redaction.

This function searches the document for all texts marked for redaction (see RecProcessText) and replaces the characters with a dense set of gate characters that result in a blacked out area, rendering the text unreadable. It also paints the place of all redacted text or objects on the image with black. This is done in all variants of the image - original, primary, BW, OCR. Redacted text becomes unreadable in all output file types, regardless of the formatting level.

Redaction cannot be undone, so it should normally be performed on a copy of the document. Certain warnings, such as these, should be passed to end-users if your application includes redaction. For guidance, see Chapter 2 (New Features) in the User's Guide.

Parameters
[in] hDoc The document handle.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RecExecuteRedaction(IntPtr hDoc);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
RecExecuteRedaction
RECERR RECAPIPLS RecExecuteRedaction(HDOC hDoc)
Performs redaction on all text strings previously marked for redaction.
The specification of this function in Java is:
int RecExecuteRedaction(HDOC hDoc)
HDOC
struct RECDOCSTRUCT * HDOC
Document handle.
Definition RecAPIPlus.h:244
The specification of this function in Python is:
def RecExecuteRedaction(hDoc: "HDOC") -> int

◆ RecFindTextClose()

RECERR RECAPIPLS RecFindTextClose ( HFINDTEXT hFt )

Frees the search data.

This function frees all internal data allocated for the given search. It must be called for all RecFindTextFirst calls.

Parameters
[in] hFt Handle of the search.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RecFindTextClose(IntPtr hFt);
RecFindTextClose
RECERR RECAPIPLS RecFindTextClose(HFINDTEXT hFt)
Frees the search data.
The specification of this function in Java is:
int RecFindTextClose(HFINDTEXT hFt)
HFINDTEXT
struct RECFT * HFINDTEXT
Handle type for FindText functions.
Definition RecAPIPlus.h:1200
The specification of this function in Python is:
def RecFindTextClose(hFt: "HFINDTEXT") -> int

◆ RecFindTextFirst()

RECERR RECAPIPLS RecFindTextFirst | ( | HDOC | hDoc,
 |  | int | page,
 |  | int | position,
 |  | LPCWSTR * | wordlist,
 |  | int | flags,
 |  | int | wordEnvLen,
 |  | HFINDTEXT * | hFt,
 |  | FoundText * | outFt )

Starts the text search.

This function starts a new search, it returns the allocated search handle and the first results if any.

Parameters
[in] | hDoc | The document handle, created by RecOpenDoc.
[in] | page | The page number where the finding starts from (zero-based index). (also see the position types).
[in] | position | The letter index where the search should start inside the page (also see the position types).
[in] | wordlist | NULL terminated LPCWSTR array for the words to search for.
[in] | flags | Bitfield for search options, see the list of possible values.
[in] | wordEnvLen | Word environment length: in addition to the found word, this many letters before and after the result will be returned in ft.
[out] | hFt | Handle of the search, could be used in subsequent RecFindTextNext calls.
[out] | outFt | Information about the found word.
Return values
RECERR Returns REC_OK on successful search. If no match was found it returns APIP_NOMORE_WARN. Otherwise it returns an error code.
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The returned hFt must be closed with RecFindTextClose. This can be called even if there were no matches or in case of error.
The specification of this function in C# is:
RECERR RecFindTextFirst(IntPtr hDoc, int page, int position, string[] wordlist, FindTextFlags flags, int wordEnvLen, out IntPtr hFt, out FoundText ft);
RecFindTextFirst
RECERR RECAPIPLS RecFindTextFirst(HDOC hDoc, int page, int position, LPCWSTR *wordlist, int flags, int wordEnvLen, HFINDTEXT *hFt, FoundText *outFt)
Starts the text search.
_FoundText
Search result.
Definition RecAPIPlus.h:1231
.
The specification of this function in Java is:
int RecFindTextFirst(HDOC hDoc, int page, int position, String[] wordlist, int flags, int wordEnvLen, HFINDTEXT hFt, FoundText ft)
The specification of this function in Python is:
def RecFindTextFirst(hDoc: "HDOC", page: int, position: int, u8wordlist: List[str], flags: int, wordEnvLen: int) -> Tuple[int, "HFINDTEXT", "FoundText"]

◆ RecFindTextNext()

RECERR RECAPIPLS RecFindTextNext | ( | HFINDTEXT | hFt,
 |  | FoundText * | outFt )

Gets the next search result.

This function continues the search using the given HFINDTEXT.

Parameters
[in] | hFt | Handle of the search.
[out] | outFt | Information about the found word.
Return values
RECERR Returns REC_OK on successful search. If no match was found it returns APIP_NOMORE_WARN. Otherwise it returns an error code.
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RecFindTextNext(IntPtr hFt, out FoundText ft);
RecFindTextNext
RECERR RECAPIPLS RecFindTextNext(HFINDTEXT hFt, FoundText *outFt)
Gets the next search result.
The specification of this function in Java is:
int RecFindTextNext(HFINDTEXT hFt, FoundText ft)
The specification of this function in Python is:
def RecFindTextNext(hFt: "HFINDTEXT") -> Tuple[int, "FoundText"]

◆ RecProcessText()

RECERR RECAPIPLS RecProcessText | ( | HFINDTEXT | hFt,
 |  | const FoundText * | ft,
 |  | FindTextAction | flags,
 |  | INTBOOL | set )

Marks the selection for redaction.

This function highlights, strikes out or marks for redacting (see RecExecuteRedaction) the match described by ft

Parameters
[in] | hFt | Handle of the search.
[in] | ft | Text information about the current search result coming from a call of RecFindTextFirst or RecFindTextNext.
[in] | flags | Which flag to change.
[in] | set | To set or to unset the flag.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RecProcessText(IntPtr hFt, [In] FoundText ft, FindTextAction flags, bool set);
RecProcessText
RECERR RECAPIPLS RecProcessText(HFINDTEXT hFt, const FoundText *ft, FindTextAction flags, INTBOOL set)
Marks the selection for redaction.
FindTextAction
FindTextAction
RecProcessText flags.
Definition RecAPIPlus.h:1296
The specification of this function in Java is:
int RecProcessText(HFINDTEXT hFt, FoundText ft, FindTextAction flags, int set)
The specification of this function in Python is:
def RecProcessText(hFt: "HFINDTEXT", ft: "FoundText", flags: "FindTextAction", set: bool) -> int

◆ RecRedactText()

RECERR RECAPIPLS RecRedactText | ( | HFINDTEXT | hFt,
 |  | const FoundText * | ft )

Redacts the selection immmediately.

This function replaces the matched characters in ft with a dense set of gate characters to make them blacked out, and replaces the related content with a black rectangle on all variants of the image. For details see RecExecuteRedaction.

Parameters
[in] | hFt | Handle of the search.
[in] | ft | information about the current search result coming from a call of RecFindTextFirst or RecFindTextNext.
Return values
RECERR
Note
RecAPIPlus level of CSDK is supported on: Windows, Linux, Embedded Linux, MacOS.
The specification of this function in C# is:
RECERR RecRedactText(IntPtr hFt, [In, Out] FoundText ft);
RecRedactText
RECERR RECAPIPLS RecRedactText(HFINDTEXT hFt, const FoundText *ft)
Redacts the selection immmediately.
The specification of this function in Java is:
int RecRedactText(HFINDTEXT hFt, FoundText ft)
The specification of this function in Python is:
def RecRedactText(hFt: "HFINDTEXT", ft: "FoundText") -> int


RecAPI: _FoundText Struct Reference

  • Class List
  • Class Hierarchy
  • Class Members
Public Attributes | List of all members
_FoundText Struct Reference
RecAPIPlus » Text Marking and Redaction Module

Search result. More...

#include <RecAPIPlus.h>

Public Attributes

HDOC hDoc
int | page
int | position
int | nLetters
WCHAR | letters [FT_TEXTLEN]
RECT | boundBoxes [FT_TEXTLEN]
int | foundStart
int | foundLen
INTBOOL | isFuzzy

Detailed Description

Search result.

The result of the search (RecFindTextFirst, RecFindTextNext), and also the input for text marking and redaction (RecProcessText, RecRedactText)

Member Data Documentation

◆ boundBoxes

RECT _FoundText::boundBoxes[FT_TEXTLEN]

Bounding boxes of the letters.

◆ foundLen

int _FoundText::foundLen

Number of letters of the found word.

◆ foundStart

int _FoundText::foundStart

Index of the first letter of the currently found word within FoundText::letters.

◆ hDoc

HDOC _FoundText::hDoc

Current document handle.

◆ isFuzzy

INTBOOL _FoundText::isFuzzy

TRUE if found by fuzzy method.

◆ letters

WCHAR _FoundText::letters[FT_TEXTLEN]

The found word and its environment, always null terminated.

◆ nLetters

int _FoundText::nLetters

Number of valid letters in text and bboxletter arrays.

◆ page

int _FoundText::page

Current page (zero-based index).

◆ position

int _FoundText::position

Letter index of the first letter in FoundText::letters within the logical letter order of the page).


RecAPI: Form Data Extraction Module

Functions
Form Data Extraction Module
RecAPIPlus

Data collection from filled forms with CSV output. Form processing is supported on: Windows, Linux, MacOS. More...

Functions

RECERR RECAPIPLS | RecProcessFormPagesPDF (int sid, LPCTSTR sampleFormFile, LPCTSTR pageRange, LPCTSTR *inputFormFiles, LPCTSTR outoutDTXTFile)
It collects data from input form files.
RECERR RECAPIPLS | RecProcessFormPagesTemplate (int sid, LPCTSTR *inputFormTemplFiles, LPCTSTR *inputFormFiles, LPCTSTR outoutDTXTFile)
It collects data from input form files.

Detailed Description

Data collection from filled forms with CSV output. Form processing is supported on: Windows, Linux, MacOS.

The Toolkit already provides form handling capabilities, using Logical Form Recognition® Technologies. This allows form templates to be created and/or designed, so that sets of forms can be processed.

A new type of form handling is introduced since CSDK 16, called Form Data Extraction (FDE). It can be considered as a simplified more direct workflow for extracting and collating form data. The following table compares the two offerings:

Item | LFR | FDE
Template source | Any supported image file type or by scanning a paper form. PDF files as input are treated as image-only. Only one page can be processed at a time. The form must be unfilled. | Must be an active PDF form - single or multi-page, filled or unfilled.
Template page range | If used, must specify a single page. | Can specify any number of the existing pages; but must harmonize with the forms to be processed (see below).
Template design | Form objects can be auto-detected and/or manually added, deleted or modified. | No changes permitted, the specified template file must be suitable for the task.
Form field types | Check boxes, circle texts, comb fields, tables/cells, graphics, lines and text boxes. | Check boxes, text boxes, option (radio) buttons.
Form field names | Can be set with kRecSetFormFieldName | Must be pre-defined as meta-data in the PDF template form.
Anchors | Four pre-defined form controls set in template as anchors, must appear on all filled forms. | Automatic. Four text strings identified from fixed text on template, searched on all forms being processed.
Forms being processed
  • PDF/XPS forms – any type
  • Image files
  • Scanned paper forms
  • PDF/XPS forms – any type
  • Image files
  • Scanned paper forms
Multi-page forms | Can be handled, but a separate template is needed for each page; the application and end user must ensure template/form matching. | Can be handled – the page range for the template must be in harmony with the number of pages in forms being processed (see below).
OCR usage during processing | Used only for data extraction, and only as necessary. | Used twice, to find anchor points and for data extraction - only when a usable text layer is not detected.
Resizing tolerance | 10% (was 1.5% previously) | 10% or more.
Recognition restrictions | Regular expressions or conditions like ‘Numbers only’ can be set for each form control. | No restriction of field data.
Output
  • Letter structure (full info)
  • CSV (with or without append)
  • Any other supported output.
CSV Text only: by default data from all forms enters one file - each form becomes a row, each field a column.
Upside-down pages | Auto-orientation should be able to resolve such cases. | Auto-orientation is on by default and should correct such errors.
Error handling There are three levels:
  • Warn and deliver result
  • Skip form and continue
  • Close processing.
The developer can decide how to handle each case. 		The same three levels exist, but in general the program decides which to apply, within the general workflow error handling system. Since FDE processing is more limited than LFR, there is a lower likelihood of serious errors arising.

Neither FDE nor LFR are designed to handle Asian (including CCJK, Arabic, Thai and Hebrew) language forms.

To summarize, Form Data Extraction allows data to be extracted from sets of forms, and collated into a comma separated text file (CSV) that can be opened in database programs where each form is represented by a worksheet row and each detected form control becomes a worksheet column.

A form template must be specified for each form type to be handled – in addition to a file name, a page range can be specified. This template file must be an active PDF form – it can be single- or multi-page, filled or unfilled. It must contain active tagged form controls – these can be text boxes, check boxes and option (radio) buttons. The form field names (labels) must be defined in the PDF template form; they will appear as the column headers in the target application. The PDF output converters can save such active PDF forms. This feature can be controlled through the settings PDFForms and PDFFormVisuality. The PowerPDF can also generate such active PDF forms.

The forms to be processed must have a layout and content corresponding to the defined form template (page size, number of pages per form, location of controls, etc.) The forms can be:

  • PDF Image files, PDF Searchable files or PDF Normal (static forms)
  • PDF Active forms
  • XPS files of any flavor (image, searchable, normal)
  • Image files of any type accepted by the CSDK.
  • Forms scanned from paper

A page range can be useful to exclude pages with form filling instructions or other unneeded content. It can be specified for the FDE template file and it must harmonize with the forms that are later processed, as shown in the following example for the page range 3-5:

 | p1 and 2 | p3 to 5 | p6 and on
Active PDF form template file | excluded | in range | excluded
PDF/XPS files with text layers * | must exist | must exist | need not exist
Scanned forms and image files ** | no | yes | no

(*) That means Normal or Searchable PDF or XPS files and includes Active PDF forms

(**) In other words if the template defines a three-page form, each scanned filled form must contain three pages, each in the correct order. The same applies to image files, but the pages can be in three single-page files, one three-page file or any other combination (1+2 or 2+1). A set of forms can be presented in a single multi-page file, so long as each form contains three pages in the correct order. If a mismatch is detected, the program attempts to match the template to neighboring pages and may be able to continue processing.

Multiple page ranges are also acceptable, e.g. 3-5, 8, 11-14. In that case all PDF/XPS forms with a text layer must have all the pages corresponding to the template, up to and including the last validated template page.

For FDE the first task is to prepare a suitable template to be selected in step two of the following procedure. FDE processing is performed through workflows; only three steps are allowed:

  1. Image Input Step
    Here the file set to be processed is defined using the usual Workflow input step to scan pages or load image files. File names can be given in advance or run-time prompting can be specified; folder input is available – then it is user’s responsibility to see that all files reaching the chosen folder are suitable for the current FDE process and its assigned template.
  2. Extract Form Data Step
    Here the PDF template file is selected, with full name and path, and, if desired, a page range. Recognition language(s) are chosen and, optionally, vertical dictionary support.
  3. Save Results Step
    The file type is fixed as CSV Text; the saving location must be given unless runtime prompting is specified. The default file saving option is to have all pages entered into a single CSV file, but other options are available. Timestamp folders can be specified to separate results from multiple processing sessions.

Function Documentation

◆ RecProcessFormPagesPDF()

RECERR RECAPIPLS RecProcessFormPagesPDF | ( | int | sid,
 |  | LPCTSTR | sampleFormFile,
 |  | LPCTSTR | pageRange,
 |  | LPCTSTR * | inputFormFiles,
 |  | LPCTSTR | outoutDTXTFile )

It collects data from input form files.

This function collects data from a set of filled forms for further processing in databases or spreadsheets. The layout and location of form elements is defined by a sample form file, which is used for generating form templates. The forms to be processed must be filled by computer or similar machine and not handwritten. The output is a CSV file.

The sample file must be an active, non-image-only PDF form containing suitable Acro-Form controls for form objects. It can be either filled or unfilled. It can be a multi-page form and a page range can be specified to eliminate non-form pages such as filling instructions, etc.

Parameters
[in] | sid | Setting Collection.
[in] | sampleFormFile | Name of the sample form file.
[in] | pageRange | Page range specifying which pages should be processed. This is a string that contains a decimal number (e.g. "4"), or two numbers separated by a '-' sign (e.g. "3-5"), or their arbitrary comma-separated combinations (e.g. "3-5,8,11-14"). It may be NULL, which means all the pages are selected.
[in] | inputFormFiles | Pointers of the names of the form files to be processed. The latest pointer has to be NULL.
[in] | outoutDTXTFile | Name of the output CSV file.
Return values
ZONE_SIZE_WARN | At least one zone was truncated, because it extends beyond the image.
ZONE_SIZE_ERR | At least one zone was not loaded, because it extends beyond the image.
IMG_ANCHOR_WARN | Some of the anchors were not found.
IMG_ANCHOR_NOT_FOUND | No anchor was found or the sample form does not contain anchor zones.
REC_OK | Successful.
Note
Form processing is supported on: Windows, Linux, MacOS.
Processing filled PDF files including all PDF flavors except image-only ones. The PDF files can be either static or active. In this case, each form must be located in a separate PDF file. If a page range is chosen for the sample, both the sample and the form files have to contain all the pages up to the last page selected by the page range. Otherwise, the form files have to contain at least as many pages as the sample file contains. If the sample file contains non-form pages, the input files have to contain their pairs as well.
Processing filled forms saved as image files including all image file formats supported by CSDK, and image-only PDF. In this case, the function considers not the input files, but the input pages. It creates a queue containing all the pages coming from the input files (either single or multi-page) in the order of appearing. After that, it picks up the sample pages one-by-one and picks up the next input page from the queue pairing it with the current sample page. After accessing the last sample page it repeats from the first one pairing with the next input page. It follows that the sum of the number of all the input pages has to be a multiple of the number of pages of the sample file. Using a page range, the input pages are paired with only the sample pages selected by the page range (i.e. the input pages must not contain the non-form pages), thus the sum of the number of input pages has to be a multiple of the number of sample pages selected by the page range.
Each form element becomes a table column in the output file and the data from each form is presented in a single row. The form elements are typically fillable fields, check boxes and option buttons. If the output file already exists, the collected data rows will be appended to the end of the file.
The function automatically rotates the input images if the current IMG_ROTATE setting is ROT_AUTO (except if the image is non-image-only PDF), otherwise the images are not rotated. However, auto-rotation is not called on the sample form file, thus its orientation must not require any rotation.
See details about size limits of input images.
The specification of this function in C# is:
RECERR RecProcessFormPagesPDF(int sid, string sampleFormFile, string pageRange, string[] inputFormFiles, string outputDTXTFile);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
RecProcessFormPagesPDF
RECERR RECAPIPLS RecProcessFormPagesPDF(int sid, LPCTSTR sampleFormFile, LPCTSTR pageRange, LPCTSTR *inputFormFiles, LPCTSTR outoutDTXTFile)
It collects data from input form files.
The specification of this function in Java is:
int RecProcessFormPagesPDF(int sid, String sampleFormFile, String pageRange, String[] inputFormFiles, String outoutDTXTFile)
The specification of this function in Python is:
def RecProcessFormPagesPDF(sid: int, sampleFormFile: str, pageRange: str, inputFormFiles: List[str], outoutDTXTFile: str) -> int

◆ RecProcessFormPagesTemplate()

RECERR RECAPIPLS RecProcessFormPagesTemplate | ( | int | sid,
 |  | LPCTSTR * | inputFormTemplFiles,
 |  | LPCTSTR * | inputFormFiles,
 |  | LPCTSTR | outoutDTXTFile )

It collects data from input form files.

This function collects data from a set of filled forms for further processing in databases or spreadsheets. The layout and location of form elements is defined by form template files. The forms to be processed must be filled by computer or similar machine and not handwritten. The output is a CSV.

Parameters
[in] | sid | Setting Collection.
[in] | inputFormTemplFiles | Pointers of the names of the form template files. The latest pointer has to be NULL.
[in] | inputFormFiles | Pointers of the names of the form files to be processed. The latest pointer has to be NULL.
[in] | outoutDTXTFile | Name of the output CSV file.
Return values
ZONE_SIZE_WARN | At least one zone was truncated, because it extends beyond the image.
ZONE_SIZE_ERR | At least one zone was not loaded, because it extends beyond the image.
IMG_ANCHOR_WARN | Some of the anchors were not found.
IMG_ANCHOR_NOT_FOUND | No anchor was found or the template does not contain anchor zones.
REC_OK | Successful.
Note
Form processing is supported on: Windows, Linux, MacOS.
The form template files must be created by CSDK using the kRecSaveFormTemplate function. See how to create a form template file.
The function considers not the input files, but the input pages. It creates a queue containing all the pages coming from the input files (either single or multi-page, either PDF or image files) in the order of appearing. After that, it picks up the form templates one-by-one and picks up the next input page from the queue pairing it with the current template. After accessing the last template it repeats from the first one pairing with the next input page. It follows that the sum of the number of all the input pages has to be a multiple of the number of template files. If the input pages contain non-form pages they must have empty form templates pairs in the form template list.
Each form element becomes a table column in the output file and the data from each form is presented in a single row. The form elements are typically fillable fields, check boxes and option buttons. If the output file already exists, the collected data rows will be appended to the end of the file.
The function automatically rotates the input images if the current IMG_ROTATE setting is ROT_AUTO (except if the image is non-image-only PDF), otherwise the images are not rotated.
See details about size limits of input images.
The specification of this function in C# is:
RECERR RecProcessFormPagesTemplate(int sid, string[] inputFormTemplFiles, string[] inputFormFiles, string outputDTXTFile);
RecProcessFormPagesTemplate
RECERR RECAPIPLS RecProcessFormPagesTemplate(int sid, LPCTSTR *inputFormTemplFiles, LPCTSTR *inputFormFiles, LPCTSTR outoutDTXTFile)
It collects data from input form files.
The specification of this function in Java is:
int RecProcessFormPagesTemplate(int sid, String[] inputFormTemplFiles, String[] inputFormFiles, String outoutDTXTFile)
The specification of this function in Python is:
def RecProcessFormPagesTemplate(sid: int, inputFormTemplFiles: List[str], inputFormFiles: List[str], outoutDTXTFile: str) -> int


RecAPI: Scanner Enhancement Technology Tools (SET Tools)

Functions
Scanner Enhancement Technology Tools (SET Tools)
RecAPIPlus

Scanner Enhancement Technology Tools (SET Tools). This module is supported on: Windows. More...

Functions

RECERR RECAPIPLS | RecSETDialog (HWND hWnd, int sid, HDOC hDoc, int *pnIndices, int nCount, LPCTSTR settemplate, LPTSTR outtemplate, int nBuffLength)
It displays the SET Tools Dialog.
RECERR RECAPIPLS | RecExecuteSET (int sid, HDOC hDoc, int *pnIndices, int nCount, LPCTSTR settemplate)
It excutes SET steps without any UI.

Detailed Description

Scanner Enhancement Technology Tools (SET Tools). This module is supported on: Windows.

These functions make possible to use image preprocessing algorithms of Scanner Enhancement Technology tools. SET has a bunch of image preprocessing algorithms to improve the image for OCR.

Function Documentation

◆ RecExecuteSET()

RECERR RECAPIPLS RecExecuteSET | ( | int | sid,
 |  | HDOC | hDoc,
 |  | int * | pnIndices,
 |  | int | nCount,
 |  | LPCTSTR | settemplate )

It excutes SET steps without any UI.

This function executes the image enhancing steps being in the SET template file on the pages of the given document.

Parameters
[in] | sid | Settings Collection ID.
[in] | hDoc | Handle of the document. The SET steps will be appled on this document pages.
[in] | pnIndices | Pointer to an integer array or NULL. If it is specified, it contains the indices of the pages that SET steps will be applied on.
[in] | nCount | Lenght of the array.
[in] | settemplate | Points to a SET template filename.
Return values
RECERR
Note
This function is supported on: Windows.
See Sample #65 for more details.
The specification of this function in Python is:
def RecExecuteSET(sid: int, hDoc: "HDOC", pnIndices: "IntArray", settemplate: str) -> int
RecExecuteSET
RECERR RECAPIPLS RecExecuteSET(int sid, HDOC hDoc, int *pnIndices, int nCount, LPCTSTR settemplate)
It excutes SET steps without any UI.

◆ RecSETDialog()

RECERR RECAPIPLS RecSETDialog | ( | HWND | hWnd,
 |  | int | sid,
 |  | HDOC | hDoc,
 |  | int * | pnIndices,
 |  | int | nCount,
 |  | LPCTSTR | settemplate,
 |  | LPTSTR | outtemplate,
 |  | int | nBuffLength )

It displays the SET Tools Dialog.

This function utilises the Scanner Enhancement Technology Tools. When the application calls this function, SET dialog shows up. The user can put together one or more image enhancing steps and save them into a file which will be used in RecExecuteSET function.

Parameters
[in] | hWnd | Parent window
[in] | sid | Settings Collection ID.
[in] | hDoc | Handle of the document. The SET steps will be appled on the pages of this document.
[in] | pnIndices | Pointer to an integer array or NULL. If it is specified, it contains the indices of the pages that SET steps will be applied on.
[in] | nCount | Lenght of the array.
[in] | settemplate | Initial SET template or NULL. If it is a full path of a SET template file, RecSETDialog executes this template on the selected pages in the given document, before shows the images in the dialog.
[out] | outtemplate | Output buffer for a filename path. If the user creates new image enchancing steps, these can be saved into an other SET template file within the dialog. This out parameter will contain the lastly saved template filename.
[in] | nBuffLength | Length of the buffer
Return values
RECERR
Note
This function is supported on: Windows.
The following image enhancing algorithms can be used:
  • Brightness / Contrast
  • Hue/Saturation / Lightness
  • Crop
  • Rotate / Flip
  • Despeckle
  • OCR Brightness
  • Crop-out Color
  • Resolution
  • Deskew / 3D deskew
  • Fill
  • Auto Crop
  • Clean Borders
  • Punch Hole Removal
  • Enhance Whiteboard Photo
See Sample #65 for more details.
The specification of this function in Python is:
def RecSETDialog(hWnd: "HWND", sid: int, hDoc: "HDOC", pnIndices: "IntArray", settemplate: str) -> Tuple[int, str]
RecSETDialog
RECERR RECAPIPLS RecSETDialog(HWND hWnd, int sid, HDOC hDoc, int *pnIndices, int nCount, LPCTSTR settemplate, LPTSTR outtemplate, int nBuffLength)
It displays the SET Tools Dialog.


RecAPI: RecAPIPlusS

Functions
RecAPIPlusS
RecAPIPlus

Dynamic linking of RecAPIPlus. This module is supported on: Windows. More...

Functions

RECERR RECAPIPLS | RecInitPlusS (LPCTSTR pRecPath, LPCTSTR pCompanyName, LPCTSTR pProductName)
Initialize the RecAPIPlusS.
RECERR RECAPIPLS | RecQuitPlusS (void)
Uninitialize the RecAPIPlusS.

Detailed Description

Dynamic linking of RecAPIPlus. This module is supported on: Windows.

There may be a general problem with DLL's that they must be located on one of some predetermined pathes. It may constrain the distribution of the integrating application. The RecAPIPlusS module solves this problem.

RecAPIPlusS is a wrapper on the module RecAPIPlus, which makes possible to separate the integrating application from the files of the OmniPage CSDK 2025.1 without putting the folder of the CSDK into the environment variable PATH. In fact, this may be one of some little static libraries. Depending on how the release version of the integrating application uses the C run-time libraries, one of the following RecAPIPlusS static libraries should be linked to the application:

  • RecAPIPlusS_MS.LIB - multi-threaded C run-time library - statically linked,
  • RecAPIPlusS_MDyn.LIB - multi-threaded C run-time library - dynamically linked.

The debug version of the integrating application requires a static library to be linked as follows:

  • RecAPIPlusS_MSd.LIB - multi-threaded C run-time library - statically linked,
  • RecAPIPlusS_MDynd.LIB - multi-threaded C run-time library - dynamically linked.

It is a thin interface layer for binding the Engine at run-time. It loads the RecAPIPlus from a specified path and gets all the entry points of both KernelAPI.DLL and RecAPIPlus.DLL (RecInitPlusS). Unloading also can be controlled by the integrating application (RecQuitPlusS).

Function Documentation

◆ RecInitPlusS()

RECERR RECAPIPLS RecInitPlusS | ( | LPCTSTR | pRecPath,
 |  | LPCTSTR | pCompanyName,
 |  | LPCTSTR | pProductName )

Initialize the RecAPIPlusS.

When the program uses RecAPIPlus, it has to call RecInitPlus instead of kRecInit. With only a few exceptions (kRecSetLicense, kRecGetVersion) the functions of KernelApi should not be called before initialization. This function initializes every module which is initialized in the kRecInit and additionally intializes the document manager subsystem. Use this function to implicitly bind the Engine to the application. When this function is used for the Engine initialization, the RECAPIPLUS.LIB import library must be linked to the application. If you are going to use functions from both KernelApi and RecAPIPlus, you have to also import KERNELAPI.LIB and RECAPIPLUS.LIB.

Parameters
[in] | pRecPath | Full path to the Engine Binary directory, i.e. where the Engine files are located. NULL kRecInitS searches Engine files beside the application process EXE. Relative path from the application process EXE where the Engine files are located.
[in] | pCompanyName | Name of the User's Company. It can be NULL. Default value: OmniPage. It can be used for creating a company-specific working folder for temporary and other files generated by KernelApi.
[in] | pProductName | Name of the Product or Application. It can be NULL. Default value: CSDK22. It can be used for creating an application-specific working folder for temporary and other files generated by KernelApi.
Return values
RECERR
Note
This function DOES NOT initialize the scanning subsystem, its initialization requires a separate kRecScanInit function call.
This function also initializes the KernelAPI.

◆ RecQuitPlusS()

RECERR RECAPIPLS RecQuitPlusS ( void )

Uninitialize the RecAPIPlusS.

The RecQuitPlusS function stops the CSDK. It frees all the resources allocated by the Engine. Must be used in pair with the RecInitPlusS.

Return values
RECERR
Note
If the scanning subsystem was also initialized, it requires a separate kRecScanQuit call.


RecAPI: RecPDFAPI

Topics
RecPDFAPI

This is the API extension for managing page-level manipulations of PDF files. RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS. More...

Topics

RecPDF Module
This is the "C" level API of RecPDFAPI. RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
RecPDFS
Dynamic linking of RecPDF. This module is supported on: Windows.
RecPDF.Net
RecPDF.NET is the object oriented .NET API of RecPDFAPI. Supported on: Windows.

Detailed Description

This is the API extension for managing page-level manipulations of PDF files. RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.

This part of OP CSDK is an extension to the KernelAPI and RecAPIPlus. It manages PDF files on the page level. It can copy, move, or delete pages of PDF files. It is also able to extract information from them, or change their pages.

RecPDF is a mostly operation based API. The page-level modifications are passed to the operation, and at the end the operation executes all of the changes at the same time. Operations can be cancelled as well if it turns out that no modification is needed.

A document-level modification is also accessible on this API (rPdfCompact). It does not use operations, but works directly on PDF files.

See also
RecPDFAPI related pages


RecAPI: RecPDF Module

Typedefs | Enumerations | Functions
RecPDF Module
RecPDFAPI

This is the "C" level API of RecPDFAPI. RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS. More...

Typedefs

typedef struct tagRPDF_DOC * | RPDF_DOC
Handle of a PDF document.
typedef struct tagRPDF_OPERATION * | RPDF_OPERATION
Handle of a PDF operation.
typedef struct tagRPDF_FILEENUMERATOR * | RPDF_FILEENUMERATOR
Handle of an enumerator for the PDF documents taking part in a PDF operation.

Enumerations

enum RPDF_ENCRYPTION {
ENC_NO ,
ENC_RC4 ,
ENC_AES
}
Encryption type of a PDF file. More...
enum RPDF_RESTRICTIONS {
PSR_NO_PRINT = 0x00000100 ,
PSR_NO_HIPRINT = 0x00000200 ,
PSR_NO_COPY = 0x00000400 ,
PSR_NO_EXTRACT_TEXT = 0x00000800 ,
PSR_NO_EXTRACT_PAGES = 0x00001000 ,
PSR_NO_CHANGE = 0x00002000 ,
PSR_NO_ASSEMBLE = 0x00004000 ,
PSR_NO_ACROFORM = 0x00008000 ,
PSR_NO_ANNOT = 0x00010000 ,
PSR_ALLOW_EVERYTHING = 0
}
PDF security restriction flags. More...
enum RPDF_ROTATION {
PDFROT_NO = 0 ,
PDFROT_LEFT ,
PDFROT_RIGHT ,
PDFROT_HALFTURN
}
Page rotation. More...
enum | PDF_Version
PDF version.
enum | PDFA_Version
PDFA version.

Functions

RECERR PDFASMAPI | rPdfInit (void)
Initialize the RecPDF.
RECERR PDFASMAPI | rPdfQuit (void)
Uninitialize the RecPDF.
RECERR PDFASMAPI | rPdfOpen (LPCTSTR pFileName, LPCTSTR password, RPDF_DOC *handle)
Open a PDF file.
RECERR PDFASMAPI | rPdfCompact (LPCTSTR pInFileName, LPCTSTR pOutFileName)
Compact a PDF document.
RECERR PDFASMAPI | rPdfClose (RPDF_DOC handle)
Close a PDF document.
RECERR PDFASMAPI | rPdfGetOp (RPDF_DOC handle, RPDF_OPERATION *ophandle)
Get the PDF operation assigned to a PDF document.
RECERR PDFASMAPI | rPdfGetPath (RPDF_DOC handle, LPTSTR buffer, size_t buflen)
Get the path of the PDF document.
RECERR PDFASMAPI | rPdfFileHasText (RPDF_DOC handle, size_t position, bool *bHasText)
Check if a page of the PDF document does have or doesn't have searchable text.
RECERR PDFASMAPI | rPdfGetPageCount (RPDF_DOC handle, size_t *pnPages)
Get the page count of a PDF document.
RECERR PDFASMAPI | rPdfOpStart (RPDF_OPERATION *Ophandle)
Start a new PDF operation.
RECERR PDFASMAPI | rPdfOpStartEx (int sid, RPDF_OPERATION *Ophandle)
Start a new PDF operation using a given Settings collection ID (sid).
RECERR PDFASMAPI | rPdfOpAddFile (RPDF_OPERATION ophandle, RPDF_DOC handle)
Add a PDF document to the PDF operation.
RECERR PDFASMAPI | rPdfOpGetFirstFile (RPDF_OPERATION ophandle, RPDF_DOC *handle, size_t *numfiles, RPDF_FILEENUMERATOR *enumerator)
Get the first assigned PDF document of a PDF operation.
RECERR PDFASMAPI | rPdfOpGetNextFile (RPDF_FILEENUMERATOR enumerator, RPDF_DOC *handle)
Get the next assigned PDF document of a PDF operation.
RECERR PDFASMAPI | rPdfOpCloseFileEnumeration (RPDF_FILEENUMERATOR enumerator)
Close the enumeration of the assigned PDF documents in the PDF operation.
RECERR PDFASMAPI | rPdfOpRotatePage (RPDF_OPERATION ophandle, RPDF_DOC handle, size_t position, RPDF_ROTATION rotation)
Rotate a page in a PDF document as a part of a PDF operation.
RECERR PDFASMAPI | rPdfOpDeletePages (RPDF_OPERATION ophandle, RPDF_DOC handle, const size_t *PageIndexArr, size_t numpages)
Delete one or more pages in a PDF document as a part of a PDF operation.
RECERR PDFASMAPI | rPdfOpCopyPages (RPDF_OPERATION ophandle, RPDF_DOC desthandle, size_t destposition, RPDF_DOC srchandle, const size_t *PageIndexArr, size_t numpages)
Copy pages as a part of a PDF operation.
RECERR PDFASMAPI | rPdfOpMovePages (RPDF_OPERATION ophandle, RPDF_DOC handle, size_t destposition, const size_t *PageIndexArr, size_t numpages)
Move pages as a part of a PDF operation.
RECERR PDFASMAPI | rPdfOpCancel (RPDF_OPERATION ophandle)
Cancel a PDF operation.
RECERR PDFASMAPI | rPdfOpExecute (RPDF_OPERATION ophandle)
Execute a PDF operation.
RECERR PDFASMAPI | rPdfOpInsertHPAGEs (RPDF_OPERATION ophandle, RPDF_DOC desthandle, size_t destposition, const HPAGE *srcpages, size_t srcpagecount, bool bImageOnly)
Insert pages to the PDF given by HPAGE handles.
RECERR PDFASMAPI | rPdfOpMergeTextToPages (RPDF_OPERATION ophandle, RPDF_DOC desthandle, size_t destposition, const HPAGE *srcpages, size_t srcpagecount)
Insert the text content of the given HPAGE handles to the specified PDF pages.
RECERR PDFASMAPI | rPdfGetPDFSecurityInfo (LPCTSTR pFileName, RPDF_ENCRYPTION *encMethod, size_t *keySize, RPDF_RESTRICTIONS *secuRestrictions, bool *hasMasterPassword, bool *hasUserPassword)
Get PDF encryption information without opening it.
RECERR PDFASMAPI | rPdfOptOpen (LPCTSTR pFileName, LPCTSTR password, RPDF_DOC *handle)
Open a PDF file for optimization.
RECERR PDFASMAPI | rPdfOptAddCommandStr (RPDF_DOC handle, LPCTSTR command)
Add an optimization command string to a handle.
RECERR PDFASMAPI | rPdfOptimize (RPDF_DOC handle, LPCTSTR pOptFileName)
Do the optimization process.

Detailed Description

This is the "C" level API of RecPDFAPI. RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.

This is the "C" level Page Oriented PDF File Manipulation API of OmniPage CSDK.

This part of RecAPI is an extension can be used both with KernelAPI and with RecAPIPlus. One of them should be initialized before initialization of RecPDF.

List of header files of this module:

  • recpdf.h - If RecPDF is used with KernelAPI, this file is enough to be included, because it includes KernelAPI.h. Using it with RecAPIPlus, RecApiPlus.h must be included as well.

The library file that should be linked is recpdf.lib, but there is an alternative solution: the dynamic linking using RecPDFS.

Enumeration Type Documentation

◆ RPDF_ENCRYPTION

enum RPDF_ENCRYPTION

Encryption type of a PDF file.

Enumerator
ENC_NO | Not encrypted.
ENC_RC4 | RC4 algorithm.
ENC_AES | AES algorithm.

◆ RPDF_RESTRICTIONS

enum RPDF_RESTRICTIONS

PDF security restriction flags.

Enumerator
PSR_NO_PRINT | Printing isn't allowed.
PSR_NO_HIPRINT | Print the document only low resolution mode.
PSR_NO_COPY | Can not copy the content to other document.
PSR_NO_EXTRACT_TEXT | Extracting the content is prohibited. (For accessibility usings for disabled users.)
PSR_NO_EXTRACT_PAGES | Extracting the pages is prohibited.
PSR_NO_CHANGE | Modifying the content is prohibited.
PSR_NO_ASSEMBLE | Document assemble is prohibited (can not insert, rotate, delete pages, and create bookmarks or thumbnails).
PSR_NO_ACROFORM | Filling in form fields are prohibited.
PSR_NO_ANNOT | Adding or modifying annotations are prohibited.

◆ RPDF_ROTATION

enum RPDF_ROTATION

Page rotation.

Enumerator
PDFROT_NO | No rotation.
PDFROT_LEFT | Rotate counter clockwise.
PDFROT_RIGHT | Rotate clockwise.
PDFROT_HALFTURN | Rotate 180 degrees.

Function Documentation

◆ rPdfClose()

RECERR PDFASMAPI rPdfClose ( RPDF_DOC handle )

Close a PDF document.

Destroys the PDF document object.

Return values
RECERR
Parameters
[in] handle Handle of the PDF document.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
All unsaved data will be lost.
The handle won't be valid any more.
The specification of this function in C# is:
RECERR rPdfClose(IntPtr handle);
RECERR
RECERR
Error codes.
Definition RECERR_doc.h:19
rPdfClose
RECERR PDFASMAPI rPdfClose(RPDF_DOC handle)
Close a PDF document.
The specification of this function in Java is:
int rPdfClose(RPDF_DOC handle)
RPDF_DOC
struct tagRPDF_DOC * RPDF_DOC
Handle of a PDF document.
Definition recpdf.h:48
The specification of this function in Python is:
def rPdfClose(handle: "RPDF_DOC") -> int

◆ rPdfCompact()

RECERR PDFASMAPI rPdfCompact | ( | LPCTSTR | pInFileName,
 |  | LPCTSTR | pOutFileName )

Compact a PDF document.

Save the compacted PDF document into a new file.

Return values
RECERR
Parameters
[in] | pInFileName | Full path of the input file.
[in] | pOutFileName | Full path of the output file.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The specification of this function in C# is:
RECERR rPdfCompact(string sourceFileName, string destinationFileName);
rPdfCompact
RECERR PDFASMAPI rPdfCompact(LPCTSTR pInFileName, LPCTSTR pOutFileName)
Compact a PDF document.
The specification of this function in Java is:
int rPdfCompact(String pInFileName, String pOutFileName)
The specification of this function in Python is:
def rPdfCompact(pInFileName: str, pOutFileName: str) -> int

◆ rPdfFileHasText()

RECERR PDFASMAPI rPdfFileHasText | ( | RPDF_DOC | handle,
 |  | size_t | position,
 |  | bool * | bHasText )

Check if a page of the PDF document does have or doesn't have searchable text.

Return values
RECERR
Parameters
[in] | handle | Handle of the PDF document.
[in] | position | Page index in the PDF document.
[out] | bHasText | Existence of searchable text in the page of the PDF document.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The specification of this function in C# is:
RECERR rPdfFileHasText(DocumentHandle handle, uint position, out bool hasText);
rPdfFileHasText
RECERR PDFASMAPI rPdfFileHasText(RPDF_DOC handle, size_t position, bool *bHasText)
Check if a page of the PDF document does have or doesn't have searchable text.
The specification of this function in Java is:
int rPdfFileHasText(RPDF_DOC handle, long position, boolean[] bHasText)
The specification of this function in Python is:
def rPdfFileHasText(handle: "RPDF_DOC", position: int) -> Tuple[int, bool]

◆ rPdfGetOp()

RECERR PDFASMAPI rPdfGetOp | ( | RPDF_DOC | handle,
 |  | RPDF_OPERATION * | ophandle )

Get the PDF operation assigned to a PDF document.

At a time only one PDF operation can be assigned to a PDF document. If there is such an PDF operation, this function will give it back. If there is no such PDF operation NULL will be returned.

Return values
RECERR
Parameters
[in] | handle | Handle of the PDF document.
[out] | ophandle | The return value is the handle of the PDF operation if an PDF operation is assigned to the PDF document, otherwise NULL.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The specification of this function in C# is:
RECERR rPdfGetOp(DocumentHandle handle, out OperationHandle ophandle);
rPdfGetOp
RECERR PDFASMAPI rPdfGetOp(RPDF_DOC handle, RPDF_OPERATION *ophandle)
Get the PDF operation assigned to a PDF document.
The specification of this function in Java is:
int rPdfGetOp(RPDF_DOC handle, RPDF_OPERATION ophandle)
RPDF_OPERATION
struct tagRPDF_OPERATION * RPDF_OPERATION
Handle of a PDF operation.
Definition recpdf.h:56
The specification of this function in Python is:
def rPdfGetOp(handle: "RPDF_DOC") -> Tuple[int, "RPDF_OPERATION"]

◆ rPdfGetPageCount()

RECERR PDFASMAPI rPdfGetPageCount | ( | RPDF_DOC | handle,
 |  | size_t * | pnPages )

Get the page count of a PDF document.

Return values
RECERR
Parameters
[in] | handle | Handle of the PDF document.
[out] | pnPages | Count of pages in the PDF document.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The specification of this function in C# is:
RECERR rPdfGetPageCount(DocumentHandle handle, out UIntPtr attribs);
rPdfGetPageCount
RECERR PDFASMAPI rPdfGetPageCount(RPDF_DOC handle, size_t *pnPages)
Get the page count of a PDF document.
The specification of this function in Java is:
int rPdfGetPageCount(RPDF_DOC handle, long[] pnPages)
The specification of this function in Python is:
def rPdfGetPageCount(handle: "RPDF_DOC") -> Tuple[int, int]

◆ rPdfGetPath()

RECERR PDFASMAPI rPdfGetPath | ( | RPDF_DOC | handle,
 |  | LPTSTR | buffer,
 |  | size_t | buflen )

Get the path of the PDF document.

Read the path string from the PDF file.

Return values
RECERR
Parameters
[in] | handle | Handle of the PDF document.
[out] | buffer | String buffer to store the full path of the PDF document.
[out] | buflen | Length of the buffer.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The specification of this function in C# is:
RECERR rPdfGetPath(DocumentHandle handle, out string path)
rPdfGetPath
RECERR PDFASMAPI rPdfGetPath(RPDF_DOC handle, LPTSTR buffer, size_t buflen)
Get the path of the PDF document.
The specification of this function in Java is:
int rPdfGetPath(RPDF_DOC handle, String[] buffer)
The specification of this function in Python is:
def rPdfGetPath(handle: "RPDF_DOC") -> Tuple[int, str]

◆ rPdfGetPDFSecurityInfo()

RECERR PDFASMAPI rPdfGetPDFSecurityInfo | ( | LPCTSTR | pFileName,
 |  | RPDF_ENCRYPTION * | encMethod,
 |  | size_t * | keySize,
 |  | RPDF_RESTRICTIONS * | secuRestrictions,
 |  | bool * | hasMasterPassword,
 |  | bool * | hasUserPassword )

Get PDF encryption information without opening it.

Return values
RECERR
Parameters
[in] | pFileName | Full path of the source file.
[out] | encMethod | Encryption method of the PDF file. (Can be NULL if not needed.)
[out] | keySize | Encryption's key size. (Can be NULL if not needed.)
[out] | secuRestrictions | Restrictions on the PDF file. (Can be NULL if not needed.)
[out] | hasMasterPassword | Whether the PDF file has master password. (Can be NULL if not needed.)
[out] | hasUserPassword | Whether the PDF file has user password. (Can be NULL if not needed.)
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The specification of this function in C# is:
rPdfGetPDFSecurityInformation(string fileName, out Encryption encryption, out UIntPtr keySize, out Restrictions restrictions, out bool hasMasterPassword, out bool hasUserPassword)
The specification of this function in Java is:
int rPdfGetPDFSecurityInfo(String pFileName, RPDF_ENCRYPTION[] encMethod, long[] keySize, RPDF_RESTRICTIONS[] secuRestrictions, boolean[] hasMasterPassword, boolean[] hasUserPassword)
RPDF_ENCRYPTION
RPDF_ENCRYPTION
Encryption type of a PDF file.
Definition recpdf.h:71
rPdfGetPDFSecurityInfo
RECERR PDFASMAPI rPdfGetPDFSecurityInfo(LPCTSTR pFileName, RPDF_ENCRYPTION *encMethod, size_t *keySize, RPDF_RESTRICTIONS *secuRestrictions, bool *hasMasterPassword, bool *hasUserPassword)
Get PDF encryption information without opening it.
RPDF_RESTRICTIONS
RPDF_RESTRICTIONS
PDF security restriction flags.
Definition recpdf.h:79
The specification of this function in Python is:
def rPdfGetPDFSecurityInfo(pFileName: str) -> Tuple[int, int, int, int, bool, bool]

◆ rPdfInit()

RECERR PDFASMAPI rPdfInit ( void )

Initialize the RecPDF.

The rPdfInit starts the PDF assembler SDK. All RecPDF functions must be called between an rPdfInit and an rPdfQuit calls.

Return values
RECERR
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
Before rPdfInit a kRecInit or RecInitPlus must be called to initialize the CSDK.
The specification of this function in C# is:
RECERR rPdfInit();
rPdfInit
RECERR PDFASMAPI rPdfInit(void)
Initialize the RecPDF.
The specification of this function in Java is:
int rPdfInit()
The specification of this function in Python is:
def rPdfInit(csdkPath: Optional[str] = None) -> int

◆ rPdfOpAddFile()

RECERR PDFASMAPI rPdfOpAddFile | ( | RPDF_OPERATION | ophandle,
 |  | RPDF_DOC | handle )

Add a PDF document to the PDF operation.

A PDF operation is able to use only those PDF document whose are assigned to it.

Return values
RECERR
Parameters
[in] | ophandle | Handle of the PDF operation.
[in] | handle | Handle of the PDF document.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
Once a PDF document is assigned to a PDF operation, there is no way to unassign it.
The specification of this function in C# is:
RECERR rPdfOpAddFile(OperationHandle operation, DocumentHandle docHandle);
rPdfOpAddFile
RECERR PDFASMAPI rPdfOpAddFile(RPDF_OPERATION ophandle, RPDF_DOC handle)
Add a PDF document to the PDF operation.
The specification of this function in Java is:
int rPdfOpAddFile(RPDF_OPERATION ophandle, RPDF_DOC handle)
The specification of this function in Python is:
def rPdfOpAddFile(ophandle: "RPDF_OPERATION", handle: "RPDF_DOC") -> int

◆ rPdfOpCancel()

RECERR PDFASMAPI rPdfOpCancel ( RPDF_OPERATION ophandle )

Cancel a PDF operation.

Destroys a PDF operation without executing it. This PDF operation handle cannot be used anymore. All page objects will be freed up and cannot be used anymore. All PDF documents will show the same state as before the PDF operation has started.

Return values
RECERR
Parameters
[in] ophandle Handle of the PDF operation.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The specification of this function in C# is:
RECERR rPdfOpCancel(IntPtr ophandle);
rPdfOpCancel
RECERR PDFASMAPI rPdfOpCancel(RPDF_OPERATION ophandle)
Cancel a PDF operation.
The specification of this function in Java is:
int rPdfOpCancel(RPDF_OPERATION ophandle)
The specification of this function in Python is:
def rPdfOpCancel(ophandle: "RPDF_OPERATION") -> int

◆ rPdfOpCloseFileEnumeration()

RECERR PDFASMAPI rPdfOpCloseFileEnumeration ( RPDF_FILEENUMERATOR enumerator )

Close the enumeration of the assigned PDF documents in the PDF operation.

Destroys the enumerator of the assigned PDF documents.

Return values
RECERR
Parameters
[in] enumerator Handle of the PDF document enumerator.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The specification of this function in C# is:
RECERR rPdfOpCloseFileEnumeration(IntPtr enumerator);
rPdfOpCloseFileEnumeration
RECERR PDFASMAPI rPdfOpCloseFileEnumeration(RPDF_FILEENUMERATOR enumerator)
Close the enumeration of the assigned PDF documents in the PDF operation.
The specification of this function in Java is:
int rPdfOpCloseFileEnumeration(RPDF_FILEENUMERATOR enumerator)
RPDF_FILEENUMERATOR
struct tagRPDF_FILEENUMERATOR * RPDF_FILEENUMERATOR
Handle of an enumerator for the PDF documents taking part in a PDF operation.
Definition recpdf.h:64
The specification of this function in Python is:
def rPdfOpCloseFileEnumeration(enumerator: "RPDF_FILEENUMERATOR") -> int

◆ rPdfOpCopyPages()

RECERR PDFASMAPI rPdfOpCopyPages | ( | RPDF_OPERATION | ophandle,
 |  | RPDF_DOC | desthandle,
 |  | size_t | destposition,
 |  | RPDF_DOC | srchandle,
 |  | const size_t * | PageIndexArr,
 |  | size_t | numpages )

Copy pages as a part of a PDF operation.

Add a copy page command to a PDF operation. It can copy pages from a PDF document to another PDF document or inside a single PDF document.

Return values
RECERR
Parameters
[in] | ophandle | Handle of the PDF operation.
[in] | desthandle | Handle of the destination PDF document.
[in] | destposition | Starting page index in the destination PDF document. The first copied page will get this page index. All other copied pages will be copied continually after the first one. If this equals to the count of pages of the destination PDF document or (size_t)-1, then the new pages will be appended to the PDF document.
[in] | srchandle | Handle of the source PDF document. It can be the same as the desthandle. If it is NULL, then the source document will be the same as the destination.
[in] | PageIndexArr | Array of page indices in the source PDF document.
[in] | numpages | Count of pages to copy. This is the number of elements in the PageIndexArr array.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The command takes place when the PDF operation is executed.
After the call all functions will see as if the copy has been already taken place.
The specification of this function in C# is:
RECERR rPdfOpCopyPages(OperationHandle ophandle, DocumentHandle handle, uint position, DocumentHandle otherHandle, UIntPtr[] otherPositions)
rPdfOpCopyPages
RECERR PDFASMAPI rPdfOpCopyPages(RPDF_OPERATION ophandle, RPDF_DOC desthandle, size_t destposition, RPDF_DOC srchandle, const size_t *PageIndexArr, size_t numpages)
Copy pages as a part of a PDF operation.
The specification of this function in Java is:
int rPdfOpCopyPages(RPDF_OPERATION ophandle, RPDF_DOC desthandle, long destposition, RPDF_DOC srchandle, long[] PageIndexArr)
The specification of this function in Python is:
def rPdfOpCopyPages(ophandle: "RPDF_OPERATION", desthandle: "RPDF_DOC", destposition: int, srchandle: "RPDF_DOC", PageIndexArr: "SizeTArray") -> int

◆ rPdfOpDeletePages()

RECERR PDFASMAPI rPdfOpDeletePages | ( | RPDF_OPERATION | ophandle,
 |  | RPDF_DOC | handle,
 |  | const size_t * | PageIndexArr,
 |  | size_t | numpages )

Delete one or more pages in a PDF document as a part of a PDF operation.

Add a page delete command to a PDF operation.

Return values
RECERR
Parameters
[in] | ophandle | Handle of the PDF operation.
[in] | handle | Handle of the PDF document.
[in] | PageIndexArr | Array of the page indices in the PDF document.
[in] | numpages | Count of pages to delete. This is the number of elements in the PageIndexArr.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The command takes place when the PDF operation is executed.
After the call all functions will see as if the deletion has been already taken place.
The specification of this function in C# is:
RECERR rPdfOpDeletePages(OperationHandle operation, DocumentHandle handle, UIntPtr[] pageIndexArray)
rPdfOpDeletePages
RECERR PDFASMAPI rPdfOpDeletePages(RPDF_OPERATION ophandle, RPDF_DOC handle, const size_t *PageIndexArr, size_t numpages)
Delete one or more pages in a PDF document as a part of a PDF operation.
The specification of this function in Java is:
int rPdfOpDeletePages(RPDF_OPERATION ophandle, RPDF_DOC handle, long[] PageIndexArr)
The specification of this function in Python is:
def rPdfOpDeletePages(ophandle: "RPDF_OPERATION", handle: "RPDF_DOC", PageIndexArr: "SizeTArray") -> int

◆ rPdfOpen()

RECERR PDFASMAPI rPdfOpen | ( | LPCTSTR | pFileName,
 |  | LPCTSTR | password,
 |  | RPDF_DOC * | handle )

Open a PDF file.

Create a PDF document object, and assign an existing PDF file to it. Then gives back a handle for the PDF document.

Return values
RECERR
Parameters
[in] | pFileName | Full path of the source file.
[in] | password | Pointer to the PDF password or NULL or empty string if no password is needed.
[out] | handle | PDF document handle.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The specification of this function in C# is:
RECERR rPdfOpen(string fileName, string password, out DocumentHandle handle);
rPdfOpen
RECERR PDFASMAPI rPdfOpen(LPCTSTR pFileName, LPCTSTR password, RPDF_DOC *handle)
Open a PDF file.
The specification of this function in Java is:
int rPdfOpen(String pFileName, String password, RPDF_DOC handle)
The specification of this function in Python is:
def rPdfOpen(pFileName: str, password: str) -> Tuple[int, "RPDF_DOC"]

◆ rPdfOpExecute()

RECERR PDFASMAPI rPdfOpExecute ( RPDF_OPERATION ophandle )

Execute a PDF operation.

Execute a PDF operation and after the execution destroy it. This PDF operation handle cannot be used anymore. All page objects will be freed up and cannot be used anymore.

Return values
RECERR
Parameters
[in] ophandle Handle of the PDF operation.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
There is no guarantee that all commands will be executed.
The specification of this function in C# is:
RECERR rPdfOpExecute(OperationHandle ophandle);
rPdfOpExecute
RECERR PDFASMAPI rPdfOpExecute(RPDF_OPERATION ophandle)
Execute a PDF operation.
The specification of this function in Java is:
int rPdfOpExecute(RPDF_OPERATION ophandle)
The specification of this function in Python is:
def rPdfOpExecute(ophandle: "RPDF_OPERATION") -> int

◆ rPdfOpGetFirstFile()

RECERR PDFASMAPI rPdfOpGetFirstFile | ( | RPDF_OPERATION | ophandle,
 |  | RPDF_DOC * | handle,
 |  | size_t * | numfiles,
 |  | RPDF_FILEENUMERATOR * | enumerator )

Get the first assigned PDF document of a PDF operation.

Start the enumeration of the assigned PDF document of a PDF operation. The created file enumerator must be freed up after use with the rPdfOpCloseFileEnumeration function call.

Return values
RECERR
Parameters
[in] | ophandle | Handle of the PDF operation.
[out] | handle | Handle of the first PDF document.
[out] | numfiles | Count of assigned PDF documents in the PDF operation.
[out] | enumerator | New enumerator handle. This handle can be used to continue the enumeration with the rPdfOpGetNextFile.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
By the time when the enumeration takes place the PDF operation object or the referenced PDF documents may be destroyed. If the PDF operation object is destroyed a referenced PDF document may be attached to another PDF operation.
The specification of this function in C# is:
RECERR rPdfOpGetFirstFile(OperationHandle ophandle, out DocumentHandle handle, out UIntPtr numfiles, out FileEnumeratorHandle enumerator);
rPdfOpGetFirstFile
RECERR PDFASMAPI rPdfOpGetFirstFile(RPDF_OPERATION ophandle, RPDF_DOC *handle, size_t *numfiles, RPDF_FILEENUMERATOR *enumerator)
Get the first assigned PDF document of a PDF operation.
The specification of this function in Java is:
int rPdfOpGetFirstFile(RPDF_OPERATION ophandle, RPDF_DOC handle, long[] numfiles, RPDF_FILEENUMERATOR enumerator)
The specification of this function in Python is:
def rPdfOpGetFirstFile(ophandle: "RPDF_OPERATION") -> Tuple[int, "RPDF_DOC", int, "RPDF_FILEENUMERATOR"]

◆ rPdfOpGetNextFile()

RECERR PDFASMAPI rPdfOpGetNextFile | ( | RPDF_FILEENUMERATOR | enumerator,
 |  | RPDF_DOC * | handle )

Get the next assigned PDF document of a PDF operation.

Step the enumerator of the assigned PDF document and give back the next one.

Return values
RECERR
Parameters
[in] | enumerator | Handle of the PDF document enumerator.
[out] | handle | Assigned PDF document in the PDF operation.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The specification of this function in C# is:
RECERR rPdfOpGetNextFile(FileEnumeratorHandle enumerator, out DocumentHandle handle);
rPdfOpGetNextFile
RECERR PDFASMAPI rPdfOpGetNextFile(RPDF_FILEENUMERATOR enumerator, RPDF_DOC *handle)
Get the next assigned PDF document of a PDF operation.
The specification of this function in Java is:
int rPdfOpGetNextFile(RPDF_FILEENUMERATOR enumerator, RPDF_DOC handle)
The specification of this function in Python is:
def rPdfOpGetNextFile(enumerator: "RPDF_FILEENUMERATOR") -> Tuple[int, "RPDF_DOC"]

◆ rPdfOpInsertHPAGEs()

RECERR PDFASMAPI rPdfOpInsertHPAGEs | ( | RPDF_OPERATION | ophandle,
 |  | RPDF_DOC | desthandle,
 |  | size_t | destposition,
 |  | const HPAGE * | srcpages,
 |  | size_t | srcpagecount,
 |  | bool | bImageOnly )

Insert pages to the PDF given by HPAGE handles.

Add an insert HPAGE command to a PDF operation. It can insert pages to a PDF document by HPAGE.

Return values
RECERR
Parameters
[in] | ophandle | Handle of the PDF operation.
[in] | desthandle | Handle of the destination PDF document.
[in] | destposition | Starting page index in the destination PDF document. The first inserted page will get this page index. All other inserted pages will be inserted continually after the first one. If this equals to the count of pages of the destination PDF document or (size_t)-1, then the new pages will be appended to the PDF document.
[in] | srcpages | Array of pages given by HPAGEs.
[in] | srcpagecount | Count of HPAGEs to insert. This is the number of elements in the srcpages array.
[in] | bImageOnly | If this parameter is true, the command inserts only the images without the recognized text.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The command takes place when the PDF operation is executed.
The HPAGEs can free after the end of the operation.
After the call all functions will see as if the insertion has been already taken place.
The specification of this function in C# is:
RECERR rPdfOpInsertHPAGEs(OperationHandle ophandle, DocumentHandle handle, uint position, IntPtr[] srcpages, bool imageOnly)
rPdfOpInsertHPAGEs
RECERR PDFASMAPI rPdfOpInsertHPAGEs(RPDF_OPERATION ophandle, RPDF_DOC desthandle, size_t destposition, const HPAGE *srcpages, size_t srcpagecount, bool bImageOnly)
Insert pages to the PDF given by HPAGE handles.
The specification of this function in Java is:
int rPdfOpInsertHPAGEs(RPDF_OPERATION ophandle, RPDF_DOC desthandle, long destposition, HPAGE[] srcpages, boolean bImageOnly)
HPAGE
struct RECPAGESTRUCT * HPAGE
Handle of a page in memory.
Definition KernelApi.h:289
The specification of this function in Python is:
def rPdfOpInsertHPAGEs(ophandle: "RPDF_OPERATION", desthandle: "RPDF_DOC", destposition: int, srcpages: "HPAGE", bImageOnly: bool) -> int

◆ rPdfOpMergeTextToPages()

RECERR PDFASMAPI rPdfOpMergeTextToPages | ( | RPDF_OPERATION | ophandle,
 |  | RPDF_DOC | desthandle,
 |  | size_t | destposition,
 |  | const HPAGE * | srcpages,
 |  | size_t | srcpagecount )

Insert the text content of the given HPAGE handles to the specified PDF pages.

Add a Make Pages Searchable command to a PDF operation. It can merge the text content of a HPAGE to the specified pages.

Return values
RECERR
Parameters
[in] | ophandle | Handle of the PDF operation.
[in] | desthandle | Handle of the destination PDF document.
[in] | destposition | Starting page index in the destination PDF document. The first searchable page will get this page index. All other searchable pages will continually after the first one.
[in] | srcpages | Array of pages given by HPAGEs.
[in] | srcpagecount | Count of HPAGEs to insert. This is the number of elements in the srcpages array.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The command takes place when the PDF operation is executed.
After this function call, the HPAGE can free by the caller.
After the call all functions will see as if the insertion has been already taken place.
The specification of this function in C# is:
RECERR rPdfOpMergeTextToPages(OperationHandle ophandle, DocumentHandle handle, uint destposition, IntPtr[] srcpages)
rPdfOpMergeTextToPages
RECERR PDFASMAPI rPdfOpMergeTextToPages(RPDF_OPERATION ophandle, RPDF_DOC desthandle, size_t destposition, const HPAGE *srcpages, size_t srcpagecount)
Insert the text content of the given HPAGE handles to the specified PDF pages.
The specification of this function in Java is:
int rPdfOpMergeTextToPages(RPDF_OPERATION ophandle, RPDF_DOC desthandle, long destposition, HPAGE[] srcpages)
The specification of this function in Python is:
def rPdfOpMergeTextToPages(ophandle: "RPDF_OPERATION", desthandle: "RPDF_DOC", destposition: int, srcpages: "HPAGE") -> int

◆ rPdfOpMovePages()

RECERR PDFASMAPI rPdfOpMovePages | ( | RPDF_OPERATION | ophandle,
 |  | RPDF_DOC | handle,
 |  | size_t | destposition,
 |  | const size_t * | PageIndexArr,
 |  | size_t | numpages )

Move pages as a part of a PDF operation.

Add a move page command to a PDF operation. It can move pages inside a single PDF document.

Return values
RECERR
Parameters
[in] | ophandle | Handle of the PDF operation.
[in] | handle | Handle of the PDF document.
[in] | destposition | The starting page index. This will be the page index of the first moved page. All other move pages will be moved continually after the first one. If this equals to the count of pages of the destination PDF document or (size_t)-1, then the new pages will be appended to the PDF document.
[in] | PageIndexArr | Array of page indices in the source PDF document.
[in] | numpages | Count of pages to copy. This is the number of elements in the PageIndexArr array.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The command takes place when the PDF operation is executed.
After the call all functions will see as if the move has been already taken place.
The specification of this function in C# is:
RECERR rPdfOpMovePages(OperationHandle ophandle, DocumentHandle handle, uint position, UIntPtr[] otherPositions)
rPdfOpMovePages
RECERR PDFASMAPI rPdfOpMovePages(RPDF_OPERATION ophandle, RPDF_DOC handle, size_t destposition, const size_t *PageIndexArr, size_t numpages)
Move pages as a part of a PDF operation.
The specification of this function in Java is:
int rPdfOpMovePages(RPDF_OPERATION ophandle, RPDF_DOC handle, long destposition, long[] PageIndexArr)
The specification of this function in Python is:
def rPdfOpMovePages(ophandle: "RPDF_OPERATION", handle: "RPDF_DOC", destposition: int, PageIndexArr: "SizeTArray") -> int

◆ rPdfOpRotatePage()

RECERR PDFASMAPI rPdfOpRotatePage | ( | RPDF_OPERATION | ophandle,
 |  | RPDF_DOC | handle,
 |  | size_t | position,
 |  | RPDF_ROTATION | rotation )

Rotate a page in a PDF document as a part of a PDF operation.

Add a page rotate command to a PDF operation.

Return values
RECERR
Parameters
[in] | ophandle | Handle of the PDF operation.
[in] | handle | Handle of the PDF document.
[in] | position | Page index in the PDF document.
[in] | rotation | How much rotate the page.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The command takes place when the PDF operation is executed.
After the call all functions will see as if the rotation has been already taken place.
If the page is a part of a page object, then it will be removed from the page object.
The specification of this function in C# is:
RECERR rPdfOpRotatePage(OperationHandle operation, DocumentHandle handle, uint position, Rotation rotation);
rPdfOpRotatePage
RECERR PDFASMAPI rPdfOpRotatePage(RPDF_OPERATION ophandle, RPDF_DOC handle, size_t position, RPDF_ROTATION rotation)
Rotate a page in a PDF document as a part of a PDF operation.
The specification of this function in Java is:
int rPdfOpRotatePage(RPDF_OPERATION ophandle, RPDF_DOC handle, long position, RPDF_ROTATION rotation)
RPDF_ROTATION
RPDF_ROTATION
Page rotation.
Definition recpdf.h:94
The specification of this function in Python is:
def rPdfOpRotatePage(ophandle: "RPDF_OPERATION", handle: "RPDF_DOC", position: int, rotation: int) -> int

◆ rPdfOpStart()

RECERR PDFASMAPI rPdfOpStart ( RPDF_OPERATION * Ophandle )

Start a new PDF operation.

Create a new PDF operation object.

Return values
RECERR
Parameters
[out] Ophandle Handle of the new PDF operation.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The specification of this function in C# is:
RECERR rPdfOpStart(out OperationHandle ophandle);
rPdfOpStart
RECERR PDFASMAPI rPdfOpStart(RPDF_OPERATION *Ophandle)
Start a new PDF operation.
The specification of this function in Java is:
int rPdfOpStart(RPDF_OPERATION Ophandle)
The specification of this function in Python is:
def rPdfOpStart() -> Tuple[int, "RPDF_OPERATION"]

◆ rPdfOpStartEx()

RECERR PDFASMAPI rPdfOpStartEx | ( | int | sid,
 |  | RPDF_OPERATION * | Ophandle )

Start a new PDF operation using a given Settings collection ID (sid).

Create a new PDF operation object.

Return values
RECERR
Parameters
[in] | sid | Settings Collection ID.
[out] | Ophandle | Handle of the new PDF operation.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The specification of this function in C# is:
RECERR rPdfOpStartEx(int sid, out OperationHandle ophandle);
rPdfOpStartEx
RECERR PDFASMAPI rPdfOpStartEx(int sid, RPDF_OPERATION *Ophandle)
Start a new PDF operation using a given Settings collection ID (sid).
The specification of this function in Java is:
int rPdfOpStartEx(int sid, RPDF_OPERATION Ophandle)
The specification of this function in Python is:
def rPdfOpStartEx(int sid) -> Tuple[int, "RPDF_OPERATION"]

◆ rPdfOptAddCommandStr()

RECERR PDFASMAPI rPdfOptAddCommandStr | ( | RPDF_DOC | handle,
 |  | LPCTSTR | command )

Add an optimization command string to a handle.

See the possible command strings in the RecPDF help! You can specify more command strings by calling this function more than once

Return values
RECERR
Parameters
[in] | handle | Handle of the PDF operation coming from rPdfOptOpen.
[in] | command | Commands, see the command descriptions.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
After collecting the required commands calling this function sequentially they can be performed by calling rPdfOptimize.
The specification of this function in C# is:
RECERR rPdfOptAddCommandStr(DocumentHandle Handle, string Command);
rPdfOptAddCommandStr
RECERR PDFASMAPI rPdfOptAddCommandStr(RPDF_DOC handle, LPCTSTR command)
Add an optimization command string to a handle.
The specification of this function in Java is:
int rPdfOptAddCommandStr(RPDF_DOC handle, String command)
The specification of this function in Python is:
def rPdfOptAddCommandStr(handle: "RPDF_DOC", command: str) -> int

◆ rPdfOptimize()

RECERR PDFASMAPI rPdfOptimize | ( | RPDF_DOC | handle,
 |  | LPCTSTR | pOptFileName )

Do the optimization process.

Return values
RECERR
Parameters
[in] | handle | Handle of the PDF operation coming from rPdfOptOpen.
[in] | pOptFileName | Full path of the optimized output file.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The commands to be performed during optimization can be added by calling rPdfOptAddCommandStr.
The specification of this function in C# is:
RECERR rPdfOptimize(DocumentHandle Handle, string OptFileName);
rPdfOptimize
RECERR PDFASMAPI rPdfOptimize(RPDF_DOC handle, LPCTSTR pOptFileName)
Do the optimization process.
The specification of this function in Java is:
int rPdfOptimize(RPDF_DOC handle, String pOptFileName)
The specification of this function in Python is:
def rPdfOptimize(handle: "RPDF_DOC", pOptFileName: str) -> int

◆ rPdfOptOpen()

RECERR PDFASMAPI rPdfOptOpen | ( | LPCTSTR | pFileName,
 |  | LPCTSTR | password,
 |  | RPDF_DOC * | handle )

Open a PDF file for optimization.

Create a PDF document object, and assign an existing PDF file to it. Then gives back a handle for the PDF document. This handle can be used only for PDF optimalization. Do not add to an Operation

Return values
RECERR
Parameters
[in] | pFileName | Full path of the source file.
[in] | password | Pointer to the PDF password or NULL or empty string if no password is needed.
[out] | handle | PDF document handle.
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
The handle should be closed by calling rPdfClose.
The specification of this function in C# is:
RECERR rPdfOptOpen(string Path, string Password, out DocumentHandle Handle);
rPdfOptOpen
RECERR PDFASMAPI rPdfOptOpen(LPCTSTR pFileName, LPCTSTR password, RPDF_DOC *handle)
Open a PDF file for optimization.
The specification of this function in Java is:
int rPdfOptOpen(String pFileName, String password, RPDF_DOC handle)
The specification of this function in Python is:
def rPdfOptOpen(pFileName: str, password: str) -> Tuple[int, "RPDF_DOC"]

◆ rPdfQuit()

RECERR PDFASMAPI rPdfQuit ( void )

Uninitialize the RecPDF.

The rPdfQuit stops the PDF assembler SDK. All RecPDF functions must be called between an rPdfInit and an rPdfQuit calls.

Return values
RECERR
Note
RecPDF API-level of CSDK is supported on: Windows, Linux, MacOS.
After rPdfQuit a kRecQuit or RecQuitPlus must be called to shut down the CSDK.
The specification of this function in C# is:
RECERR rPdfQuit();
rPdfQuit
RECERR PDFASMAPI rPdfQuit(void)
Uninitialize the RecPDF.
The specification of this function in Java is:
int rPdfQuit()
The specification of this function in Python is:
def rPdfQuit() -> int


RecAPI: RecPDFS

Functions
RecPDFS
RecPDFAPI

Dynamic linking of RecPDF. This module is supported on: Windows. More...

Functions

RECERR PDFASMAPI | rPdfInitS (LPCTSTR pRecPath)
Initialize the RecPDFS.
RECERR PDFASMAPI | rPdfQuitS (void)
Uninitialize the RecPDFS.

Detailed Description

Dynamic linking of RecPDF. This module is supported on: Windows.

There may be a general problem with DLL's that they must be located on one of some predetermined pathes. It may constrain the distribution of the integrating application. The RecPDFS module solves this problem.

RecPDFS is a wrapper on the module RecPDF, which makes possible to separate the integrating application from the files of the OmniPage CSDK 2025.1 without putting the folder of the CSDK into the environment variable PATH. In fact, this may be one of some little static libraries. Depending on how the release version of the integrating application uses the C run-time libraries, one of the following RecPDFS static libraries should be linked to the application:

  • RecPDF_MS.LIB - multi-threaded C run-time library - statically linked,
  • RecPDF_MDyn.LIB - multi-threaded C run-time library - dynamically linked.

The debug version of the integrating application requires a static library to be linked as follows:

  • RecPDF_MSd.LIB - multi-threaded C run-time library - statically linked,
  • RecPDF_MDynd.LIB - multi-threaded C run-time library - dynamically linked.

It is a thin interface layer for binding the Engine at run-time. It loads the RecPDF from a specified path and gets all the entry points of the RecPDF.DLL (rPdfInitS). Unloading also can be controlled by the integrating application (rPdfQuitS).

Function Documentation

◆ rPdfInitS()

RECERR PDFASMAPI rPdfInitS ( LPCTSTR pRecPath )

Initialize the RecPDFS.

This function initializes the module RecPDFS, which includes the initialization of RecPDF. The rPdfInitS starts the PDF assembler SDK. All RecPDF functions must be called between an rPdfInitS and an rPdfQuitS calls.

Parameters
[in] pRecPath Full path to the Engine Binary directory, i.e. where the Engine files are located.
Return values
RECERR
Note
Before rPdfInitS a kRecInitS or RecInitPlusS must be called to initialize the CSDK.

◆ rPdfQuitS()

RECERR PDFASMAPI rPdfQuitS ( void )

Uninitialize the RecPDFS.

This function closes the module RecPDFS, which includes the closing of RecPDF. The rPdfQuitS stops the PDF assembler SDK. All RecPDF functions must be called between an rPdfInitS and an rPdfQuitS calls.

Return values
RECERR
Note
After rPdfQuitS a kRecQuitS or RecQuitPlusS must be called to shut down the CSDK.


RecAPI: RecPDF.Net

RecPDF.Net
RecPDFAPI

RecPDF.NET is the object oriented .NET API of RecPDFAPI. Supported on: Windows. More...

Detailed Description

RecPDF.NET is the object oriented .NET API of RecPDFAPI. Supported on: Windows.

To start with RecPDF first a Manager object must be created via the RecPDF static class. The simplest method is using the 'using' keyword which is also able to uninitialize the RecPDF at the end.

using (var manager = RecPDF.Initialize())
{
// Use the library...
}

In the using several file level methods are directly available. E.g. checking the password protection of a PDF file:

using (var manager = RecPDF.Initialize())
{
System.Console.WriteLine("{0} is password protected: {1}", fileName, manager.IsPDFPasswordProtected(fileName));
}

However executing every operation on files one by one would be very ineffective, a file can be opened by the Manager's class OpenDocument methods: (And a new file can be created by the CreateDocument method.)

using (var manager = RecPDF.Initialize())
using (var document = manager.OpenDocument(fileName))
{
// Use the document...
}

In the Document class there are some document level methods, and several properties of the PDF file. This sample prints on the console if the file has text:

using (var manager = RecPDF.Initialize())
using (var document = manager.OpenDocument(fileName))
{
Console.WriteLine("{0} {1} text.", document.Path, document.HasText ? "has" : "hasn't")
}

To handle multiple documents and pages in an optimized way, the Operation class has been created. An operation object mostly used for copying, moving, rotating, deleting, and adding pages to documents. To use an operation first the input and output documents must be attached to it. The attaching method is the same for the input and output documents. Actually a document can be both input and output at the same time. e.g. A page is moved inside the document, then the document is the input source of the page, and the output target to the page as well. The documents can be attached through the parameters of the CreateOperation method or the Operation class's AddDocument method.

Then commands must be used on the operation. These commands will be executed at the same time when the Operation object's Execute method is called. If in the meantime it turns out that these commands are not needed, then the Operation object should be disposed. It will cancel all the commands. After the Dispose or the Execute method the Operation object is no longer available. A second Dispose or a Dispose after Execute won't do anything and won't cause any problem. So the Execute method can be used in a using block without problem. This example appends the 3., 5., and 6. page of the source file to the destination file:

using (var manager = RecPDF.Initialize())
using (var documentSrc = manager.OpenDocument(fileName1))
using (var documentDst = manager.OpenDocument(fileName2))
using (var op = manager.CreateOperation(documentSrc, documentDst))
{
op.AppendPage(documentDst, documentSrc, 2, 4, 5);
if (StillNeedsToCopyPages()) // If not, the using statement at end of scope calls the Dispose method to cancel the operation.
op.Execute();
}

A document at a time can only attach to a single operation. And during that every command to the operation virtually executed on it at the moment the command used. e.g. If the first page of the document is deleted, then later the page 0 will refer to the original document's second page. If a page is insert into a document's first page, then the page 1 will refer to the original document's first page, and page 0 will be the new page. However the commands won't really be executed until the Execute method is called. But with this method the document's changing will be easily traceable.

Be aware that the Operation object is not a transaction. If the Execute method throws an exception it is not guaranteed that the output files contents reverts to the original contents. This could be achieved only by temporarly backuping the files. However if Dispose is used instead of Execute it is guaranteed that no files has been changed.

Exception safety: All methods has strong exception safety level except only a few one. That means when an exception has been thrown these methods reverts the owning object to the state before the calling of the function, and free up any resources they allocated. They work like a transaction. However the state of the file system may have changed, like a file is modified in the meantime. The Dispose methods use instead the no-throw exception safety level. Which means they never throw. Because some Dispose method shares a great part of their codes with the finalizer method, and finalizers can't throw. The last exception of the rule is Execute method of the Manager class which always disposes the Manager object even if an exception has been thrown.

Thread safety: Every method is thread safe. Because every method uses locks to ensure thread safety calling them from multiple threads without care may cause dead lock.


RecAPI: OmniPageCSDK Namespace Reference

  • Namespace List
  • Namespace Members
OmniPageCSDK Namespace Reference


RecAPI: OmniPageCSDK.RecPDF Namespace Reference

  • Namespace List
  • Namespace Members
  • OmniPageCSDK
  • RecPDF
Classes | Enumerations
OmniPageCSDK.RecPDF Namespace Reference
RecPDFAPI » RecPDF.Net

Classes

class | AlreadyInitializedException
RecPDF already initialized. More...
class | Document
A PDF document. More...
class | Manager
Manager class for the RecPDF More...
class | Operation
A PDF operation. More...
class | OptDocument
A PDF document for PDF optimizing operations. More...
class | ParameterIsNullException
Null parameter. More...
class | PDFException
PDF exception. More...
class | RecAPIError
RecAPI error. More...
class | RecPDF
Main class for RecPDF. More...

Enumerations

enum ErrorType {
RECAPIError ,
ParameterIsNull ,
AlreadyInitialized
}
PDF exception type. More...
enum Encryption {
NO ,
RC4 ,
AES
}
PDF file encryption type. More...
enum Rotation {
No = 0 ,
Left ,
Right ,
Halfturn
}
Degree of rotation. More...
enum Restrictions {
NoPrint = 0x100 ,
NoHighResolutionPrinting = 0x200 ,
NoCopy = 0x400 ,
NoExtractText = 0x800 ,
NoExtractPages = 0x1000 ,
NoChange = 0x2000 ,
NoAssemble = 0x4000 ,
NoAcroform = 0x8000 ,
NoAnnotation = 0x10000 ,
AllowEverything = 0
}
PDF security restriction flags. More...

Enumeration Type Documentation

◆ Encryption

enum OmniPageCSDK.RecPDF.Encryption

PDF file encryption type.

Enumerator
NO | No encryption.
RC4 | RC4 algorithm.
AES | AES algorithm.

◆ ErrorType

enum OmniPageCSDK.RecPDF.ErrorType

PDF exception type.

Enumerator
RECAPIError | Error from the RECAPI or RecPDF interface.
ParameterIsNull | Some input parameter is null, however it should not be.
AlreadyInitialized | RecPDF is already initialized (Manager class created)

◆ Restrictions

enum OmniPageCSDK.RecPDF.Restrictions

PDF security restriction flags.

Enumerator
NoPrint | Printing is prohibited.
NoHighResolutionPrinting | Printing is allowed only in low resolution mode.
NoCopy | Copying the content to other document is prohibited.
NoExtractText | Extracting the content for accessibility features is prohibited.
NoExtractPages | Extracting pages is prohibited.
NoChange | Modifying the content is prohibited.
NoAssemble | Document assemble is prohibited (can not insert, rotate, delete pages, and create bookmarks or thumbnails).
NoAcroform | Filling in form fields are prohibited.
NoAnnotation | Adding or modifying annotations are prohibited.
AllowEverything | No restrictions.

◆ Rotation

enum OmniPageCSDK.RecPDF.Rotation

Degree of rotation.

Enumerator
No | Do not rotate.
Left | Rotate to the left.
Right | Rotate to the right.
Halfturn | Turn around.


RecAPI: Namespace List

  • Namespace List
  • Namespace Members
Namespace List
Here is a list of all documented namespaces with brief descriptions:
[detail level 123]
▼N OmniPageCSDK |
▼N RecPDF |
C AlreadyInitializedException | RecPDF already initialized
C Document | A PDF document
C Manager | Manager class for the RecPDF
C Operation | A PDF operation
C OptDocument | A PDF document for PDF optimizing operations
C ParameterIsNullException | Null parameter
C PDFException | PDF exception
C RecAPIError | RecAPI error
C RecPDF | Main class for RecPDF


RecAPI: OmniPageCSDK.RecPDF.AlreadyInitializedException Class Reference

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • AlreadyInitializedException
List of all members
OmniPageCSDK.RecPDF.AlreadyInitializedException Class Reference

RecPDF already initialized. More...

Inheritance diagram for OmniPageCSDK.RecPDF.AlreadyInitializedException:
OmniPageCSDK.RecPDF.PDFException

Additional Inherited Members

- Properties inherited from OmniPageCSDK.RecPDF.PDFException
ErrorType ErrorType [get, set]
Type of error.

Detailed Description

RecPDF already initialized.

Tried to initialize, but RecPDF has been already initialized.


RecAPI: OmniPageCSDK.RecPDF.Document Class Reference

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • Document
Public Member Functions | Properties | List of all members
OmniPageCSDK.RecPDF.Document Class Referencesealed

A PDF document. More...

Inherits IDisposable.

Public Member Functions

bool | HasPageText (int position)
Does the page have text?
void | Dispose ()
Close the PDF document.

Properties

string | Path [get]
Path of the PDF document.
bool | HasText [get]
PDF file has a text.
uint | PageCount [get]
Page count
Operation | Operation [get]
Assigned operation if there is any.
DocumentHandle | SafeHandle [get]
RPDF_DOC C handle.

Detailed Description

A PDF document.

Inherited from the System.IDisposable interface. The Dispose method closes the file. This object represents a PDF document. The represented PDF document can be changed by a PDF operation (Operation) if the Document is attached to the Operation object.

Member Function Documentation

◆ Dispose()

void OmniPageCSDK.RecPDF.Document.Dispose ( )

Close the PDF document.

It doesn't throw exceptions.

◆ HasPageText()

bool OmniPageCSDK.RecPDF.Document.HasPageText ( int position )

Does the page have text?

Parameters
position Page index
Returns
Whether the page has text or not?
Exceptions
ObjectDisposedException | Thrown when the Document object is already disposed.
RecAPIError | Thrown when it failed to check if the given page of the document has text on it.

Property Documentation

◆ HasText

bool OmniPageCSDK.RecPDF.Document.HasText
get

PDF file has a text.

Exceptions
ObjectDisposedException | Thrown when the Document object is already disposed.
RecAPIError | Thrown when it failed to get if there is text in the document.

◆ Operation

Operation OmniPageCSDK.RecPDF.Document.Operation
get

Assigned operation if there is any.

Exceptions
ObjectDisposedException | Thrown when the Document object or the Operation object is already disposed.
RecAPIError | Thrown when it failed to get the operation the document attached to.

◆ PageCount

uint OmniPageCSDK.RecPDF.Document.PageCount
get

Page count

Exceptions
ObjectDisposedException | Thrown when the Document object is already disposed.
RecAPIError | Thrown when it failed to get the count of pages.

◆ Path

string OmniPageCSDK.RecPDF.Document.Path
get

Path of the PDF document.

Exceptions
ObjectDisposedException | Thrown when the Document object is already disposed.
RecAPIError | Thrown when it failed to get the path of the PDF file.

◆ SafeHandle

DocumentHandle OmniPageCSDK.RecPDF.Document.SafeHandle
get

RPDF_DOC C handle.

Exceptions
ObjectDisposedException Thrown when the Document object is already disposed.

Referenced by OmniPageCSDK.RecPDF.Operation.AddDocument(), and OmniPageCSDK.RecPDF.Operation.RotatePage().


RecAPI: OmniPageCSDK.RecPDF.Manager Class Reference

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • Manager
Public Member Functions | List of all members
OmniPageCSDK.RecPDF.Manager Class Referencesealed

Manager class for the RecPDF More...

Inherits IDisposable.

Public Member Functions

void | GetPDFSecurityInformation (string fileName, out Encryption encryption, out UIntPtr keySize, out Restrictions restrictions, out bool hasMasterPassword, out bool hasUserPassword)
Get PDF encryption information without opening it.
void | GetPDFSecurityInformation (string fileName, out Encryption encryption, out UIntPtr keySize)
Get PDF encryption information without opening it.
void | GetPDFSecurityInformation (string fileName, out Encryption encryption, out UIntPtr keySize, out Restrictions restrictions)
Get PDF encryption information without opening it.
void | GetPDFSecurityInformation (string fileName, out Encryption encryption, out UIntPtr keySize, out bool hasMasterPassword, out bool hasUserPassword)
Get PDF encryption information without opening it.
void | GetPDFSecurityInformation (string fileName, out Restrictions restrictions, out bool hasMasterPassword, out bool hasUserPassword)
Get PDF encryption information without opening it.
void | GetPDFSecurityInformation (string fileName, out Restrictions restrictions)
Get PDF encryption information without opening it.
void | GetPDFSecurityInformation (string fileName, out bool hasMasterPassword, out bool hasUserPassword)
Get PDF encryption information without opening it.
Document | OpenDocument (string fileName, string password)
Open a PDF file with password.
Document | OpenDocument (string fileName)
Open a PDF file.
Operation | CreateOperation (params Document[] documents)
Create an operation.
Operation | CreateOperation (int sid, params Document[] documents)
Create an operation.
Operation | CreateOperation (IEnumerable< Document > documents)
Create an operation.
Operation | CreateOperation (int sid, IEnumerable< Document > documents)
Create an operation.
void | Compact (string sourceFileName, string destinationFileName)
Compact a file on a new file name.
OptDocument | OptOpenDocument (string fileName)
Open a PDF file for optimization.
OptDocument | OptOpenDocument (string fileName, string password)
Open a PDF file for optimization.
void | Dispose ()
Quit from RecPDF.

Detailed Description

Manager class for the RecPDF

Inherited from the System.IDisposable interface. Because it uses its own thread synchronizations in .NET and in native codes, it is depended on the identity of the current physical operating system thread. That means it enters in thread affinity state at the constructor and quits the state in the destructor. In the meantime thread affinity mustn't be changed. Document and Operator objects will also be disposed when the Manager object is disposed. Because objects in the RecPDF are unavailable after uninitializing the RecPDF itself.

Member Function Documentation

◆ Compact()

void OmniPageCSDK.RecPDF.Manager.Compact | ( | string | sourceFileName,
 |  | string | destinationFileName )

Compact a file on a new file name.

Parameters
sourceFileName | Original file name
destinationFileName | Result file name

This writes out a compacted PDF file. However the old file won't change.

Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when one of the file names in the parameter list is null.
RecAPIError | Thrown when it failed to create the operation or failed to add the files.

◆ CreateOperation() [1/4]

Operation OmniPageCSDK.RecPDF.Manager.CreateOperation ( IEnumerable< Document > documents )

Create an operation.

Parameters
documents Documents taking part in the operation
Returns
Operation object

There is no need to pass all the documents taking part in the operation. New documents can be added later by the operation object's AddDocument method.

Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when the documents parameter or an element of the enumeration is null.
RecAPIError | Thrown when it failed to create the operation or failed to add the files.

◆ CreateOperation() [2/4]

Operation OmniPageCSDK.RecPDF.Manager.CreateOperation | ( | int | sid,
 |  | IEnumerable< Document > | documents )

Create an operation.

Parameters
sid | Settings Collection ID
documents | Documents taking part in the operation
Returns
Operation object

There is no need to pass all the documents taking part in the operation. New documents can be added later by the operation object's AddDocument method.

Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when the documents parameter or an element of the enumeration is null.
RecAPIError | Thrown when it failed to create the operation or failed to add the files.

◆ CreateOperation() [3/4]

Operation OmniPageCSDK.RecPDF.Manager.CreateOperation | ( | int | sid,
 |  | params Document[] | documents )

Create an operation.

Parameters
sid | Settings Collection ID
documents | Documents taking part in the operation
Returns
Operation object

There is no need to pass all the documents taking part in the operation. New documents can be added later by the operation object's AddDocument method.

Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when the documents parameter or an element of the array is null.
RecAPIError | Thrown when it failed to create the operation or failed to add the files.

◆ CreateOperation() [4/4]

Operation OmniPageCSDK.RecPDF.Manager.CreateOperation ( params Document[] documents )

Create an operation.

Parameters
documents Documents taking part in the operation
Returns
Operation object

There is no need to pass all the documents taking part in the operation. New documents can be added later by the operation object's AddDocument method.

Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when the documents parameter or an element of the array is null.
RecAPIError | Thrown when it failed to create the operation or failed to add the files.

◆ Dispose()

void OmniPageCSDK.RecPDF.Manager.Dispose ( )

Quit from RecPDF.

It doesn't throw any exception.

References OmniPageCSDK.RecPDF.Manager.Dispose().

Referenced by OmniPageCSDK.RecPDF.Manager.Dispose().

◆ GetPDFSecurityInformation() [1/7]

void OmniPageCSDK.RecPDF.Manager.GetPDFSecurityInformation | ( | string | fileName,
 |  | out bool | hasMasterPassword,
 |  | out bool | hasUserPassword )

Get PDF encryption information without opening it.

Parameters
fileName | PDF file name
hasMasterPassword | Whether the PDF file has master password
hasUserPassword | Whether the PDF file has user password
Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when the fileName parameter is null.
RecAPIError | Thrown when it failed to get the security information.

◆ GetPDFSecurityInformation() [2/7]

void OmniPageCSDK.RecPDF.Manager.GetPDFSecurityInformation | ( | string | fileName,
 |  | out Encryption | encryption,
 |  | out UIntPtr | keySize )

Get PDF encryption information without opening it.

Parameters
fileName | PDF file name
encryption | Encryption method of the PDF file
keySize | Key size

Security restrictions are calculated as if the PDF would be opened without password.

Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when the fileName parameter is null.
RecAPIError | Thrown when it failed to get the security information.

◆ GetPDFSecurityInformation() [3/7]

void OmniPageCSDK.RecPDF.Manager.GetPDFSecurityInformation | ( | string | fileName,
 |  | out Encryption | encryption,
 |  | out UIntPtr | keySize,
 |  | out bool | hasMasterPassword,
 |  | out bool | hasUserPassword )

Get PDF encryption information without opening it.

Parameters
fileName | PDF file name
encryption | Encryption method of the PDF file
keySize | Key size
hasMasterPassword | Whether the PDF file has master password
hasUserPassword | Whether the PDF file has user password
Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when the fileName parameter is null.
RecAPIError | Thrown when it failed to get the security information.

◆ GetPDFSecurityInformation() [4/7]

void OmniPageCSDK.RecPDF.Manager.GetPDFSecurityInformation | ( | string | fileName,
 |  | out Encryption | encryption,
 |  | out UIntPtr | keySize,
 |  | out Restrictions | restrictions )

Get PDF encryption information without opening it.

Parameters
fileName | PDF file name
encryption | Encryption method of the PDF file
keySize | Key size
restrictions | Restrictions on the PDF file

Security restrictions are calculated as if the PDF would be opened without password.

Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when the fileName parameter is null.
RecAPIError | Thrown when it failed to get the security information.

◆ GetPDFSecurityInformation() [5/7]

void OmniPageCSDK.RecPDF.Manager.GetPDFSecurityInformation | ( | string | fileName,
 |  | out Encryption | encryption,
 |  | out UIntPtr | keySize,
 |  | out Restrictions | restrictions,
 |  | out bool | hasMasterPassword,
 |  | out bool | hasUserPassword )

Get PDF encryption information without opening it.

Parameters
fileName | PDF file name
encryption | Encryption method of the PDF file
keySize | Key size
restrictions | Restrictions on the PDF file
hasMasterPassword | Whether the PDF file has master password
hasUserPassword | Whether the PDF file has user password

Security restrictions are calculated as if the PDF would be opened without password.

Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when the fileName parameter is null.
RecAPIError | Thrown when it failed to get the security information.

◆ GetPDFSecurityInformation() [6/7]

void OmniPageCSDK.RecPDF.Manager.GetPDFSecurityInformation | ( | string | fileName,
 |  | out Restrictions | restrictions )

Get PDF encryption information without opening it.

Parameters
fileName | PDF file name
restrictions | Restrictions on the PDF file

Security restrictions are calculated as if the PDF would be opened without password.

Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when the fileName parameter is null.
RecAPIError | Thrown when it failed to get the security information.

◆ GetPDFSecurityInformation() [7/7]

void OmniPageCSDK.RecPDF.Manager.GetPDFSecurityInformation | ( | string | fileName,
 |  | out Restrictions | restrictions,
 |  | out bool | hasMasterPassword,
 |  | out bool | hasUserPassword )

Get PDF encryption information without opening it.

Parameters
fileName | PDF file name
restrictions | Restrictions on the PDF file
hasMasterPassword | Whether the PDF file has master password
hasUserPassword | Whether the PDF file has user password

Security restrictions are calculated as if the PDF would be opened without password.

Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when the fileName parameter is null.
RecAPIError | Thrown when it failed to get the security information.

◆ OpenDocument() [1/2]

Document OmniPageCSDK.RecPDF.Manager.OpenDocument ( string fileName )

Open a PDF file.

Parameters
fileName PDF file name
Returns
Document object for the PDF file

For password protected PDF files use the 2 parameter version of this function.

Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when the fileName parameter is null.
RecAPIError | Thrown when it failed to open the PDF file.

◆ OpenDocument() [2/2]

Document OmniPageCSDK.RecPDF.Manager.OpenDocument | ( | string | fileName,
 |  | string | password )

Open a PDF file with password.

Parameters
fileName | PDF file name
password | Password
Returns
Document object for the PDF file

For password protected PDF files the owner password must be passed. Otherwise for not protected PDFs the password can be null.

Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when the fileName parameter is null.
RecAPIError | Thrown when it failed to open the PDF file.

◆ OptOpenDocument() [1/2]

OptDocument OmniPageCSDK.RecPDF.Manager.OptOpenDocument ( string fileName )

Open a PDF file for optimization.

Parameters
fileName Original file name

◆ OptOpenDocument() [2/2]

OptDocument OmniPageCSDK.RecPDF.Manager.OptOpenDocument | ( | string | fileName,
 |  | string | password )

Open a PDF file for optimization.

Parameters
fileName | Original file name
password | Password


RecAPI: OmniPageCSDK.RecPDF.Operation Class Reference

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • Operation
Public Member Functions | Properties | List of all members
OmniPageCSDK.RecPDF.Operation Class Referencesealed

A PDF operation. More...

Inherits IDisposable.

Public Member Functions

void | MovePage (Document document, int destPosition, params int[] srcPositions)
Move pages from one place to another place.
void | MovePage (Document document, int destPosition, IEnumerable< int > srcPositions)
Move pages from one place to another place.
void | AddDocument (Document document)
Add a PDF file to the operation.
void | CopyPage (Document destination, int destPosition, Document source, params int[] srcPositions)
Copy pages from one place to another place.
void | CopyPage (Document destination, int destPosition, Document source, IEnumerable< int > srcPositions)
Copy pages from one place to another place.
void | AppendPage (Document destination, Document source, params int[] srcPositions)
Copy pages from one place to the end of a PDF document.
void | AppendPage (Document destination, Document source, IEnumerable< int > srcPositions)
Copy pages from one place to the end of a PDF document.
void | DeletePage (Document destination, params int[] destPositions)
Delete pages from a document.
void | DeletePage (Document destination, IEnumerable< int > destPositions)
Delete pages from a document.
void | RotatePage (Rotation rotation, Document destination, int destPosition)
Rotate page in a document.
void | InsertImage (Document destination, int destPosition, bool imageOnly, params IntPtr[] srcPages)
Insert pages given by HPAGE.
void | InsertImage (Document destination, int destPosition, bool imageOnly, IEnumerable< IntPtr > srcPages)
Insert pages given by HPAGE.
void | AppendImage (Document destination, bool imageOnly, params IntPtr[] srcPages)
Insert pages given by HPAGE to the end of a PDF document.
void | AppendImage (Document destination, bool imageOnly, IEnumerable< IntPtr > srcPages)
Insert pages given by HPAGE to the end of a PDF document.
void | MergeText (Document destination, int destPosition, params IntPtr[] srcPages)
Insert a text content of the given HPAGE handles to the specified PDF pages.
void | MergeText (Document destination, int destPosition, IEnumerable< IntPtr > srcPages)
Insert a text content of the given HPAGE handles to the specified PDF pages.
void | Execute ()
Execute operation.
void | Dispose ()
Cancel the PDF operation.

Properties

IList< Document > | Documents [get]
List of documents taking part in this operation.
OperationHandle | SafeHandle [get]
RPDF_OPERATION C handle.

Detailed Description

A PDF operation.

Inherited from the System.IDisposable interface. With this object a series of PDF file manipulation can be achieved in an optimized way. The operations will be cumulated since the calling of Execute method, which disposes the object as well. All information got from the documents taking part in the operation shows the status of the document as if the file manipulation would taken place already, but really they will executed in the Execute method. To cancel the operation dispose it.

Member Function Documentation

◆ AddDocument()

void OmniPageCSDK.RecPDF.Operation.AddDocument ( Document document )

Add a PDF file to the operation.

Parameters
document PDF document
Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the parameter is null.
RecAPIError | Thrown when it failed to attach document to operation.

References OmniPageCSDK.RecPDF.Document.SafeHandle.

◆ AppendImage() [1/2]

void OmniPageCSDK.RecPDF.Operation.AppendImage | ( | Document | destination,
 |  | bool | imageOnly,
 |  | IEnumerable< IntPtr > | srcPages )

Insert pages given by HPAGE to the end of a PDF document.

Parameters
destination | Destination document
imageOnly | Without text
srcPages | Pages given HPAGE
Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the destination document or the source pages parameter is null.
RecAPIError | Thrown when it failed to insert HPAGEs.

◆ AppendImage() [2/2]

void OmniPageCSDK.RecPDF.Operation.AppendImage | ( | Document | destination,
 |  | bool | imageOnly,
 |  | params IntPtr[] | srcPages )

Insert pages given by HPAGE to the end of a PDF document.

Parameters
destination | Destination document
imageOnly | Without text
srcPages | Pages given by HPAGE
Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the destination document or the source pages parameter is null.
RecAPIError | Thrown when it failed to insert HPAGEs.

◆ AppendPage() [1/2]

void OmniPageCSDK.RecPDF.Operation.AppendPage | ( | Document | destination,
 |  | Document | source,
 |  | IEnumerable< int > | srcPositions )

Copy pages from one place to the end of a PDF document.

Parameters
destination | Destination document
source | Source document
srcPositions | Source page indices

The source and destination documents may be the same file.

Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the destination document or the source positions parameter is null.
RecAPIError | Thrown when it failed to copy the pages.

◆ AppendPage() [2/2]

void OmniPageCSDK.RecPDF.Operation.AppendPage | ( | Document | destination,
 |  | Document | source,
 |  | params int[] | srcPositions )

Copy pages from one place to the end of a PDF document.

Parameters
destination | Destination document
source | Source document
srcPositions | Source page indices

The source and destination documents may be the same file.

Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the destination document or the source positions parameter is null.
RecAPIError | Thrown when it failed to copy the pages.

◆ CopyPage() [1/2]

void OmniPageCSDK.RecPDF.Operation.CopyPage | ( | Document | destination,
 |  | int | destPosition,
 |  | Document | source,
 |  | IEnumerable< int > | srcPositions )

Copy pages from one place to another place.

Parameters
destination | Destination document
destPosition | Destination page index
source | Source document
srcPositions | Source page indices

The source and destination documents may be the same file. The pages will be inserted in order of listing before the destination page index. To append a file, do any of the following:

  • Set the destination page index to the count of pages in the destination file.
  • Set the destination page index to -1.
  • Use the AppendPage method.
Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the destination document or source positions parameter is null.
RecAPIError | Thrown when it failed to copy the pages.

◆ CopyPage() [2/2]

void OmniPageCSDK.RecPDF.Operation.CopyPage | ( | Document | destination,
 |  | int | destPosition,
 |  | Document | source,
 |  | params int[] | srcPositions )

Copy pages from one place to another place.

Parameters
destination | Destination document
destPosition | Destination page index
source | Source document
srcPositions | Source page indices

The source and destination documents may be the same file. The pages will be inserted in order of listing before the destination page index. To append a file, do any of the following:

  • Set the destination page index to the count of pages in the destination file.
  • Set the destination page index to -1.
  • Use the AppendPage method.
Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the destination document or the source positions parameter is null.
RecAPIError | Thrown when it failed to copy the pages.

◆ DeletePage() [1/2]

void OmniPageCSDK.RecPDF.Operation.DeletePage | ( | Document | destination,
 |  | IEnumerable< int > | destPositions )

Delete pages from a document.

Parameters
destination | Document
destPositions | Page indices
Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the destination document or the destination positions parameter is null.
RecAPIError | Thrown when it failed to delete pages.

◆ DeletePage() [2/2]

void OmniPageCSDK.RecPDF.Operation.DeletePage | ( | Document | destination,
 |  | params int[] | destPositions )

Delete pages from a document.

Parameters
destination | Document
destPositions | Page indices
Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the destination document or the destination positions parameter is null.
RecAPIError | Thrown when it failed to delete pages.

◆ Dispose()

void OmniPageCSDK.RecPDF.Operation.Dispose ( )

Cancel the PDF operation.

Can be called multiple times or after Execute as well. It doesn't throws any exception.

References OmniPageCSDK.RecPDF.Operation.Dispose().

Referenced by OmniPageCSDK.RecPDF.Operation.Dispose().

◆ Execute()

void OmniPageCSDK.RecPDF.Operation.Execute ( )

Execute operation.

After execution the operation will be automatically disposed. To cancel an operation dispose it instead of execution. If Dispose is called after Execute, it won't do anything, because the object has been already disposed.

Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
RecAPIError | Thrown when it failed to execute the operation.

◆ InsertImage() [1/2]

void OmniPageCSDK.RecPDF.Operation.InsertImage | ( | Document | destination,
 |  | int | destPosition,
 |  | bool | imageOnly,
 |  | IEnumerable< IntPtr > | srcPages )

Insert pages given by HPAGE.

Parameters
destination | Destination document
destPosition | Destination page index
imageOnly | Without text
srcPages | Pages given by HPAGE

The pages will be inserted in order of listing before the destination page index. To append a file, set the destination page index to the count of pages in the destination file or set it to -1.

Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the destination document or the source pages parameter is null.
RecAPIError | Thrown when it failed to insert HPAGEs.

◆ InsertImage() [2/2]

void OmniPageCSDK.RecPDF.Operation.InsertImage | ( | Document | destination,
 |  | int | destPosition,
 |  | bool | imageOnly,
 |  | params IntPtr[] | srcPages )

Insert pages given by HPAGE.

Parameters
destination | Destination document
destPosition | Destination page index
imageOnly | Without text
srcPages | Pages given by HPAGE

The pages will be inserted in order of listing before the destination page index. To append a file, set the destination page index to the count of pages in the destination file or set it to -1.

Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the destination document or the source pages parameter is null.
RecAPIError | Thrown when it failed to insert HPAGEs.

◆ MergeText() [1/2]

void OmniPageCSDK.RecPDF.Operation.MergeText | ( | Document | destination,
 |  | int | destPosition,
 |  | IEnumerable< IntPtr > | srcPages )

Insert a text content of the given HPAGE handles to the specified PDF pages.

Parameters
destination | Destination document
destPosition | First destination page index
srcPages | Pages given by HPAGE
Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the destination document or the source pages parameter is null.
RecAPIError | Thrown when it failed to merge text.

◆ MergeText() [2/2]

void OmniPageCSDK.RecPDF.Operation.MergeText | ( | Document | destination,
 |  | int | destPosition,
 |  | params IntPtr[] | srcPages )

Insert a text content of the given HPAGE handles to the specified PDF pages.

Parameters
destination | Destination document
destPosition | First destination page index
srcPages | Pages given by HPAGE
Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the destination document or the source pages parameter is null.
RecAPIError | Thrown when it failed to merge text.

◆ MovePage() [1/2]

void OmniPageCSDK.RecPDF.Operation.MovePage | ( | Document | document,
 |  | int | destPosition,
 |  | IEnumerable< int > | srcPositions )

Move pages from one place to another place.

Parameters
document | Document
destPosition | Destination page index
srcPositions | Source page indices

The pages will be inserted in order of listing before the destination page index. To append a file, set the destination page index to the count of pages in the destination file or set it to -1.

Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the destination document or the destination positions parameter is null.
RecAPIError | Thrown when it failed to move pages.

◆ MovePage() [2/2]

void OmniPageCSDK.RecPDF.Operation.MovePage | ( | Document | document,
 |  | int | destPosition,
 |  | params int[] | srcPositions )

Move pages from one place to another place.

Parameters
document | Document
destPosition | Destination page index
srcPositions | Source page indices

The pages will be inserted in order of listing before the destination page index. To append a file, set the destination page index to the count of pages in the destination file, or set it to -1.

Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the destination document or the destination positions parameter is null.
RecAPIError | Thrown when it failed to move pages.

◆ RotatePage()

void OmniPageCSDK.RecPDF.Operation.RotatePage | ( | Rotation | rotation,
 |  | Document | destination,
 |  | int | destPosition )

Rotate page in a document.

Parameters
rotation | Degree and direction of rotation
destination | Document
destPosition | Page index
Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
ParameterIsNullException | Thrown when the destination document parameter is null.
RecAPIError | Thrown when it failed to rotate the page.

References OmniPageCSDK.RecPDF.Document.SafeHandle.

Property Documentation

◆ Documents

IList<Document> OmniPageCSDK.RecPDF.Operation.Documents
get

List of documents taking part in this operation.

Exceptions
ObjectDisposedException | Thrown when the Operation object is already disposed.
RecAPIError | Thrown when it failed to get the list of documents.

◆ SafeHandle

OperationHandle OmniPageCSDK.RecPDF.Operation.SafeHandle
get

RPDF_OPERATION C handle.

Exceptions
ObjectDisposedException Thrown when the Operation object is already disposed.


RecAPI: OmniPageCSDK.RecPDF.OptDocument Class Reference

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • OptDocument
Public Member Functions | Properties | List of all members
OmniPageCSDK.RecPDF.OptDocument Class Referencesealed

A PDF document for PDF optimizing operations. More...

Inherits IDisposable.

Public Member Functions

void | OptAddCommand (string command)
...
void | Optimize (string fileName)
...
void | Dispose ()
Close the PDF document.

Properties

DocumentHandle SafeHandle [get]
RPDF_DOC C handle.

Detailed Description

A PDF document for PDF optimizing operations.

Inherited from the System.IDisposable interface. The Dispose method closes the file. This object represents a PDF document. The represented PDF document can be changed by a PDF operation (Operation) if the Document is attached to the Operation object.

Member Function Documentation

◆ Dispose()

void OmniPageCSDK.RecPDF.OptDocument.Dispose ( )

Close the PDF document.

It doesn't throw exceptions.

◆ OptAddCommand()

void OmniPageCSDK.RecPDF.OptDocument.OptAddCommand ( string command )

...

Parameters
command command

...

Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when the fileName parameter is null.
RecAPIError | Thrown when it failed to get the security information.

◆ Optimize()

void OmniPageCSDK.RecPDF.OptDocument.Optimize ( string fileName )

...

Parameters
fileName PDF file name

...

Exceptions
ObjectDisposedException | Thrown when the Manager object is already disposed.
ParameterIsNullException | Thrown when the fileName parameter is null.
RecAPIError | Thrown when it failed to get the security information.

Property Documentation

◆ SafeHandle

DocumentHandle OmniPageCSDK.RecPDF.OptDocument.SafeHandle
get

RPDF_DOC C handle.

Exceptions
ObjectDisposedException Thrown when the Document object is already disposed.


RecAPI: OmniPageCSDK.RecPDF.ParameterIsNullException Class Reference

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • ParameterIsNullException
Properties | List of all members
OmniPageCSDK.RecPDF.ParameterIsNullException Class Reference

Null parameter. More...

Inheritance diagram for OmniPageCSDK.RecPDF.ParameterIsNullException:
OmniPageCSDK.RecPDF.PDFException

Properties

string | ParameterName [get, set]
Invalid parameter name.
- Properties inherited from OmniPageCSDK.RecPDF.PDFException
ErrorType | ErrorType [get, set]
Type of error.

Detailed Description

Null parameter.

A parameter or an element of the parameter is null however it should contain an object. The ParameterName property shows the name of the parameter.

Property Documentation

◆ ParameterName

string OmniPageCSDK.RecPDF.ParameterIsNullException.ParameterName
getset

Invalid parameter name.

This is the same name that is used in this documentation. This is only a debug information so in later releases it may change without notice.


RecAPI: OmniPageCSDK.RecPDF.PDFException Class Reference

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • PDFException
Properties | List of all members
OmniPageCSDK.RecPDF.PDFException Class Referenceabstract

PDF exception. More...

Inheritance diagram for OmniPageCSDK.RecPDF.PDFException:
OmniPageCSDK.RecPDF.AlreadyInitializedException OmniPageCSDK.RecPDF.ParameterIsNullException OmniPageCSDK.RecPDF.RecAPIError

Properties

ErrorType ErrorType [get, set]
Type of error.

Detailed Description

PDF exception.

Abstract class inherited from the System.ApplicationException exception. The ErrorType is used to show what is the type of the error, but this information can be also gained from the runtime type of the exception class.


RecAPI: OmniPageCSDK.RecPDF.RecAPIError Class Reference

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • RecAPIError
Properties | List of all members
OmniPageCSDK.RecPDF.RecAPIError Class Reference

RecAPI error. More...

Inheritance diagram for OmniPageCSDK.RecPDF.RecAPIError:
OmniPageCSDK.RecPDF.PDFException

Properties

RECERR | ErrorCode [get, set]
RECERR error code.
- Properties inherited from OmniPageCSDK.RecPDF.PDFException
ErrorType | ErrorType [get, set]
Type of error.

Detailed Description

RecAPI error.

Thrown when an error occured in the RecAPI. the ErrorCode property will show the RECAPI error code.


RecAPI: OmniPageCSDK.RecPDF.RecPDF Class Reference

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • RecPDF
Static Public Member Functions | Properties | List of all members
OmniPageCSDK.RecPDF.RecPDF Class Reference

Main class for RecPDF. More...

Static Public Member Functions

static Manager Initialize ()
Initialize the RecPDF.

Properties

static Manager Manager [get]
The current instance of Manager object if it is already initialized.

Detailed Description

Main class for RecPDF.

This is a static factory class to create and store the Manager object as a singleton. The Initialize static method is responsible to create the Manager object, and it returns it as well. If the Manager object is already present, then the Initialize method throws an exception. It won't create a duplication. The Manager static property returns the Manager object too, but it won't create it. That way you can check the object without accidentally creating it. This can be useful, because creating the Manager object will call the rPdfInit function on the C API which might be slow. To uninitialize the RecPDF API the Dispose method of the Manager class should be called. This removes the object from the singleton too. To use the Manager object again, the Initialize method should be called again.

Member Function Documentation

◆ Initialize()

static Manager OmniPageCSDK.RecPDF.RecPDF.Initialize ( )
static

Initialize the RecPDF.

This must be the first method to call. To unitialize the RecPDF, the Dispose method of the Manager object should be called. Using of the 'using' instruction is advisable for intializion of RecPDF.

This example shows how to use using for initialization of RecPDF:

using (Manager manager = RecPDF.Initialize())
{
System.Console.WriteLine("PDF Password protected: {0}", manager.IsPDFPasswordProtected("test.pdf"));
}
OmniPageCSDK.RecPDF.Manager
Manager class for the RecPDF
Definition Manager.cs:42
OmniPageCSDK.RecPDF.RecPDF
Main class for RecPDF.
Definition RecPDF.cs:36
OmniPageCSDK.RecPDF.RecPDF.Initialize
static Manager Initialize()
Initialize the RecPDF.
Definition RecPDF.cs:97
Exceptions
AlreadyInitializedException | Thrown when a Manager object is already created.
RecAPIError | Thrown when the initialization failed.

References OmniPageCSDK.RecPDF.RecPDF.Manager.

Property Documentation

◆ Manager

Manager OmniPageCSDK.RecPDF.RecPDF.Manager
staticget

The current instance of Manager object if it is already initialized.

If the Manager object is not initialized, it will give you a null reference instead of an exception.

Referenced by OmniPageCSDK.RecPDF.RecPDF.Initialize().


RecAPI: Namespace Members

  • Namespace List
  • Namespace Members
  • All
  • Enumerations
Here is a list of all documented namespace members with links to the namespaces they belong to:
  • Encryption : OmniPageCSDK.RecPDF
  • ErrorType : OmniPageCSDK.RecPDF
  • Restrictions : OmniPageCSDK.RecPDF
  • Rotation : OmniPageCSDK.RecPDF


RecAPI: Namespace Members

  • Namespace List
  • Namespace Members
  • All
  • Enumerations
Here is a list of all documented namespace enums with links to the namespaces they belong to:
  • Encryption : OmniPageCSDK.RecPDF
  • ErrorType : OmniPageCSDK.RecPDF
  • Restrictions : OmniPageCSDK.RecPDF
  • Rotation : OmniPageCSDK.RecPDF


RecAPI: Class List

  • Class List
  • Class Hierarchy
  • Class Members
Class List
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 123]
▼N OmniPageCSDK |
▼N RecPDF |
C AlreadyInitializedException | RecPDF already initialized
C Document | A PDF document
C Manager | Manager class for the RecPDF
C Operation | A PDF operation
C OptDocument | A PDF document for PDF optimizing operations
C ParameterIsNullException | Null parameter
C PDFException | PDF exception
C RecAPIError | RecAPI error
C RecPDF | Main class for RecPDF
C _COMPRESSED_IMG_INFO | Basic physical information of a compressed image buffer
C _FoundText | Search result
C _IMG_INFO | Structure of an image containing basic physical information
C _OUTPUTCONVERTERINFO | Output document converter information (ANSI)
C _R_IOStreamfuncs | Container structure of the IOStream callback functions
C _RPPERRORS | Error list item
C _ZONE | ZONE structure
C BAR_INFO | Barcode information
C CELL_INFO | Structure of a cell in a table
C CLASSIFY_INFO | Structure for information about classification
C COMB_CELL_INFO | Structure of a comb-cell in a comb
C CUT_INFO | Structure for book images
C HNR_BOXDATA | Character box of HNR
C KRECMODULEINFO | Module info
C LANGUAGE_INFO | Language info
C LETTER | The LETTER structure
C LSPC | Additional information about the space character
C OUTPUTCONVERTERINFOW | Output document converter information (Unicode)
C PREPROC_INFO | Information about preprocessing
C PROGRESSMONITOR | Progress information
C RLINE | Structure of a line
C SEnumTypeElement | Descriptor structure of an enum type element
C STATISTIC | Recognition statistics
C ZONEDATA | ZONEDATA structure


RecAPI: Class Hierarchy

  • Class List
  • Class Hierarchy
  • Class Members
Class Hierarchy
This inheritance list is sorted roughly, but not completely, alphabetically:
[detail level 12]
C _COMPRESSED_IMG_INFO | Basic physical information of a compressed image buffer
C _FoundText | Search result
C _IMG_INFO | Structure of an image containing basic physical information
C _OUTPUTCONVERTERINFO | Output document converter information (ANSI)
C _R_IOStreamfuncs | Container structure of the IOStream callback functions
C _RPPERRORS | Error list item
C _ZONE | ZONE structure
C BAR_INFO | Barcode information
C CELL_INFO | Structure of a cell in a table
C CLASSIFY_INFO | Structure for information about classification
C COMB_CELL_INFO | Structure of a comb-cell in a comb
C CUT_INFO | Structure for book images
C OmniPageCSDK.RecPDF.Document | A PDF document
C HNR_BOXDATA | Character box of HNR
C KRECMODULEINFO | Module info
C LANGUAGE_INFO | Language info
C LETTER | The LETTER structure
C LSPC | Additional information about the space character
C OmniPageCSDK.RecPDF.Manager | Manager class for the RecPDF
C OmniPageCSDK.RecPDF.Operation | A PDF operation
C OmniPageCSDK.RecPDF.OptDocument | A PDF document for PDF optimizing operations
C OUTPUTCONVERTERINFOW | Output document converter information (Unicode)
▼C OmniPageCSDK.RecPDF.PDFException | PDF exception
C OmniPageCSDK.RecPDF.AlreadyInitializedException | RecPDF already initialized
C OmniPageCSDK.RecPDF.ParameterIsNullException | Null parameter
C OmniPageCSDK.RecPDF.RecAPIError | RecAPI error
C PREPROC_INFO | Information about preprocessing
C PROGRESSMONITOR | Progress information
C OmniPageCSDK.RecPDF.RecPDF | Main class for RecPDF
C RLINE | Structure of a line
C SEnumTypeElement | Descriptor structure of an enum type element
C STATISTIC | Recognition statistics
C ZONEDATA | ZONEDATA structure


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- a -

  • AddDocument() : OmniPageCSDK.RecPDF.Operation
  • AppendImage() : OmniPageCSDK.RecPDF.Operation
  • AppendPage() : OmniPageCSDK.RecPDF.Operation


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- b -

  • BarFlags : BAR_INFO
  • BarID : BAR_INFO
  • BarName : BAR_INFO
  • baseLine : LETTER
  • bcolor : CELL_INFO
  • BitsPerPixel : _COMPRESSED_IMG_INFO, _IMG_INFO
  • boundBoxes : _FoundText
  • box_height : HNR_BOXDATA
  • box_space : HNR_BOXDATA
  • box_width : HNR_BOXDATA
  • bstyle : CELL_INFO
  • bwidth : CELL_INFO
  • BytesPerLine : _IMG_INFO


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- c -

  • capHeight : LETTER
  • cellcolor : CELL_INFO
  • cellNum : LETTER
  • chk_control : _ZONE
  • chk_fn : _ZONE
  • chk_sect : _ZONE
  • cntChoices : LETTER
  • cntSuggestions : LETTER
  • code : LETTER
  • color : RLINE, ZONEDATA
  • Compact() : OmniPageCSDK.RecPDF.Manager
  • Compression : _COMPRESSED_IMG_INFO
  • confidence : CLASSIFY_INFO
  • CopyPage() : OmniPageCSDK.RecPDF.Operation
  • CreateOperation() : OmniPageCSDK.RecPDF.Manager


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- d -

  • DeletePage() : OmniPageCSDK.RecPDF.Operation
  • Dispose() : OmniPageCSDK.RecPDF.Document, OmniPageCSDK.RecPDF.Manager, OmniPageCSDK.RecPDF.Operation, OmniPageCSDK.RecPDF.OptDocument
  • DLL : _OUTPUTCONVERTERINFO, OUTPUTCONVERTERINFOW
  • Documents : OmniPageCSDK.RecPDF.Operation
  • DPI : _COMPRESSED_IMG_INFO, _IMG_INFO
  • dpi : CUT_INFO
  • DummyS : _COMPRESSED_IMG_INFO, _IMG_INFO


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- e -

  • end : RLINE
  • EnglishName : LANGUAGE_INFO
  • err : LETTER
  • ErrorCode : OmniPageCSDK.RecPDF.RecAPIError
  • ErrorType : OmniPageCSDK.RecPDF.PDFException
  • Execute() : OmniPageCSDK.RecPDF.Operation
  • Ext : _OUTPUTCONVERTERINFO, OUTPUTCONVERTERINFOW


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- f -

  • Filename : PROGRESSMONITOR
  • filter : _ZONE
  • first_x : CUT_INFO
  • flag : RLINE
  • flags : CELL_INFO
  • Flags : PREPROC_INFO
  • fm : _ZONE
  • fontAttrib : LETTER
  • foundLen : _FoundText
  • foundStart : _FoundText


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- g -

  • GetPDFSecurityInformation() : OmniPageCSDK.RecPDF.Manager


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- h -

  • HasPageText() : OmniPageCSDK.RecPDF.Document
  • HasText : OmniPageCSDK.RecPDF.Document
  • hDCClass : CLASSIFY_INFO
  • hDoc : _FoundText
  • height : LETTER


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- i -

  • iChrNumber : STATISTIC
  • iChrRejected : STATISTIC
  • iContinent : LANGUAGE_INFO
  • id : SEnumTypeElement
  • iDecompTime : STATISTIC
  • iLangGroup : LANGUAGE_INFO
  • info : CUT_INFO, LETTER
  • InitError : KRECMODULEINFO
  • Initialize() : OmniPageCSDK.RecPDF.RecPDF
  • InsertImage() : OmniPageCSDK.RecPDF.Operation
  • iPreprocTime : STATISTIC
  • iReadingTime : STATISTIC
  • iRecognitionTime : STATISTIC
  • iScanTime : STATISTIC
  • isFuzzy : _FoundText
  • IsPalette : _IMG_INFO
  • iWordNumber : STATISTIC


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- l -

  • lang : LETTER
  • lang2 : LETTER
  • LangID : LANGUAGE_INFO
  • last_x : CUT_INFO
  • lcolor : CELL_INFO
  • left : COMB_CELL_INFO, LETTER
  • letters : _FoundText
  • lstyle : CELL_INFO
  • lwidth : CELL_INFO


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- m -

  • makeup : LETTER
  • Manager : OmniPageCSDK.RecPDF.RecPDF
  • Matrix : PREPROC_INFO
  • MergeText() : OmniPageCSDK.RecPDF.Operation
  • MovePage() : OmniPageCSDK.RecPDF.Operation


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- n -

  • Name : _OUTPUTCONVERTERINFO, OUTPUTCONVERTERINFOW
  • Name_639_1 : LANGUAGE_INFO
  • Name_639_2B : LANGUAGE_INFO
  • Name_639_3 : LANGUAGE_INFO
  • Name_BCP_47 : LANGUAGE_INFO
  • Name_Int_3 : LANGUAGE_INFO
  • Name_Win_3 : LANGUAGE_INFO
  • ndxBGColor : LETTER
  • ndxChoices : LETTER
  • ndxExt : LETTER
  • ndxFGColor : LETTER
  • ndxFontFace : LETTER
  • ndxSuggestions : LETTER
  • next : _RPPERRORS
  • nLetters : _FoundText


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- o -

  • obj : _RPPERRORS
  • OpenDocument() : OmniPageCSDK.RecPDF.Manager
  • Operation : OmniPageCSDK.RecPDF.Document
  • OptAddCommand() : OmniPageCSDK.RecPDF.OptDocument
  • Optimize() : OmniPageCSDK.RecPDF.OptDocument
  • OptOpenDocument() : OmniPageCSDK.RecPDF.Manager


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- p -

  • page : _FoundText, _RPPERRORS
  • PageCount : OmniPageCSDK.RecPDF.Document
  • PageNumber : PROGRESSMONITOR
  • ParameterName : OmniPageCSDK.RecPDF.ParameterIsNullException
  • Path : OmniPageCSDK.RecPDF.Document
  • Percent : PROGRESSMONITOR
  • plist : RLINE
  • pointSize : LETTER
  • position : _FoundText
  • ProcessId : PROGRESSMONITOR


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- r -

  • raccess_stream : _R_IOStreamfuncs
  • rc : _RPPERRORS
  • rclose_stream : _R_IOStreamfuncs
  • rcolor : CELL_INFO
  • rcommit_stream : _R_IOStreamfuncs
  • rect : CELL_INFO
  • rectBBox : _ZONE
  • ref : CELL_INFO
  • Res : LSPC
  • Reserved : PROGRESSMONITOR
  • reserved1 : CLASSIFY_INFO
  • reserved2 : CLASSIFY_INFO
  • reserved_b : LETTER
  • right : COMB_CELL_INFO
  • ris_stream : _R_IOStreamfuncs
  • rm : _ZONE
  • rm_support : LANGUAGE_INFO
  • ropen_stream : _R_IOStreamfuncs
  • RotatePage() : OmniPageCSDK.RecPDF.Operation
  • Rotation : PREPROC_INFO
  • rread_stream : _R_IOStreamfuncs
  • rseek_stream : _R_IOStreamfuncs
  • rstyle : CELL_INFO
  • rtell_stream : _R_IOStreamfuncs
  • rtrim_stream : _R_IOStreamfuncs
  • rwidth : CELL_INFO
  • rwrite_stream : _R_IOStreamfuncs


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- s -

  • SafeHandle : OmniPageCSDK.RecPDF.Document, OmniPageCSDK.RecPDF.Operation, OmniPageCSDK.RecPDF.OptDocument
  • Size : _COMPRESSED_IMG_INFO, _IMG_INFO
  • Slope : PREPROC_INFO
  • spcCount : LSPC
  • spcInfo : LETTER
  • spcType : LSPC
  • start : RLINE
  • style : RLINE


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- t -

  • tcolor : CELL_INFO
  • top : LETTER
  • tstyle : CELL_INFO
  • twidth : CELL_INFO
  • type : _ZONE, CELL_INFO, RLINE


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- u -

  • userdata : _ZONE


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- v -

  • value : SEnumTypeElement
  • Version : KRECMODULEINFO


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- w -

  • width : LETTER, RLINE
  • widthULdot : LETTER
  • widthULgap : LETTER


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- x -

  • x : CUT_INFO


RecAPI: Class Members

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented class members with links to the class documentation for each member:

- z -

  • zone : LETTER


RecAPI: Class Members - Functions

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • a
  • c
  • d
  • e
  • g
  • h
  • i
  • m
  • o
  • r
Here is a list of all documented functions with links to the class documentation for each member:

- a -

  • AddDocument() : OmniPageCSDK.RecPDF.Operation
  • AppendImage() : OmniPageCSDK.RecPDF.Operation
  • AppendPage() : OmniPageCSDK.RecPDF.Operation

- c -

  • Compact() : OmniPageCSDK.RecPDF.Manager
  • CopyPage() : OmniPageCSDK.RecPDF.Operation
  • CreateOperation() : OmniPageCSDK.RecPDF.Manager

- d -

  • DeletePage() : OmniPageCSDK.RecPDF.Operation
  • Dispose() : OmniPageCSDK.RecPDF.Document, OmniPageCSDK.RecPDF.Manager, OmniPageCSDK.RecPDF.Operation, OmniPageCSDK.RecPDF.OptDocument

- e -

  • Execute() : OmniPageCSDK.RecPDF.Operation

- g -

  • GetPDFSecurityInformation() : OmniPageCSDK.RecPDF.Manager

- h -

  • HasPageText() : OmniPageCSDK.RecPDF.Document

- i -

  • Initialize() : OmniPageCSDK.RecPDF.RecPDF
  • InsertImage() : OmniPageCSDK.RecPDF.Operation

- m -

  • MergeText() : OmniPageCSDK.RecPDF.Operation
  • MovePage() : OmniPageCSDK.RecPDF.Operation

- o -

  • OpenDocument() : OmniPageCSDK.RecPDF.Manager
  • OptAddCommand() : OmniPageCSDK.RecPDF.OptDocument
  • Optimize() : OmniPageCSDK.RecPDF.OptDocument
  • OptOpenDocument() : OmniPageCSDK.RecPDF.Manager

- r -

  • RotatePage() : OmniPageCSDK.RecPDF.Operation


RecAPI: Class Members - Variables

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
  • b
  • c
  • d
  • e
  • f
  • h
  • i
  • l
  • m
  • n
  • o
  • p
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • z
Here is a list of all documented variables with links to the class documentation for each member:

- b -

  • BarFlags : BAR_INFO
  • BarID : BAR_INFO
  • BarName : BAR_INFO
  • baseLine : LETTER
  • bcolor : CELL_INFO
  • BitsPerPixel : _COMPRESSED_IMG_INFO, _IMG_INFO
  • boundBoxes : _FoundText
  • box_height : HNR_BOXDATA
  • box_space : HNR_BOXDATA
  • box_width : HNR_BOXDATA
  • bstyle : CELL_INFO
  • bwidth : CELL_INFO
  • BytesPerLine : _IMG_INFO

- c -

  • capHeight : LETTER
  • cellcolor : CELL_INFO
  • cellNum : LETTER
  • chk_control : _ZONE
  • chk_fn : _ZONE
  • chk_sect : _ZONE
  • cntChoices : LETTER
  • cntSuggestions : LETTER
  • code : LETTER
  • color : RLINE, ZONEDATA
  • Compression : _COMPRESSED_IMG_INFO
  • confidence : CLASSIFY_INFO

- d -

  • DLL : _OUTPUTCONVERTERINFO, OUTPUTCONVERTERINFOW
  • DPI : _COMPRESSED_IMG_INFO, _IMG_INFO
  • dpi : CUT_INFO
  • DummyS : _COMPRESSED_IMG_INFO, _IMG_INFO

- e -

  • end : RLINE
  • EnglishName : LANGUAGE_INFO
  • err : LETTER
  • Ext : _OUTPUTCONVERTERINFO, OUTPUTCONVERTERINFOW

- f -

  • Filename : PROGRESSMONITOR
  • filter : _ZONE
  • first_x : CUT_INFO
  • flag : RLINE
  • flags : CELL_INFO
  • Flags : PREPROC_INFO
  • fm : _ZONE
  • fontAttrib : LETTER
  • foundLen : _FoundText
  • foundStart : _FoundText

- h -

  • hDCClass : CLASSIFY_INFO
  • hDoc : _FoundText
  • height : LETTER

- i -

  • iChrNumber : STATISTIC
  • iChrRejected : STATISTIC
  • iContinent : LANGUAGE_INFO
  • id : SEnumTypeElement
  • iDecompTime : STATISTIC
  • iLangGroup : LANGUAGE_INFO
  • info : CUT_INFO, LETTER
  • InitError : KRECMODULEINFO
  • iPreprocTime : STATISTIC
  • iReadingTime : STATISTIC
  • iRecognitionTime : STATISTIC
  • iScanTime : STATISTIC
  • isFuzzy : _FoundText
  • IsPalette : _IMG_INFO
  • iWordNumber : STATISTIC

- l -

  • lang : LETTER
  • lang2 : LETTER
  • LangID : LANGUAGE_INFO
  • last_x : CUT_INFO
  • lcolor : CELL_INFO
  • left : COMB_CELL_INFO, LETTER
  • letters : _FoundText
  • lstyle : CELL_INFO
  • lwidth : CELL_INFO

- m -

  • makeup : LETTER
  • Matrix : PREPROC_INFO

- n -

  • Name : _OUTPUTCONVERTERINFO, OUTPUTCONVERTERINFOW
  • Name_639_1 : LANGUAGE_INFO
  • Name_639_2B : LANGUAGE_INFO
  • Name_639_3 : LANGUAGE_INFO
  • Name_BCP_47 : LANGUAGE_INFO
  • Name_Int_3 : LANGUAGE_INFO
  • Name_Win_3 : LANGUAGE_INFO
  • ndxBGColor : LETTER
  • ndxChoices : LETTER
  • ndxExt : LETTER
  • ndxFGColor : LETTER
  • ndxFontFace : LETTER
  • ndxSuggestions : LETTER
  • next : _RPPERRORS
  • nLetters : _FoundText

- o -

  • obj : _RPPERRORS

- p -

  • page : _FoundText, _RPPERRORS
  • PageNumber : PROGRESSMONITOR
  • Percent : PROGRESSMONITOR
  • plist : RLINE
  • pointSize : LETTER
  • position : _FoundText
  • ProcessId : PROGRESSMONITOR

- r -

  • raccess_stream : _R_IOStreamfuncs
  • rc : _RPPERRORS
  • rclose_stream : _R_IOStreamfuncs
  • rcolor : CELL_INFO
  • rcommit_stream : _R_IOStreamfuncs
  • rect : CELL_INFO
  • rectBBox : _ZONE
  • ref : CELL_INFO
  • Res : LSPC
  • Reserved : PROGRESSMONITOR
  • reserved1 : CLASSIFY_INFO
  • reserved2 : CLASSIFY_INFO
  • reserved_b : LETTER
  • right : COMB_CELL_INFO
  • ris_stream : _R_IOStreamfuncs
  • rm : _ZONE
  • rm_support : LANGUAGE_INFO
  • ropen_stream : _R_IOStreamfuncs
  • Rotation : PREPROC_INFO
  • rread_stream : _R_IOStreamfuncs
  • rseek_stream : _R_IOStreamfuncs
  • rstyle : CELL_INFO
  • rtell_stream : _R_IOStreamfuncs
  • rtrim_stream : _R_IOStreamfuncs
  • rwidth : CELL_INFO
  • rwrite_stream : _R_IOStreamfuncs

- s -

  • Size : _COMPRESSED_IMG_INFO, _IMG_INFO
  • Slope : PREPROC_INFO
  • spcCount : LSPC
  • spcInfo : LETTER
  • spcType : LSPC
  • start : RLINE
  • style : RLINE

- t -

  • tcolor : CELL_INFO
  • top : LETTER
  • tstyle : CELL_INFO
  • twidth : CELL_INFO
  • type : _ZONE, CELL_INFO, RLINE

- u -

  • userdata : _ZONE

- v -

  • value : SEnumTypeElement
  • Version : KRECMODULEINFO

- w -

  • width : LETTER, RLINE
  • widthULdot : LETTER
  • widthULgap : LETTER

- x -

  • x : CUT_INFO

- z -

  • zone : LETTER


RecAPI: Class Members - Properties

  • Class List
  • Class Hierarchy
  • Class Members
  • All
  • Functions
  • Variables
  • Properties
Here is a list of all documented properties with links to the class documentation for each member:
  • Documents : OmniPageCSDK.RecPDF.Operation
  • ErrorCode : OmniPageCSDK.RecPDF.RecAPIError
  • ErrorType : OmniPageCSDK.RecPDF.PDFException
  • HasText : OmniPageCSDK.RecPDF.Document
  • Manager : OmniPageCSDK.RecPDF.RecPDF
  • Operation : OmniPageCSDK.RecPDF.Document
  • PageCount : OmniPageCSDK.RecPDF.Document
  • ParameterName : OmniPageCSDK.RecPDF.ParameterIsNullException
  • Path : OmniPageCSDK.RecPDF.Document
  • SafeHandle : OmniPageCSDK.RecPDF.Document, OmniPageCSDK.RecPDF.Operation, OmniPageCSDK.RecPDF.OptDocument


RecAPI: Class Index

  • Class List
  • Class Hierarchy
  • Class Members
Class Index
A | B | C | D | H | K | L | M | O | P | R | S | Z | _
A
AlreadyInitializedException (OmniPageCSDK.RecPDF)
B
BAR_INFO
C
CELL_INFO
CLASSIFY_INFO
COMB_CELL_INFO
CUT_INFO
D
Document (OmniPageCSDK.RecPDF)
H
HNR_BOXDATA
K
KRECMODULEINFO
L
LANGUAGE_INFO
LETTER
LSPC
M
Manager (OmniPageCSDK.RecPDF)
O
Operation (OmniPageCSDK.RecPDF)
OptDocument (OmniPageCSDK.RecPDF)
OUTPUTCONVERTERINFOW
P
ParameterIsNullException (OmniPageCSDK.RecPDF)
PDFException (OmniPageCSDK.RecPDF)
PREPROC_INFO
PROGRESSMONITOR
R
RecAPIError (OmniPageCSDK.RecPDF)
RecPDF (OmniPageCSDK.RecPDF)
RLINE
S
SEnumTypeElement
STATISTIC
Z
ZONEDATA
_
_COMPRESSED_IMG_INFO
_FoundText
_IMG_INFO
_OUTPUTCONVERTERINFO
_R_IOStreamfuncs
_RPPERRORS
_ZONE


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • AlreadyInitializedException
OmniPageCSDK.RecPDF.AlreadyInitializedException Member List

This is the complete list of members for OmniPageCSDK.RecPDF.AlreadyInitializedException, including all inherited members.


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • Document
OmniPageCSDK.RecPDF.Document Member List

This is the complete list of members for OmniPageCSDK.RecPDF.Document, including all inherited members.

Dispose() | OmniPageCSDK.RecPDF.Document
HasPageText(int position) | OmniPageCSDK.RecPDF.Document
HasText | OmniPageCSDK.RecPDF.Document
Operation | OmniPageCSDK.RecPDF.Document
PageCount | OmniPageCSDK.RecPDF.Document
Path | OmniPageCSDK.RecPDF.Document
SafeHandle | OmniPageCSDK.RecPDF.Document


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • Manager
OmniPageCSDK.RecPDF.Manager Member List

This is the complete list of members for OmniPageCSDK.RecPDF.Manager, including all inherited members.

Compact(string sourceFileName, string destinationFileName) | OmniPageCSDK.RecPDF.Manager
CreateOperation(params Document[] documents) | OmniPageCSDK.RecPDF.Manager
CreateOperation(int sid, params Document[] documents) | OmniPageCSDK.RecPDF.Manager
CreateOperation(IEnumerable< Document > documents) | OmniPageCSDK.RecPDF.Manager
CreateOperation(int sid, IEnumerable< Document > documents) | OmniPageCSDK.RecPDF.Manager
Dispose() | OmniPageCSDK.RecPDF.Manager
GetPDFSecurityInformation(string fileName, out Encryption encryption, out UIntPtr keySize, out Restrictions restrictions, out bool hasMasterPassword, out bool hasUserPassword) | OmniPageCSDK.RecPDF.Manager
GetPDFSecurityInformation(string fileName, out Encryption encryption, out UIntPtr keySize) | OmniPageCSDK.RecPDF.Manager
GetPDFSecurityInformation(string fileName, out Encryption encryption, out UIntPtr keySize, out Restrictions restrictions) | OmniPageCSDK.RecPDF.Manager
GetPDFSecurityInformation(string fileName, out Encryption encryption, out UIntPtr keySize, out bool hasMasterPassword, out bool hasUserPassword) | OmniPageCSDK.RecPDF.Manager
GetPDFSecurityInformation(string fileName, out Restrictions restrictions, out bool hasMasterPassword, out bool hasUserPassword) | OmniPageCSDK.RecPDF.Manager
GetPDFSecurityInformation(string fileName, out Restrictions restrictions) | OmniPageCSDK.RecPDF.Manager
GetPDFSecurityInformation(string fileName, out bool hasMasterPassword, out bool hasUserPassword) | OmniPageCSDK.RecPDF.Manager
OpenDocument(string fileName, string password) | OmniPageCSDK.RecPDF.Manager
OpenDocument(string fileName) | OmniPageCSDK.RecPDF.Manager
OptOpenDocument(string fileName) | OmniPageCSDK.RecPDF.Manager
OptOpenDocument(string fileName, string password) | OmniPageCSDK.RecPDF.Manager


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • Operation
OmniPageCSDK.RecPDF.Operation Member List

This is the complete list of members for OmniPageCSDK.RecPDF.Operation, including all inherited members.

AddDocument(Document document) | OmniPageCSDK.RecPDF.Operation
AppendImage(Document destination, bool imageOnly, params IntPtr[] srcPages) | OmniPageCSDK.RecPDF.Operation
AppendImage(Document destination, bool imageOnly, IEnumerable< IntPtr > srcPages) | OmniPageCSDK.RecPDF.Operation
AppendPage(Document destination, Document source, params int[] srcPositions) | OmniPageCSDK.RecPDF.Operation
AppendPage(Document destination, Document source, IEnumerable< int > srcPositions) | OmniPageCSDK.RecPDF.Operation
CopyPage(Document destination, int destPosition, Document source, params int[] srcPositions) | OmniPageCSDK.RecPDF.Operation
CopyPage(Document destination, int destPosition, Document source, IEnumerable< int > srcPositions) | OmniPageCSDK.RecPDF.Operation
DeletePage(Document destination, params int[] destPositions) | OmniPageCSDK.RecPDF.Operation
DeletePage(Document destination, IEnumerable< int > destPositions) | OmniPageCSDK.RecPDF.Operation
Dispose() OmniPageCSDK.RecPDF.Operation
Documents OmniPageCSDK.RecPDF.Operation
Execute() OmniPageCSDK.RecPDF.Operation
InsertImage(Document destination, int destPosition, bool imageOnly, params IntPtr[] srcPages) | OmniPageCSDK.RecPDF.Operation
InsertImage(Document destination, int destPosition, bool imageOnly, IEnumerable< IntPtr > srcPages) | OmniPageCSDK.RecPDF.Operation
MergeText(Document destination, int destPosition, params IntPtr[] srcPages) | OmniPageCSDK.RecPDF.Operation
MergeText(Document destination, int destPosition, IEnumerable< IntPtr > srcPages) | OmniPageCSDK.RecPDF.Operation
MovePage(Document document, int destPosition, params int[] srcPositions) | OmniPageCSDK.RecPDF.Operation
MovePage(Document document, int destPosition, IEnumerable< int > srcPositions) | OmniPageCSDK.RecPDF.Operation
RotatePage(Rotation rotation, Document destination, int destPosition) | OmniPageCSDK.RecPDF.Operation


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • OptDocument
OmniPageCSDK.RecPDF.OptDocument Member List

This is the complete list of members for OmniPageCSDK.RecPDF.OptDocument, including all inherited members.

Dispose() OmniPageCSDK.RecPDF.OptDocument
OptAddCommand(string command) | OmniPageCSDK.RecPDF.OptDocument
Optimize(string fileName) | OmniPageCSDK.RecPDF.OptDocument


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • ParameterIsNullException
OmniPageCSDK.RecPDF.ParameterIsNullException Member List

This is the complete list of members for OmniPageCSDK.RecPDF.ParameterIsNullException, including all inherited members.


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • PDFException
OmniPageCSDK.RecPDF.PDFException Member List

This is the complete list of members for OmniPageCSDK.RecPDF.PDFException, including all inherited members.


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • RecAPIError
OmniPageCSDK.RecPDF.RecAPIError Member List

This is the complete list of members for OmniPageCSDK.RecPDF.RecAPIError, including all inherited members.


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
  • OmniPageCSDK
  • RecPDF
  • RecPDF
OmniPageCSDK.RecPDF.RecPDF Member List

This is the complete list of members for OmniPageCSDK.RecPDF.RecPDF, including all inherited members.

Initialize() | OmniPageCSDK.RecPDF.RecPDF | static
Manager | OmniPageCSDK.RecPDF.RecPDF | static


RecAPI: PDFAsmNet Directory Reference

  • Release
  • Engine
  • Imf
  • PDFASM
  • PDFAsmNet
PDFAsmNet Directory Reference


RecAPI: Include Directory Reference

  • Release
  • Engine
  • Include
Include Directory Reference


RecAPI: Release Directory Reference

  • Release
Release Directory Reference


RecAPI: Imf Directory Reference

  • Release
  • Engine
  • Imf
Imf Directory Reference


RecAPI: Engine Directory Reference

  • Release
  • Engine
Engine Directory Reference

Directories

Include


RecAPI: PDFASM Directory Reference

  • Release
  • Engine
  • Imf
  • PDFASM
PDFASM Directory Reference

Directories

PDFAsmNet


RecAPI: Related Pages

Related Pages
Here is a list of all related documentation pages:
[detail level 12]
RecAPI .NET Support
RecAPI Java support
RecAPI Python support
Multi-threading in RecAPI
Building a robust 24/7 conversion module
PDF Files in OmniPage Capture SDK 2025.1
Processing screen captures
Processing handwritten text
Processing legal documents
Useful notes about debugging CSDK integration
▼ Spell Checking Module related pages
Language Dictionary List
Vertical Dictionary List
▼ Language, Character Set and Code page Handling Module related pages
Character Set and Filters in the Engine
Supported characters with the CCJK languages
Right-to-left language support
OCR special filling methods
Language identifiers
Code Pages in the Engine
Non-Asian languages and characters
Languages, geography, Code Pages
Languages and modules
Characters, languages, modules
Characters (punctuation/miscellaneous) and modules
▼ Image File Handling Module related pages
Image File Format List
▼ Form Recognition Module related pages
Retrieved data format of kRecGetFindFormTemplateInfo
▼ Scanner related pages
Standard paper sizes
▼ Output formats of RecAPIPlus
Output Converters and Output Levels
Vertical text support of the converters
XML output format
▼ RecPDFAPI related pages
Command strings of rPdfOptAddCommandStr
▼ List of all the RecAPI settings
List of all the Converter settings of RecAPI


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
_COMPRESSED_IMG_INFO Member List

This is the complete list of members for _COMPRESSED_IMG_INFO, including all inherited members.

BitsPerPixel | _COMPRESSED_IMG_INFO
Compression | _COMPRESSED_IMG_INFO
DPI | _COMPRESSED_IMG_INFO
DummyS | _COMPRESSED_IMG_INFO
Size | _COMPRESSED_IMG_INFO


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
_FoundText Member List

This is the complete list of members for _FoundText, including all inherited members.

boundBoxes | _FoundText
foundLen | _FoundText
foundStart | _FoundText
hDoc | _FoundText
isFuzzy | _FoundText
letters | _FoundText
nLetters | _FoundText
page | _FoundText
position | _FoundText


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
_IMG_INFO Member List

This is the complete list of members for _IMG_INFO, including all inherited members.

BitsPerPixel | _IMG_INFO
BytesPerLine | _IMG_INFO
DPI | _IMG_INFO
DummyS | _IMG_INFO
IsPalette | _IMG_INFO
Size | _IMG_INFO


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
_OUTPUTCONVERTERINFO Member List

This is the complete list of members for _OUTPUTCONVERTERINFO, including all inherited members.


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
_R_IOStreamfuncs Member List

This is the complete list of members for _R_IOStreamfuncs, including all inherited members.

raccess_stream | _R_IOStreamfuncs
rclose_stream | _R_IOStreamfuncs
rcommit_stream | _R_IOStreamfuncs
ris_stream | _R_IOStreamfuncs
ropen_stream | _R_IOStreamfuncs
rread_stream | _R_IOStreamfuncs
rseek_stream | _R_IOStreamfuncs
rtell_stream | _R_IOStreamfuncs
rtrim_stream | _R_IOStreamfuncs
rwrite_stream | _R_IOStreamfuncs


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
_RPPERRORS Member List

This is the complete list of members for _RPPERRORS, including all inherited members.

next | _RPPERRORS
obj | _RPPERRORS
page | _RPPERRORS
rc | _RPPERRORS


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
_ZONE Member List

This is the complete list of members for _ZONE, including all inherited members.

chk_control | _ZONE
chk_fn | _ZONE
chk_sect | _ZONE
filter | _ZONE
fm | _ZONE
rectBBox | _ZONE
rm | _ZONE
type | _ZONE
userdata | _ZONE


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
BAR_INFO Member List

This is the complete list of members for BAR_INFO, including all inherited members.


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
CELL_INFO Member List

This is the complete list of members for CELL_INFO, including all inherited members.

bcolor | CELL_INFO
bstyle | CELL_INFO
bwidth | CELL_INFO
cellcolor | CELL_INFO
flags | CELL_INFO
lcolor | CELL_INFO
lstyle | CELL_INFO
lwidth | CELL_INFO
rcolor | CELL_INFO
rect | CELL_INFO
ref | CELL_INFO
rstyle | CELL_INFO
rwidth | CELL_INFO
tcolor | CELL_INFO
tstyle | CELL_INFO
twidth | CELL_INFO
type | CELL_INFO


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
CLASSIFY_INFO Member List

This is the complete list of members for CLASSIFY_INFO, including all inherited members.

confidence | CLASSIFY_INFO
hDCClass | CLASSIFY_INFO
reserved1 | CLASSIFY_INFO
reserved2 | CLASSIFY_INFO


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
COMB_CELL_INFO Member List

This is the complete list of members for COMB_CELL_INFO, including all inherited members.


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
CUT_INFO Member List

This is the complete list of members for CUT_INFO, including all inherited members.

dpi | CUT_INFO
first_x | CUT_INFO
info | CUT_INFO
last_x | CUT_INFO
x | CUT_INFO


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
HNR_BOXDATA Member List

This is the complete list of members for HNR_BOXDATA, including all inherited members.


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
KRECMODULEINFO Member List

This is the complete list of members for KRECMODULEINFO, including all inherited members.


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
LANGUAGE_INFO Member List

This is the complete list of members for LANGUAGE_INFO, including all inherited members.

EnglishName | LANGUAGE_INFO
iContinent | LANGUAGE_INFO
iLangGroup | LANGUAGE_INFO
LangID | LANGUAGE_INFO
Name_639_1 | LANGUAGE_INFO
Name_639_2B | LANGUAGE_INFO
Name_639_3 | LANGUAGE_INFO
Name_BCP_47 | LANGUAGE_INFO
Name_Int_3 | LANGUAGE_INFO
Name_Win_3 | LANGUAGE_INFO
rm_support | LANGUAGE_INFO


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
LETTER Member List

This is the complete list of members for LETTER, including all inherited members.

baseLine | LETTER
capHeight | LETTER
cellNum | LETTER
cntChoices | LETTER
cntSuggestions | LETTER
code | LETTER
err | LETTER
fontAttrib | LETTER
height | LETTER
info | LETTER
lang | LETTER
lang2 | LETTER
left | LETTER
makeup | LETTER
ndxBGColor | LETTER
ndxChoices | LETTER
ndxExt | LETTER
ndxFGColor | LETTER
ndxFontFace | LETTER
ndxSuggestions | LETTER
pointSize | LETTER
reserved_b | LETTER
spcInfo | LETTER
top | LETTER
width | LETTER
widthULdot | LETTER
widthULgap | LETTER
zone | LETTER


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
LSPC Member List

This is the complete list of members for LSPC, including all inherited members.


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
OUTPUTCONVERTERINFOW Member List

This is the complete list of members for OUTPUTCONVERTERINFOW, including all inherited members.


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
PREPROC_INFO Member List

This is the complete list of members for PREPROC_INFO, including all inherited members.

Flags | PREPROC_INFO
Matrix | PREPROC_INFO
Rotation | PREPROC_INFO
Slope | PREPROC_INFO


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
PROGRESSMONITOR Member List

This is the complete list of members for PROGRESSMONITOR, including all inherited members.

Filename | PROGRESSMONITOR
PageNumber | PROGRESSMONITOR
Percent | PROGRESSMONITOR
ProcessId | PROGRESSMONITOR
Reserved | PROGRESSMONITOR


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
RLINE Member List

This is the complete list of members for RLINE, including all inherited members.

color | RLINE
end | RLINE
flag | RLINE
plist | RLINE
start | RLINE
style | RLINE
type | RLINE
width | RLINE


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
SEnumTypeElement Member List

This is the complete list of members for SEnumTypeElement, including all inherited members.


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
STATISTIC Member List

This is the complete list of members for STATISTIC, including all inherited members.

iChrNumber | STATISTIC
iChrRejected | STATISTIC
iDecompTime | STATISTIC
iPreprocTime | STATISTIC
iReadingTime | STATISTIC
iRecognitionTime | STATISTIC
iScanTime | STATISTIC
iWordNumber | STATISTIC


RecAPI: Member List

  • Class List
  • Class Hierarchy
  • Class Members
ZONEDATA Member List

This is the complete list of members for ZONEDATA, including all inherited members.