WinForms - How to continously add Annotations

Questions, comments and suggestions concerning VintaSoft Annotation .NET Plug-in.

Moderator: Alex

Post Reply
farangkao
Posts: 3
Joined: Sun Apr 22, 2018 12:48 pm

WinForms - How to continously add Annotations

Post by farangkao » Sun Apr 22, 2018 12:57 pm

Hi there,

i'm currently testing your Product as a possible replacement for our old library.

Everything looks very good so far, your Library is really well done.

However i struggle to implement in Code the behavior that we had before:
if the user set a Mode (like "Add Lines") ,he can add lines until he switches the Mode to "Selection" or similar.

I've tried to use the Method PdfAnnotationTool.AddAndBuildAnnotation(annotation);

Which works so far. I figured i call this Method after the Event "BuildingFinished" has fired.

But: When i press Escape and i call the AddAndBuildAnnotation again in Code, the Application crashes.

System.ArgumentOutOfRangeException in Vintasoft.Imaging.dll

I then tried to figure out what circumstances this is comming from.
I noticed that the Event AnnotationViewChanged is called twice with RemoveItem just before the crash.
So i presume that is the root cause.

What is the Proper way ,to achieve my goal, so that the user doesn't has to click the command multiple times to draw/add annotations?

Is there a better Event to subscribe to, so it doesn't interfere with the Interaction?

Alex
Site Admin
Posts: 1506
Joined: Thu Jul 10, 2008 2:21 pm

Re: WinForms - How to continously add Annotations

Post by Alex » Mon Apr 23, 2018 11:29 am

Hello,

Please send us (to support@vintasoft.com) a small working application, which demonstrates your problem. We need analyze your code.

Best regards, Alexander

farangkao
Posts: 3
Joined: Sun Apr 22, 2018 12:48 pm

Re: WinForms - How to continously add Annotations

Post by farangkao » Thu Apr 26, 2018 2:30 pm

This has been sucessfully fixed in the newest Version, thanks again.

Post Reply