Question about Language Setting of FineReader Visual Components (Image Viewer)

  • Last Post 22 February 2017
Apinan Tourist posted this 08 February 2017

Dear Expert

I develop some windows form app having the Image Viewer (FineReader SDK 10.5) as shown below

Sample Screen

then I follow this step

  • Drag the Text Block over some text
  • Set Language to "Thai"
  • Hit Save button (calling FRDocument.SaveToFolder(path))
  • Close the form
  • Reopen the form
  • Hit Load button (calling FRDocument.LoadFromFolder(path))
  • The Language shows (Default) instead of "Thai"

The questiong is How can I restore the Language I set earlier?

I also try to programmatically set the Language by the below code, but it still show (Default).

TextBlock tb = frDoc.Pages[0].Layout.Blocks[0].GetAsTextBlock();
RecognizerParams rp = engine.CreateRecognizerParams();
tb.RecognizerParams = rp;

Please help

Thank you


Order By: Standard | Newest | Votes
Anna Borina posted this 20 February 2017

Indeed, the language of the block becomes "Default" after reopening the document. However if you recognize the document after you open it the second time, the recognition result will be correct (the text will be recognized in Thai in your scenario).

If you need a field that will show the correct language you can create a combobox with languages outside the ImageViewer and do the following:

  • Update the value of the combobox once you open a new document.
  • Change the value of "TextBlock.RecognizerParams.TextLanguage" when you change the value of the combobox.

Apinan Tourist posted this 22 February 2017

While waiting for some advice, I did it already as you told exactly. Thank you so much. :)