我試圖讓docsplit與我的Rails應用程序一起工作。現在我只是想讓它在本地運行。我安裝了gem和所有的依賴項。所有基本示例都在命令行中運行,我能夠在我的Rails應用程序中使用Docsplit Ruby on Rails
Docsplit.extract_pdf('example.doc')
。然而,當我嘗試使用extract_images,即
Docsplit.extract_images('example.doc', :size => '1000x', :format => [:png, :jpg])
我得到以下錯誤:
Docsplit::ExtractionFailed (sh: pdfinfo: command not found):
docsplit (0.6.1) lib/docsplit/info_extractor.rb:23:in `extract'
(eval):3:in `extract_length'
docsplit (0.6.1) lib/docsplit/image_extractor.rb:34:in `convert'
docsplit (0.6.1) lib/docsplit/image_extractor.rb:19:in `extract'
docsplit (0.6.1) lib/docsplit/image_extractor.rb:19:in `each'
docsplit (0.6.1) lib/docsplit/image_extractor.rb:19:in `extract'
docsplit (0.6.1) lib/docsplit/image_extractor.rb:18:in `each'
docsplit (0.6.1) lib/docsplit/image_extractor.rb:18:in `each_with_index'
docsplit (0.6.1) lib/docsplit/image_extractor.rb:18:in `extract'
docsplit (0.6.1) lib/docsplit/image_extractor.rb:16:in `each'
docsplit (0.6.1) lib/docsplit/image_extractor.rb:16:in `extract'
docsplit (0.6.1) lib/docsplit.rb:58:in `extract_images'
app/controllers/sandbox_controller.rb:53:in `split_doc'
我仔細檢查了所有的依賴性都安裝。我猜我錯過了配置在rails中的東西。
謝謝。
謝謝,在亞馬遜EC2上運行Centos,就是這樣。 –
這也解決了我運行亞馬遜Linux 2014.03 – onions