Use PdfReader.getStreamBytes(). Paulo
> -----Original Message----- > From: Dean Krueger [mailto:[email protected]] > Sent: Friday, July 17, 2009 3:33 PM > To: [email protected] > Subject: [iText-questions] Why would this be null every time? > > I am trying to use PdfReader.FlateDecode(raw), a stream object and my > GetBytes is always null. Here is the code: > > PdfReader pdf = new PdfReader("c:\test.pdf"); > byte[] raw = new byte[pdf.GetPdfObject(objNum).Length]; > raw = pdf.GetPdfObject(objNum).GetBytes(); > > Here is what the stream look like:(At least some of it, what > translates anyways) > > 65 0 obj > <</Filter/FlateDecode/Length 286/N 3>>stream > H‰b``2ptqre``ÈÍ+) > rwRˆˆŒR`¿ÀÀÁÀÍ Ì`Ì`˜\\ààà > > -------------------------------------------------------------- > ---------------- > Enter the BlackBerry Developer Challenge > This is your chance to win up to $100,000 in prizes! For a > limited time, > vendors submitting new applications to BlackBerry App > World(TM) will have > the opportunity to enter the BlackBerry Developer Challenge. > See full prize > details at: http://p.sf.net/sfu/Challenge > _______________________________________________ > 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 > 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/ Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ 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 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/
