Checking the page count to detect EPS files is faulty, since it is legal
to specify "%%Pages: 1".
This commit revises the conditional statement to use a file-extension
check (for ".eps") instead.
This was a regression introduced by commit
1f8c40c86902c6c98091ccfd3ecf02ec1fc2bed5
(output-file (if multi-page? pngn png1))
(gs-variable-options
(output-file (if multi-page? pngn png1))
(gs-variable-options
- ;; ps-page-count returns 0 for EPS files
- (if (zero? page-count)
+ (if (string-suffix-ci? ".eps" ps-name)
"-dEPSCrop"
(format #f "-dDEVICEWIDTHPOINTS=~,2f -dDEVICEHEIGHTPOINTS=~,2f"
page-width page-height)))
"-dEPSCrop"
(format #f "-dDEVICEWIDTHPOINTS=~,2f -dDEVICEHEIGHTPOINTS=~,2f"
page-width page-height)))