Hello,
I am trying to get the current page images. But it seems that the image list in the resources of the current page holds the images of the whole document and not of the current page.
In the following code, for the attached document, any page will have the same images even one that does not contain any image.
Page page = pdf.getPages().get_Item(pageNb);
for (int i = 1 ; i <= page.getResources().getImages().size() ; i += 1 ) {
FileOutputStream os = new FileOutputStream("/tmp/PDFTests/im" + i + ".jpg");
XImage img = page.getResources().getImages().get_Item(i);
img.save(os);
}
thanks,
Camille.
I am trying to get the current page images. But it seems that the image list in the resources of the current page holds the images of the whole document and not of the current page.
In the following code, for the attached document, any page will have the same images even one that does not contain any image.
Page page = pdf.getPages().get_Item(pageNb);
for (int i = 1 ; i <= page.getResources().getImages().size() ; i += 1 ) {
FileOutputStream os = new FileOutputStream("/tmp/PDFTests/im" + i + ".jpg");
XImage img = page.getResources().getImages().get_Item(i);
img.save(os);
}
thanks,
Camille.