Back to the streams again...

When I'm trying to read the content of stream, I use the following code:

PdfStream stream;
...
byte[] byteStream = PdfReader.getStreamBytes((PRStream)stream)

Variable 'stream' refers to a stream object from source PDF document. As you
know, this stream object is represented in the document in the following
form:

dictionary
stream
... stream of bytes ...
endstream

When I call method getStreamBytes(), I expect to obtain the content of the
stream (marked as "...stream of bytes..." in my schema), and I expect to get
exactly that number of bytes which is specified in the stream's "Length"
property. But method returns much more bytes then specified in the "Length".
Why ? Does method getStreamBytes() returns information contained within
stream part of the object stream as already decoded information ? Could
anyone explain, how to obtain the content of object stream in that simple
form (array of bytes) which could allow me later to create exact copy of the
stream ?




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to