Forgot to mention that the PDXObjectImage has a height and width. I get the
output:
PDX image has height = 2335 and width 1651
RGBimage is null
Also, I am using the 0.8.0 incubating version of PDFBox.
Alan
From: Alan Thomas
Sent: Tuesday, February 09, 2010 11:19 PM
To: [email protected] ; [email protected]
Subject: PDF Box: Not getting RGBimage
Hi. I am extracting images from a PDF document that has content on every
page.
To process it further, I get the RGBImage from the PDXObjectImage.
However, for one particular file, this RGBImage is returning null for every
page.
What might be causing this?
I can send the file directly via email but am not comfortable posting it.
Thanks, Alan
PDXObjectImage image = (PDXObjectImage)images.get(
key );
System.out.println("PDX image has height = " +
image.getHeight()
+ " and width " +
image.getWidth());
// Convert image to a Buffered Image, so we can
// look for a barcode and decode it
BufferedImage RGBimage = image.getRGBImage();
if (RGBimage == null)
System.out.println("RGBimage is null");