Question

I'm trying to figuring out a strange issue with Docsplit. I have a Rails 2.3.14 application where users can upload PPTs/PDFs and the system should extract cover images with Docsplit.

I have an after_save callback into the model with this line:

Docsplit.extract_images(self.pdf.path, :size => '370x540', :density => '72', :format => :png, :pages => 1, :output => pdf_dir_path)

This line generates this error:

**** Page has no /MediaBox attribute. Using the current page size.
Error: /stackunderflow in --run--
Operand stack:
   --dict:8/8(L)--   612.0   792.0   3
Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push   1846   1   3   %oparray_pop   1845   1   3   %oparray_pop   1829   1   3   %oparray_pop   --nostringval--   --nostringval--   2   1   1   --nostringval--   %for_pos_int_continue   --nostringval--   --nostringval--
Dictionary stack:
   --dict:1157/1684(ro)(G)--   --dict:1/20(G)--   --dict:76/200(L)--   --dict:76/200(L)--   --dict:106/127(ro)(G)--   --dict:285/300(ro)(G)--   --dict:21/25(L)--   --dict:2/6(L)--
Current allocation mode is local
GPL Ghostscript 8.70: Unrecoverable error, exit code 1
gm convert: Postscript delegate failed (/var/www/rails/application/releases/20130828151914/public/system/pdfs/6/original/news-scientifica.pdf).

I know this is a bug related to Ghostscript, but if I execute that exact statement manually from the console, everything works fine. So, what could be?

No correct solution

OTHER TIPS

Exit code 1 means the command is not fully executed,it must return 0, my guess is that the system has stopped responding before finishing the command,make sure that the process are synchronized and that the process B for instance waits for process A to finish inorder to start Operating.

However with my experience in using Ghostscript, i think version 9.06 is more stable than the recent ones of it, also adding the parameter -dUseTrimBox wont harm.

this what i suggest hope it helps .

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top