ArtifexSoftware / Ghostscript.NET

Ghostscript.NET - managed wrapper around the Ghostscript library (32-bit & 64-bit)
https://ghostscript.com
GNU Affero General Public License v3.0
391 stars 152 forks source link

How to capture the bitmap from the ghostscript API? #83

Closed joa-quim closed 3 years ago

joa-quim commented 3 years ago

Hi, pardon from the abuse

This is not a ghostscript.net question but rather a question on how can I capture the raster bitmap resulting from converting a PS file. My question results from the circumstance that I want to use the ghostscript API to convert a PS file and have the result available in memory and not saving it to file (easy). I see that Ghostscript.net can do it (an image is displayed) but I don't know C# enough to find where that is accomplished. Consulting the Ghostscript docs was not helpful either.

Thank you and Happy New Year.

jhabjan commented 3 years ago

This example does exactly what you need: https://github.com/jhabjan/Ghostscript.NET/tree/master/Ghostscript.NET.DisplayTest