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.

Stamping Multiple Annotations



Stamping Multiple Annotations

Post by Wanderer »

I only want to stamp one annotation per page, where it shows on the top left hand corner. But I have many pages I would like to stamp, I'm running to many errors.

I run th is method 'bannerImage()' in a loop. The only problems are that the process is slow and that it won't work if I don't turn the exceptions off. Is there any way to have this working without clearing the images everytime?
Perhaps just annotating each image separately without clearing it and saving it all at the end. Ultimately I need to print these.

Thanks,
Wanderer

public void bannerImage(string stampedText, string input, string output, int stampedImage)
{
annotations = annotatedTbViewer.Annotations;
stamp = new StampAnnotation();

annotatedTbViewer.Images.Insert(0, input);
stamp.Text = stampedText;
stamp.StampColor = Color.Red;
stamp.Rotation = 0;
stamp.Border = false;
//stamp.Location = new PointF(annotations.Images[0].Width / 2, annotations.Images[0].Height / 2);
//stamp.Size = new SizeF(annotations.Images[0].Width / 3 * 2, annotations.Images[0].Height / 5);
stamp.Location = new PointF(annotations.Images[0].Width / 4, 100);
stamp.Size = new SizeF(800, 100);

annotations[0].Add(stamp);

try
{
annotations.MergeImageWithAnnotations(0);
}
catch
{
}

annotatedTbViewer.Images[0].SaveWithAnnotations(output);
annotatedTbViewer.Images.Clear();
annotationViewer1.Images.Clear();
}


Re: Stamping Multiple Annotations

Post by Alex »

Hello,

Please read the description of the AnnotationController.MergeImageCollectionWithAnnotations method in the documentation.

Best regards, Alexander


Page 1 from 1: 1