Re: Can anyone point me in the right direction here?
Chris Liddell <[email protected]>
| Newsgroups | gmane.comp.printing.ghostscript.devel |
|---|---|
| Message-ID | <[email protected]> |
There are a few things that look very dubious on the command line: first is the "--" - that option is quite obscure, and rarely needed, except in a few special utility Postscript jobs. If the "--" *is* required, then there is Postscript involved which we can't possibly guess at. Secondly, (possibly related to the "--") the "-c" and "quit" are superfluous. Lastly, when trying to diagnose problems, it's really quite daft to minimise the feedback Ghostscript is giving by using the "-q" option. What you need to do is get the PDF in question, and run Ghostscript at the command line (outside of Rails and Docsplit), but using the same command line. If it doesn't go wrong, then it is likely something in the Rails environment settings causing it to fail, so I would compare the environments on the working vs non-working machines. If it still goes wrong at the "vanilla" command prompt, then it's possibly an issue with the PDF, an issue with Ghostscript, or an issue with the overall environment (not specific to Rails). Chris On 01/04/15 10:23, Ben Bristow wrote: > Hey guys, > > I don't know if this is the right place for this, but I really need some help here. > > I have a Rails app using Docsplit, on a RHEL 6.5 box, tried using multiple versions of Ghostscript (including the latest one) and keep getting this error: > > Completed 500 Internal Server Error in 2440ms > > Docsplit::ExtractionFailed (Error: /rangecheck in --run-- > Operand stack: > 0 --nostringval-- -1 > Execution stack: > %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push 1951 1 3 %oparray_pop 1950 1 3 %oparray_pop 1934 1 3 %oparray_pop --nostringval-- --nostringval-- 1 1 0 --nostringval-- %for_pos_int_continue --nostringval-- --nostringval-- > Dictionary stack: > --dict:1190/1684(ro)(G)-- --dict:1/20(G)-- --dict:84/200(L)-- --dict:84/200(L)-- --dict:117/127(ro)(G)-- --dict:280/300(ro)(G)-- --dict:26/32(L)-- > Current allocation mode is local > GPL Ghostscript 9.16: Unrecoverable error, exit code 1 > gm convert: "gs" "-q" "-dBATCH" "-dMaxBitmap=50000000" "-dNOPAUSE" "-sDEVICE=ppmraw" "-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r150x150" "-dUseCropBox" "-dFirstPage=0" "-dLastPage=0" "-sOutputFile=/tmp/d20150401-46662-13srsns/gmsJYXto" "--" "/tmp/d20150401-46662-13srsns/gmZCyIc1" "-c" "quit". > gm convert: Postscript delegate failed (/home/app/production/tmp/18-1427879935/w9CLCkXYerSTUIxtktQNdKXKh1kXUA.pdf).): > lib/pdf_tasks.rb:157:in `extract_images' > app/uploaders/docs_uploader.rb:155:in `generate_page_images' > app/models/document_signer_observer.rb:93:in `after_update' > app/controllers/document_signers_controller.rb:85:in `sign_document' > app/controllers/document_signers_controller.rb:20:in `update' > > The same issue does not occur on a different machine. I can't for the life of me figure out why this is happening. > > Can anyone point me to a solution? > > Regards, > Ben. > > > > _______________________________________________ > gs-devel mailing list > [email protected] > http://ghostscript.com/cgi-bin/mailman/listinfo/gs-devel >