Hi,
I'm trying to define a region to be recognized using the Hello sample and the C# version in https://forum.ocrsdk.com/thread/1498-fr10-engine-how-to-only-recognize-specified-region-of-the-image/
------------------------------------------
// // Remove all the blocks from the collection
document.Pages[0].Layout.Blocks.RemoveAll();
// // Create region and specify its coordinates
IRegion region = engine.CreateRegion();
region.AddRect(0, 100, 500, 125); // Left,Top,Right,Bottom
// // Add blocks of required type to the layout
document.Pages[0].Layout.AddBlock(IBlock.IBlockTypeEnum.BT_Text, region);
------------------------------------------
However, I'm getting errors for the Pages and IBlockEnum symbols, as follows:
Hello.java:172: error: cannot find symbol
document.Pages[0].Layout.Blocks.RemoveAll();
^
symbol: variable Pages
location: variable document of type IFRDocument
Hello.java:179: error: cannot find symbol
document.Pages[0].Layout.AddBlock(IBlock.IBlockTypeEnum.BT_Text, region);
^
symbol: variable IBlockTypeEnum
location: class IBlock
Hello.java:179: error: cannot find symbol
document.Pages[0].Layout.AddBlock(IBlock.IBlockTypeEnum.BT_Text, region);
^
symbol: variable Pages
location: variable document of type IFRDocument
3 errors
------------------------------------------
May I know the correct syntax in Java?
FYI, I'm using FRE11 for Linux (Trial version) and Java 1.8.
Thanks very much.
Comments
2 comments
Hi!
Java syntax is slightly different from the C# syntax:
yes, however, you know in PHP a single code error you may cause trouble. I appreciate your work I read you are trying to define a region to be recognized using the Hello sample. it difficult but not impossible if you are using write syntax or code it would be possible www.resumeshelpservice.com/careers-booster-com-review. You could get an error while working on it do it with hard work and mindfully.
Please sign in to leave a comment.