Ok, I really feel stupid now. I've seen that reference before and tried to read 
in with image.get(PdfName.METADATA) and then cast it into any object that would 
allow me to see the content. Basicly I didn't understand that the object held a 
stream with the content and that I should use getAsStream/GetStreamBytes to 
retrieve it. 

I've now been able to do what I wanted. Retrieve the images and separate them 
based on a attribute in their mata data.

Thank you very much for you help!
/Lukas


________________________________________
From: 1T3XT BVBA [[email protected]]
Sent: Sunday, August 07, 2011 21:41
To: Post all your questions about iText here
Subject: Re: [iText-questions] Parsing PDF retrieving layers and images

On 7/08/2011 18:01, Leonard Rosenthol wrote:
>The stream in this example contains the following attributes:
>{/Intent=/RelativeColorimetric, /Decode=[0.0, 255.0], /Type=/XObject, 
>/Subtype=/Image, /ColorSpace=22 0 R, /Name=/X, /BitsPerComponent=8, 
>/Width=314, >/Metadata=24 0 R, /Length=125, /Height=323, /Filter=/FlateDecode}
>
Grab the metadata and read it!
Yes, combined with what you said in your initial mail, I think that's the 
solution to your problem. 24 0 R is a reference to object #24 in the PDF. It's 
a stream object that consists of XML. Use the getAsStream() method to retrieve 
a PRStream object; get the content using PdfReader's getStreamBytes() method.

------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to