Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GroupDocsGists/bf83acf3db01ad01bd687557758c32e3 to your computer and use it in GitHub Desktop.
Save GroupDocsGists/bf83acf3db01ad01bd687557758c32e3 to your computer and use it in GitHub Desktop.
// 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