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:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Initializes tesseract.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
OCR | 2.9 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example | Flags |
---|---|---|---|
Path | The path to the folder where to find tessdata folder. | $path | |
Lang | The language to use. | "eng" | |
Options | For tessertact 4 or newer, pass here optional option list. | Optional |
Returns OK on success.
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 ; "tessdata" )
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
Initialize with hard coded path:
Set Variable [ $path ; Value: "/Users/cs/Tesseract/tesseract4/tessdata" ]
Set Variable [ $r ; Value: MBS( "OCR.Initialize"; $path; "eng") ]
Initialize for chinese:
Set Variable [ $r ; Value: MBS( "OCR.Initialize"; $path; "chi_sim") ]
This function is free to use.
Created 18th August 2014, last changed 4th March 2023