Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// For complete examples and data files, please go to https://github.com/groupdocs-annotation/GroupDocs.Annotation-for-.NET
// Create instance of annotator.
AnnotationConfig cfg = CommonUtilities.GetConfiguration();
AnnotationImageHandler annotator = new AnnotationImageHandler(cfg);
// Get input file stream
Stream inputFile = new FileStream(CommonUtilities.MapSourceFilePath(CommonUtilities.filePath), FileMode.Open, FileAccess.ReadWrite);
List<PageImage> images = annotator.GetPages(inputFile, new ImageOptions { WithoutAnnotations = true });
//Then if we want get thumbnail we call GetThumbnail() method of PageImage item:
foreach (PageImage pageImage in images)
{
Stream stream = pageImage.GetThumbnail(); // do something with stream
}
// Default image size was 300x180. If need specified image size, you can pass method parameters:
// image thumbnails 100x100
foreach (PageImage pageImage in images)
{
Stream stream = pageImage.GetThumbnail(100, 100);
// do something with stream
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.