VintaSoft Annotation .NET Plug-in Discussions

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

Board index < VintaSoft Imaging < VintaSoft Annotation .NET Plug-in Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

Size of an StampAnnotation



Size of an StampAnnotation

Post by MichaelHerrmanns »

Hello,

how can I create a Stampannotation with an userdefinded size on mouse click.
I try with this code:
Dim ann As New StampAnnotation()
ann.Text = "Rubber stamp"
ann.ZOrder = _zOrder
ann.Size = New SizeF(450, 800)
_zOrder += 1
Try
    annotationViewer1.BuildAnnotation(ann)
Catch ex As InvalidOperationException
    MessageBox.Show(ex.Message, "Building annotation")
End Try
The stamp has only a size of (1,1) on release the mousebutton.
Have anyone a solution for this problem?

regards

Michael


Re: Size of an Stampannotation

Post by Alex »

Hello Michael,

Now you should add annotation to the annotation collection of image and later change size of annotation if necessary.
Here is a snippet of code:
Dim ann As New StampAnnotation()
ann.Text = "Rubber stamp"
ann.ZOrder = _zOrder
ann.Size = New SizeF(450, 800)
_zOrder += 1
Try
   annotationViewer1.Annotations(0).Add(ann)
Catch ex As InvalidOperationException
   MessageBox.Show(ex.Message, "Building annotation")
End Try
What is your goal? Do you need to specify minimal size of annotation before building? Could you explain me, step by step, how do you imagine this?

Best regards, Alexander


Re: Size of an Stampannotation

Post by MichaelHerrmanns »

Hello Alex,

thank you for your reply. I am late, butI was on my christmas vacation.
#Do you need to specify minimal size of annotation before building?
Yes thats my goal. The User create with an stamp a stampannotation and this should be in
default size. After that the user can change the size of this stamp.

I hope itis clear what I want to do.
Best Regards

Michael


Re: Size of an Stampannotation

Post by MichaelHerrmanns »

Hi Alex,

I have one additional question.
If I you your code:
annotationViewer1.Annotations(0).Add(ann)
only on the first page of my document can take the annotation.
How can I tell them to build the annotation on the selected page?

Best regards

Michael


Re: Size of an Stampannotation

Post by Alex »

Hello Michael,

Here is a code snippet for VB.NET:
Dim pageIndex As Integer = 0
annotationViewer1.Annotations(pageIndex).Add(ann)
and here is a code snippet for C#:
int pageIndex = 0;
annotationViewer1.Annotations[pageIndex].Add(ann);
Best regards, Alexander


Re: Size of an Stampannotation

Post by MichaelHerrmanns »

Hello Alex,

thank you for your tip.
It works now.

Best regards

Michael


Page 1 from 1: 1