开发者

Extracting Images from PDF

开发者 https://www.devze.com 2023-03-14 06:17 出处:网络
I have used PDFImageWriter class to convert PDF to image file(png). Now i want to crop pictures(images) from the converted image file.I dont 开发者_如何学Goknow how to do?could any one provide some co

I have used PDFImageWriter class to convert PDF to image file(png). Now i want to crop pictures(images) from the converted image file.I dont 开发者_如何学Goknow how to do?could any one provide some code for this?


may be it will work.

private BufferedImage cropImage ( BufferedImage src , Rectangle rect ) {
  BufferedImage dest = src.getSubimage ( rect.x , rect.y , rect.width , rect.height ) ;
  return dest ; 
}


If you are trying to Crop an Image using Java then this may answer your question: java image crop

If you are trying to extract images from a PDF then this may answer your question: How to extract images from pdf using Java (not using pdfbox)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号