}
final List<Image> list = new ArrayList<Image>();
for (int i = 1; i <= pdfFile.getNumPages(); i++) {
// Retrieve page i from document
final PDFPage page = pdfFile.getPage(i);
final Rectangle2D r2d = page.getBBox();
// Prepare page scaling according to systems default DPI
double width = r2d.getWidth();
double height = r2d.getHeight();
width /= DEFAULT_DPI;
height /= DEFAULT_DPI;
// Determine current screen DPI and scale the image accordingly
final int res = Toolkit.getDefaultToolkit().getScreenResolution();
width *= res * scaleFactor;
height *= res * scaleFactor;
// Add image to list
list.add(page.getImage((int) width, (int) height, r2d, null, true,
true));
}
return list;
}