ghostscript unexpectedly returned exit value 1 -
calling ghostscript perl script error:
"/usr/local/bin/gs" unexpectedly returned exit value 1
in $!
string can found: "inappropriate ioctl device" - not sure, if related gs error.
searching documentation of ghostscript, found page:
http://www.ghostscript.com/doc/current/api.htm#return_codes
unfortunatley 1 not listed there.
any idea what's going wrong here?
edit: after changing code bit, realized file given gs
jpeg , not pdf. that's reason not explain exit-code of 1.
for reference here perl-code throws above error message:
($stdout, $stderr, $exit) = capture { $cmd = '/usr/local/bin/gs'; @args = (qw( -sdevice=pdfwrite -dcompatibilitylevel=1.4 -dpdfsettings=/ebook -dnopause -dquiet -dbatch -soutputfile=- )) ; push @args, $tmp_fn; use ipc::system::simple qw(system); system($cmd, @args); }; die "error compressing pdf: $stderr" if $stderr;
Comments
Post a Comment