On Aug 11, 2010, at 2:03 PM, Rafael Cerioli wrote:

> Hi,
> 
> Images are stored as "XObjects" in the PDF Stream. Either you can parse the 
> stream yourself, or you use the Voyeur.app sample code, and you will get the 
> image with its size.
> 

Yeah, I was hoping there was a way to do it without doing that...

Using Voyeur, I was able to confirm that I am successfully putting the 
resolution INTO the PDF. The media box is correctly in pts, 612 x 792, and the 
images are correctly in pixels.

However, when I get the image OUT of the PDF, I lose the pixel data, only 
getting the media box size. 
I've tried getting the image out in two ways:

one was to get the datarepresentation of the PDFPage, and then put that into an 
NSImage. The NSImage is 612x792 pixels.

The other is to draw the PDFPage into an offscreen graphics context. 
Unfortunately, in order for that to work correctly, I need to know the size of 
the image in pixels before hand! 

Is there any way to get access to the xObjects in the PDFPage, other than 
parsing through the PDF data?

Brian Postow
Senior Software Engineer
Acordex Imaging Systems

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to