On 7/8/2014 1:45 PM, göktürk mavuş wrote: > reference = (PRIndirectReference) > dictionary.get(PdfName.CONTENTS); > /*line 166*/ contentStream = (PRStream) > PdfReader.getPdfObject(reference);
You are assuming that the Contents of a page is ALWAYS a stream object. If you'd study the PDF reference, you'd find out that it also can be an array of stream. When it's an array of streams, your code will throw an exception. Also: what is the point of getting nothing but the content stream. What about the form XObjects? What about the other resources that are necessary to know what's inside the content stream? I can't think of any use case that would justify using your code. ------------------------------------------------------------------------------ Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net 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