> PDDocument doc = PDDocument.load(new File("big.pdf"));
> PDDocumentCatalog catalog = doc.getDocumentCatalog();
> List pages = catalog.getAllPages();
> for(Object o : pages){
> PDPage page = (PDPage)o;
> BufferedImage image = page.convertToImage();//<= OOME
> ImageIO.write(image, "png", file);
> }
OK, I got it. When the page is to big (e.g. really large images) then an
OMME is thrown.
Is there any possiblity to find out the approx. size of the page without
converting it into an image and catching the OOME?
Thank you