Skip to content

Instantly share code, notes, and snippets.

@chanwit
Created November 18, 2010 16:14
Show Gist options
  • Select an option

  • Save chanwit/705210 to your computer and use it in GitHub Desktop.

Select an option

Save chanwit/705210 to your computer and use it in GitHub Desktop.
Document doc = new Document();
doc.setFile(url);
BufferredImage image = doc.getPageImage(pageNo,
GraphicsRenderingHints.PRINT,
Page.BOUNDARY_CROPBOX,
0f, // rotation
1.0f); // scale
RenderedImage r = image;
ImageIO.write(r, "png", file);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment