Högni,

GetBuffer() returns the entire array that was originally allocated, which is
probably much larger than the data you wrote. You'll need to use the
MemoryStream's Length property to pick your data out of the array.

Alternatively use ToArray() which explicitly only copies the actually
written bytes.

Regards,   Michael.
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/Section-8-7-Corrupt-output-tp3264228p3264240.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Reply via email to