The climTheTree is a simple example that won't work in the case that the 
content is split in an array. Use PdfReader.getPageContent().

Paulo

----- Original Message ----- 
From: "Nhia Nhia" <[EMAIL PROTECTED]>
To: "Post all your questions about iText here" 
<[email protected]>
Sent: Tuesday, August 26, 2008 9:53 AM
Subject: Re: [iText-questions] error getting content stream


Thank you for your answer Mark. The exception is a 
java.lang.NullPointerException on the line PRStream content = (PRStream) 
reader.getPdfObject(content_ref.getNumber());
donde content_ref = (PdfIndirectReference)kid.get(PdfName.CONTENTS) (the 
class is climbing the tree from Mr.Bruno)

I add the pdf which generates this exception.

I have a question, if you say some pdf don't have content stream array, I 
understand it is impossible to extract it ? Because I am doing a program 
which read the content stream and generates the same pdf (more or less), and 
if I dont have it all my work will be unuseful... how can you do the pdf 
doesnt have content stream ? I read pdf generated with Latex, so I 
understand I would be an option that enables or disables to show the content 
stream ?

I hope I have explained my problem and sorry if my question is inappropiate.
Regards



On 8/25/08, Mark Storer <[EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>> 
wrote:
Laura Cobos <laura.cobosbaron <at> gmail.com<http://gmail.com/>> writes:

> In my case
> it works ok with latex pdf also, but in some cases it throws a null
> exception when it is creating the PRStream, as if in the
> PdfIndirectReference content_ref had null.

Some files don't have a content stream/array.  That's perfectly legal.

Could you post your exception?  That's always a good idea.

--Mark Storer
Senior Software Engineer
Cardiff.com

#include <disclaimer>
typedef std::Disclaimer<Cardiff> DisCard;


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
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