Community

ImageDocument.Modify throws error with SDK 10.0.11 but not SDK 10.0.8

I have the following code snippet somewhere in our application server code:

page.Layout.Blocks.RemoveAll();
page.Layout.BlackSeparators.RemoveAll();
page.Layout.VisualBlocks.RemoveAll();
page.ImageDocument.Modify(imageModification);

This code applies a crop modification to the image.

This code works fine on our production servers for over a year now, where SDK 10.0.8.109 is installed. However, on a new dev machine we've installed the latest version we have available, which is 10.0.11.98, and the exact same code is throwing the following exception:

System.Runtime.InteropServices.COMException (0x80004005): Cannot modify the page image. Remove all blocks and separators from the page layout and try again.
   at FREngine.IImageDocument.Modify(ImageModification Modification)
   at SaverrOCR.Program.simpleCrop(IFRPage page)
   at SaverrOCR.Program.recognizeImage(IFRPage page)
   at SaverrOCR.Program.ProcessTextImage()
   at SaverrOCR.Program.processWithEngine()

So something is obviously wrong here, we are doing what the error message suggests we should do, and the same code was previously working. Is it a bug in the engine? Or are we missing something else?

Was this article helpful?

0 out of 0 found this helpful

Comments

1 comment

  • Avatar
    Julia Anikushina

    The provided code snippet has no mistakes.

    In order we could have a better look at the issue could you please send us a simple sample project with which we could reproduce the issue? The contact details can be found here: http://knowledgebase.ocrsdk.com/article/1397.

    0

Please sign in to leave a comment.