Search code examples
c#pdfghostscriptghostscript.netghostscriptsharp

Ghostscript exports PNG but cuts half of the landscape page


I am trying to convert pdf to picture with Ghostscript. I have a landscape A3 PDF but no matter what I do, I only get the left half of every page.. I tried adding the -dPDFFitPage, -dFIXEDMEDIA, and other parameters but it didn’t seem to change anything..

My code without additional customswitches (C#):

var r=new GhotsScriptRasterizer();
r.open(pdfPath);
var pdf2png=r.GetPage(300,300,1);
pdf2png.Save(savePath);

I am using Ghostscript 8.64 32bit.


Solution

  • Thanks for the comments. It was really the version - GS 9.26 32Bit worked for me. Thanks!