Skip to content

Commit

Permalink
Add Grim MultiProcessor support.
Browse files Browse the repository at this point in the history
This helps us handle a broader range of PDFs that might not otherwise process because of the version of GhostScript provided on Heroku's Cedar stack.
  • Loading branch information
jonmagic committed Oct 21, 2011
1 parent 6f17e82 commit 5036a78
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Binary file added bin/9.02/gs
Binary file not shown.
Binary file added bin/9.04/gs
Binary file not shown.
8 changes: 8 additions & 0 deletions lib/pdf_archive.rb
Expand Up @@ -38,6 +38,14 @@ def self.root
config.fog_attributes = {'Cache-Control'=>'max-age=315576000'} # optional, defaults to {}
end

# Grim Production Config
if PdfArchive.environment == "production"
Grim.processor = Grim::MultiProcessor.new([
Grim::ImageMagickProcessor.new({:ghostscript_path => PdfArchive.root.join('bin', '9.04', 'gs')}),
Grim::ImageMagickProcessor.new({:ghostscript_path => PdfArchive.root.join('bin', '9.02', 'gs')})
])
end

# require pdf uploader, document model, and process pdf job
require 'pdf_uploader'
require 'document'
Expand Down

0 comments on commit 5036a78

Please sign in to comment.