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 atirtahirgroupdocs/fba9c536bd7efc68a070d6a0a94a2638 to your computer and use it in GitHub Desktop.
Save atirtahirgroupdocs/fba9c536bd7efc68a070d6a0a94a2638 to your computer and use it in GitHub Desktop.
AnnotationConfig cfg = Utilities.getConfiguration();
AnnotationImageHandler annotator = new AnnotationImageHandler(cfg);
List<PageImage> images = annotator.getPages(fileName, new ImageOptions());
for (int i = 0; i < images.size(); i++) {
OutputStream fileStream = new FileOutputStream(Utilities.outputPath + File.separator + "image_" + i + ".png");
final PageImage pageImage = images.get(i);
IOUtils.copy(pageImage.getStream(), fileStream);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment