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

GhostscriptRasterizer.GetPage does not rasterize the whole page correctly since v.1.2.2 #84

Closed asierpn closed 3 years ago

asierpn commented 3 years ago

The content of the page is truncated after upgrading to v.1.2.2, with v.1.2.1 itr works perfectly. We use GS 9.26 as a workaround of this issue: https://github.com/jhabjan/Ghostscript.NET/issues/10

jhabjan commented 3 years ago

Is it for all your PDF's or specific ones?

asierpn commented 3 years ago

I've tested with several and it only happens in some specific ones

jhabjan commented 3 years ago

Is there any way you could send me one that doesn't render properly?

asierpn commented 3 years ago

I cannot share with you the PDF which is not rasterized correctly because it contains some sensible information, I've tried to create another PDF with the same properties but I've not been able to reproduce the issue with this one.

jhabjan commented 3 years ago

Can you try to rasterize that PDF directly with ghostscript (gswin64.exe) and see if the issue is a same?

asierpn commented 3 years ago

I've rasterized the PDF directly with ghostscript and the image file is not cropped, I've used this command with both 9.53.3 and 9.26:

.\gswin64.exe -sDEVICE=jpeg -r300 -dNOPAUSE -dBATCH -sOutputFile="Test.jpg" "Test.pdf"

jhabjan commented 3 years ago

Can you please try to use latest version of Ghostscript.NET (v.1.2.3 - released today) and latest version of Ghostscript native library (9.5.3) and see you still have this problem?

asierpn commented 3 years ago

I've tested v.1.2.3 and with this version the rasterized page is not being cropped. Thanks.