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?

asked 19 Apr '14, 01:10

amirabiri's gravatar image

amirabiri
1


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.

link

answered 21 Apr '14, 14:09

Julia%20Anikushina's gravatar image

Julia Anikus... ♦♦
3628

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×39
×36

Asked: 19 Apr '14, 01:10

Seen: 875 times

Last updated: 21 Apr '14, 14:09

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal