Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. AnnotationConfig cfg = Utilities.getConfiguration();
  2. AnnotationImageHandler annotator = new AnnotationImageHandler(cfg);
  3. List<PageImage> images = annotator.getPages(fileName, new ImageOptions());
  4. for (int i = 0; i < images.size(); i++) {
  5. OutputStream fileStream = new FileOutputStream(Utilities.outputPath + File.separator + "image_" + i + ".png");
  6. final PageImage pageImage = images.get(i);
  7. IOUtils.copy(pageImage.getStream(), fileStream);
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement