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

New Post: GhostscriptRasterizer Open

$
0
0
Hi,

Couple of months a go there was a request for MemorySteram support. One of the parameters in most of the 'Open' methods is a System.IO.Stream type which can accept any stream (FileStream, MemoryStream). Stream type is mostly there for the MemoryStream objects as Ghostscript.NET saves MemoryStream to a temporary file and pass the file path to the Ghostscript instance. If you have FileStream object, that means you made FileStream instance from some file path, in this case I would recommend you to use file path directly and not to pass FileStream as this way you will avoid saving a stream to the disk again as it already exists there. The reason for saving Streams to the disk is because Ghostscript needs a random access to the PDF file and if there is any way to pass PDF as byte array to the Ghostscript, Ghostscript will save that byte array to disk anyway. So, it's either Ghostscript.NET will create a file on the disk or native Ghostscript library will create a file on the disk.

The point is, for the input PDF files, Ghostscript.NET always pass file path to a native Ghostsript library. The output can be various (file, memory byte array). In case of memory output, Ghostscript.NET and native Ghostscript library really do their job in-memory, so there is no any track of any output file on the disk.

Cheers,
Josip

Viewing all articles
Browse latest Browse all 393

Trending Articles



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