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?