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

PDF to image conversion: object transparency/opacity lost #77

Closed Todd1561 closed 3 years ago

Todd1561 commented 4 years ago

I'm using Ghostscript.NET.Rasterizer to take in a PDF and convert it's pages to individual PNGs. This works fine but if the source PDF has objects with transparency/opacity less than 100% the resulting image has those objects at 100% opacity, hiding the part of the document underneath. This does not happen when using GhostScript directly. I've tried flatting the original PDF before conversion and that did not help. I'm using GS.Net version 1.2.1 with GS version 9.26

YetAnotherDev commented 4 years ago

@Todd1561 i'm not sure if you saw this thread. i havent tried the solution myself but they state it works. I found this post because i'm also having this issue with another library and was looking for an alternative in ghostscript.net.

https://github.com/jhabjan/Ghostscript.NET/issues/60

Todd1561 commented 4 years ago

Somehow I missed that, thanks for letting me know. I have already abandoned GS in favor of buying PDF-Tools by Tracker Software and so far it's been working great in production the last 5 weeks or so. We use a lot of large architectural drawings with several markup layers and it hasn't had a problem with them yet. A library-based solution like GS.Net would have been more ideal than launching an external process like PDF-Tools. But this solution is working well so I'll probably leave it alone.

https://www.tracker-software.com/product/pdf-tools

jhabjan commented 3 years ago

Fixed in today's v.1.2.2. release.