Hey there,

we are using Abbyy Finereader SDK 10 and noticed, that PageAdded event is not fired in some cases, when we're importing pages. Our codes lookes like

FRDocument document = _Engine.CreateFRDocument();
document.Pages.PageAdded += Document_PageAdded;
//Initialize password callback and creating PrepareImageMode object
document.AddImageFileWithPasswordCallback(path, passwordCallback, prepareImageMode);

The registered EventHandler for Page_Added is not entered in some cases and we couldn't see a regularity in this.

Thanks for your help.

asked 14 Nov '13, 13:18

Philipp%20Eger's gravatar image

Philipp Eger

This behavior can occur when one subscribes for events of the FRPages object, but does not keep a reference to this object. At some point the Garbage Collector frees the FRPages object (as there are no references to it) and information about its subscribers is lost.

As a solution we can recommend you to keep the reference to the FRPages object in some class member without letting it die.

Hope this information will be useful for you. In case these recommendations do not solve the issue, please send us the simple sample project to SDK_support@abbyy.com with which we could reproduce the issue.


answered 15 Nov '13, 11:11

Julia%20Anikushina's gravatar image

Julia Anikus... ♦♦

Thanks for your help. Your hint helped us a lot, now we save an explicit reference of the pages collection and it seems to work after our first test.

(15 Nov '13, 12:58) Philipp Eger
Your answer
toggle preview

Follow this question

By Email:

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



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



Asked: 14 Nov '13, 13:18

Seen: 5,427 times

Last updated: 15 Nov '13, 12:58

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