Resources resources = page.getResources();
XObjectResources xObjects = resources.getXObjects();
if(xObjects == null)
continue;
for(PdfName xObjectKey : xObjects.keySet())
{
XObject xObject = xObjects.get(xObjectKey);
// Is the page's resource an image?
if(xObject instanceof ImageXObject)
{