Quantcast
Channel: Ghostscript.NET
Viewing all articles
Browse latest Browse all 393

New Post: Stream instead of MemoryStream

$
0
0
I had to replace Open(MemoryStream) with the more general Stream type.

There was only one additional change needed in WriteToTemporaryFile()

Old:
        File.WriteAllBytes(path, stream.ToArray());
New:
        byte[] buffer = new byte[stream.Length];
        stream.Read(buffer, 0, (int)stream.Length);
        File.WriteAllBytes(path, buffer);

Viewing all articles
Browse latest Browse all 393

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>