Created attachment 11843 [details] EPS that is failing to render with certain device width and height dimensions When using -dEPSFitPage with -gWxH at certain dimensions the resulting rendering will be blank. Here is a fail and success command for the attached EPS file Fails: gs -q -dNumRenderingThreads=4 -dEPSFitPage -g1714x1713 -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sOutputFile=out.png steelers.eps Works: gs -q -dNumRenderingThreads=4 -dEPSFitPage -g257x257 -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dTextAlphaBits=4 -dGraphicsAlphaBits=4 -sOutputFile=out.png steelers.eps
Created attachment 11844 [details] out.png I'm having trouble reproducing this. With the exact command line given in the description I get the attached out.png file. This is running Ghostscript 9.16 on a MacPro running MacOS X 10.10.4 Can you double check that the command line is correct? Also, are all of the listed options necessary to reproduce the problem?
After trying again I'm now able to reproduce the problem with this command line, I'm not sure why I wasn't able to see it earlier: ./bin/gs -sDEVICE=ppmraw -o test.ppm -dEPSFitPage ./steelers.eps It appears to be a regression, starting with: commit d59e1feb9545b399027907cb2d1a6855c524e0b4 Author: Ken Sharp <ken.sharp@artifex.com> AuthorDate: Mon Feb 10 08:34:54 2014 +0000 Commit: Ken Sharp <ken.sharp@artifex.com> CommitDate: Mon Feb 10 08:34:54 2014 +0000 PS interpreter - Fix rotation problem with EPSFitPage Bug #695016 "Gradient eps file to pdf" When fitting an EPS Bounding Box to a specified page size, the code looks at the width and height of both the page and the EPS file, to see if the EPS will fit 'better' by rotating it. In this particular case the page is square, but there was no special case for this, which mean that landscape pages wold be rotated twice, causing the content to disappear. This commit special cases square media sizes and does not attempt to rotate the EPS, no matter what its orientation, as there is clearly no point in doing so. This prevents the double rotation and resolves the problem. Tested with landscape, portrait and square media and EPS files, in all combinations. No differences expected gs/Resource/Init/gs_epsf.ps
Fixed in 44c6e3aecd4d13f47e0f75e74f63f38715ab7ab73 I believe.
I believe there is a typo in comment #3, the correct commit hash is 44c63aecd4d13f47e0f75e74f63f38715ab7ab73.