I gave you a VERY complete answer earlier on the list, but you ignored it :(.
Perhaps if you re-read my answer and then asked some questions about it, that might help... -----Original Message----- From: java.geek [mailto:java.g...@rediffmail.com] Sent: Monday, November 30, 2009 5:35 AM To: itext-questions@lists.sourceforge.net Subject: Re: [iText-questions] Extract PDF embedded images using iText Could you please explain me more ? It will be good if you will provide some code snippet here of your suggestions below. Thanks in advance :) 1T3XT info wrote: > > Quoting "java.geek" <java.g...@rediffmail.com>: > >> >> The way I am extracting images input stream is wrong. > > That's correct. > >> byte[] im = PdfReader.getStreamBytesRaw((PRStream)(stream)); >> InputStream inputStream = new ByteArrayInputStream(im); > > With the above two lines, you get the bits and bytes > from the image, but you're completely ignoring the > stream dictionary. Also: some types of images need more > than one stream (e.g. JBIG). > >> BufferedImage bufferedImage= ImageIO.read(inputStream); > > The above line will only work if the stream bytes are > self-contained and do not involve any other data to know > what the image looks like. > >> java.io.IOException: The byte array is not a recognized imageformat. > > That's normal: the bits and bytes can't be interpreted > because you're ignoring plenty of other information about > the image that is present in the PDF. > > And that's as far as free support on this list goes. > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > iText-questions mailing list > iText-questions@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/itext-questions > > Buy the iText book: http://www.1t3xt.com/docs/book.php > Check the site with examples before you ask questions: > http://www.1t3xt.info/examples/ > You can also search the keywords list: > http://1t3xt.info/tutorials/keywords/ > > -- View this message in context: http://old.nabble.com/Extract-PDF-embedded-images-using-iText-tp26562385p26572463.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/ ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/