Hi, I'm using ABBY SDK 10-0-9-89.

I'm trying to Analyze the page and then transform it and analyze again:

page.Analyze(pageProcessingParams);
page.ImageDocument.Transform(RotationTypeEnum.RT_Clockwise, false, false);
page.Analyze(pageProcessingParams);

But transformation crashes with exception:

System.Runtime.InteropServices.COMException: Cannot modify the page image. Remove all blocks and separators from the page layout and try again. at FREngine.IImageDocument.Transform(RotationTypeEnum Rotation, Boolean Mirror, Boolean Invert)

And I do not do anything else just loaded document and trying to perform those operations on a page. Any ideas please what's wrong and how it can be worked around?

asked 04 Aug '15, 18:08

Kreol's gravatar image

Kreol
133


The issue occurs because the page layout is not empty and to use the IImageDocument::Transform method you should firstly remove all blocks from the page layout. To do it, call the ILayoutBlocks::RemoveAll method for each of the ILayout::Blocks, ILayout::BlackSeparators, ILayout::VisualBlocks collections of the corresponding layout. The fact is that during the first call of the IFRPage::Analyze method ABBYY FineReader Engine has already detected some certain blocks and put them to the Layout object for your page.

link

answered 05 Aug '15, 08:06

Oksana%20Serdyuk's gravatar image

Oksana Serdyuk ♦♦
1.5k16

edited 05 Aug '15, 16:18

Thanks Oksana, now I can see some sense in this behavior. But still suggested solution does not work. Now I'm trying this:

page.Analyze(pageProcessingParams);

page.Layout.BlackSeparators.RemoveAll();

page.Layout.Blocks.RemoveAll();

page.Layout.VisualBlocks.RemoveAll();

page.ImageDocument.Transform(RotationTypeEnum.RT_Clockwise, false, false);

page.Analyze(pageProcessingParams);

And still getting the same exception.

(05 Aug '15, 11:45) Kreol

I have reproduced the issue using FineReader Engine 10. I will forward this information to the developers and will create the corresponding reclamation. Hope that the fix will be available in next release of the program.

This issue is already fixed in FineReader Engine 11. Could you please contact your sales manager to upgrade the program up to the current version? Or you can send your serial number to SDK_Support@abbyy.com and we will send your request to your region sales manager.

(05 Aug '15, 19:18) Oksana Serdyuk ♦♦

Thank you Oksana for your investigation and help! I'll try to upgrade the library.

(06 Aug '15, 11:18) Kreol
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:

×7

Asked: 04 Aug '15, 18:08

Seen: 646 times

Last updated: 06 Aug '15, 14:32

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