You obviously haven't read the PDF Reference (ISO 32000), yet you are playing around in the bowels of PDF. The Contents object on a Page can be EITHER a stream OR an array. You need to be able to handle both cases...

Leonard

On Dec 23, 2008, at 5:37 AM, chamly rathnayaka wrote:




hi
i was try to read pdf 1.4 using itext. but i woudnot do it
 this is the code
            Document document = new Document();
            document.open();
            PdfReader reader = new PdfReader(path);
            PdfDictionary page1 = reader.getPageN(i);
PRIndirectReference objectReference = (PRIndirectReference) page1.get(PdfName.CONTENTS);

PRStream stream = (PRStream) PdfReader.getPdfObject(objectReference);

but PdfReader.getPdfObject(objectReference) returns the PdfArray object

         what can i do for this problem

         also some time when reas the pdf it missing some words




--
Early birds catches warms
concats : +94 772072379



--
Early birds catches warms
concats : +94 772072379
------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

------------------------------------------------------------------------------
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to