How to get information about annotations of TIFF file?
In This Topic
Here is C#/VB.NET code that shows how get information about annotations of TIFF file:
// create image collection
Vintasoft.Imaging.ImageCollection images = new Vintasoft.Imaging.ImageCollection();
// create annotation controller associated with image collection
Vintasoft.Imaging.Annotation.AnnotationDataController annotations =
new Vintasoft.Imaging.Annotation.AnnotationDataController(images);
// load TIFF file into collection
images.Add("multipage.tif");
// for each page of TIFF file
for (int page = 0; page < images.Count; page++)
{
System.Windows.Forms.MessageBox.Show("Page " + page.ToString());
// get annotation collection associated with page of TIFF file
Vintasoft.Imaging.Annotation.AnnotationDataCollection currentAnnotations = annotations[page];
// get information about annotations
for (int anno = 0; anno < currentAnnotations.Count; anno++)
{
System.Windows.Forms.MessageBox.Show("Annotation " + anno.ToString() +
", Type = " + currentAnnotations[anno].GetType().ToString());
}
}
' create image collection
Dim images As New Vintasoft.Imaging.ImageCollection()
' create annotation controller associated with image collection
Dim annotations As New Vintasoft.Imaging.Annotation.AnnotationDataController(images)
' load TIFF file into collection
images.Add("multipage.tif")
' for each page of TIFF file
For page As Integer = 0 To images.Count - 1
System.Windows.Forms.MessageBox.Show("Page " & page.ToString())
' get annotation collection associated with page of TIFF file
Dim currentAnnotations As Vintasoft.Imaging.Annotation.AnnotationDataCollection = annotations(page)
' get information about annotations
For anno As Integer = 0 To currentAnnotations.Count - 1
System.Windows.Forms.MessageBox.Show("Annotation " & anno.ToString() & ", Type = " & currentAnnotations(anno).[GetType]().ToString())
Next
Next