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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -