Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
OCR.Initialize
Initializes tesseract.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| OCR | 2.9 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| Path | The path to the folder where to find tessdata folder. | $path |
| Lang | The language to use. | "eng" |
Result
Returns OK on success.
Description
Initializes tesseract.Pass path to parent folder of tessdata folder and language you need.
The language is (usually) an ISO 639-3 string.
To use multiple languages, please concat them with plus sign: e.g. "eng+deu"
You find our language files archive here:
http://www.monkeybreadsoftware.de/xojo/download/plugin/Libs/Tesseract/
This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.
Examples
Initialize with tessdata folder in same folder as database for english:
set variable $databasePath to Get(FilePath)
set variable $databasePath to MBS("Path.FileMakerPathToNativePath"; $databasePath)
set variable $databasePath to Substitute ( $databasePath ; ".fp7" ; ".fmp12")
set variable $databaseName to Get(FileName) & ".fmp12"
set variable $path to Substitute ( $databasePath ; $databaseName ; "" )
set variable $r to MBS( "OCR.Initialize"; $path; "eng")
Initialize on Server with tessdata in Server folder:
MBS( "OCR.Initialize"; "/Library/FileMaker Server/"; "eng")
Initialize on demand:
If [MBS("OCR.IsInitialized") ≠ 1]
Set Variable [$r; Value:MBS( "OCR.Initialize"; "/Library/FileMaker Server/"; "eng")]
End If
See also
- Java.Initialize
- OCR.GetText
- OCR.GetTextWithCoordinates
- OCR.IsInitialized
- Path.FileMakerPathToNativePath
- Proj.Initialize
- TAPI.Initialize
- WIA.Initialize
- XL.Initialize
Example Databases
Created 18th August 2014, last changed 10th May 2018
OCR.GetVariable - OCR.IsInitialized
Feedback: Report problem or ask question.
Links
MBS Xojo PDF Plugins