Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5   7.6    Statistic  

OCR.SetImage

Provide an image for Tesseract to recognize.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
OCR 2.9 Yes Yes Yes Yes Yes

MBS( "OCR.SetImage"; imageRef )

Parameters

Parameter Description Example value
imageRef The image reference. Use functions like GMImage.NewFromContainer to get an image reference. $img

Result

Returns OK on success.

Description

Provide an image for Tesseract to recognize.
The plugin makes a copy of the image.

Please do not pass PDF files. For PDF you either need to extract image (for scans) or raster PDF pages as images. Our functions PDFKit.GetPDFPageImage or DynaPDF.RenderPage can help here.
If the PDF file contains real text, please use PDFKit.GetPDFText, PDFKit.GetPDFPageText, DynaPDF.ExtractText, DynaPDF.ExtractPageText or DynaPDF.ExtractPageRectText. This will not do OCR, but extract the text directly.

Examples

Set image reference:

MBS( "OCR.SetImage"; $img )

See also

Example Databases


OCR.Recognize   -   OCR.SetPageSegMode

Feedback: Report problem or ask question.




Links
MBS FileMaker blog