Yes, I know this method to extract image with page no. Every PDF file I
tried work prefectly, except this one;
http://www.sheylara.com/wii/wii_system_settings_translation_v1.0.pdf

You can try to download the above pdf file and see if you can extract image
page by page.

After I got a page using reader.getPageN(1), then get the resouce by using
.get(PdfName.RESOURCE).

But when I cast the return value to (Dictionary), it cause a
ClassCastException, the return Object is indeed a PRIndirectRef instance.

Normally after I got the Dictionary of a resource, then I can got all the
image (XObject), but not the case for the above pdf file.

One note is if I don't care about the page number, getting all image at once
is prefectly ok by using something like;

int no = reader.getXRefNo()

//the for loop, see if it is stream and image etc... //

Any ideas?

Thanks



On 9/18/07, Bruno Lowagie (iText) <[EMAIL PROTECTED]> wrote:
>
> Koon Yue Lam wrote:
> > However, it will get ALL image of the pdf file. How could I get the page
> > no of each image?
>
> You need to get the Resources dictionary of each page,
> and get the references to the Image XObject streams from
> that dictionary.
> br,
> Bruno
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to