lib/grim/image_magick_processor.rb
# ghostscript prints out a warning, this regex matches it
ghostscript prints out a warning, this regex matches it
ghostscript prints out a warning this regex matches it
def save(pdf, index, path, options)
      command = prepare_command(pdf, index, path, options)
      command_env = {}
      if @ghostscript_path && @ghostscript_path != DefaultGhostScriptPath
        command_env['PATH'] = "#{File.dirname(@ghostscript_path)}#{File::PATH_SEPARATOR}#{ENV['PATH']}"
      end
      Grim.logger.debug { "Running imagemagick command" }
      if command_env.any?
        Grim.logger.debug { command_env.map {|k,v| "#{k}=#{v}" }.join(" ") }
      end
      Grim.logger.debug { command.join(" ") }
      result, status = Open3.capture2e(command_env, command.join(" "))
      status.success? || raise(UnprocessablePage, result)
    end
def save ( pdf , index , path , options ) command = prepare_command ( pdf , index , path , options ) command_env = { } if @ghostscript_path && @ghostscript_path != DefaultGhostScriptPath command_env [ 'PATH' ] = "#{File.dirname(@ghostscript_path)}#{File::PATH_SEPARATOR}#{ENV['PATH']}" end Grim . logger . debug { "Running imagemagick command" } if command_env . any? Grim . logger . debug { command_env . map { | k , v | "#{k}=#{v}" } . join ( " " ) } end Grim . logger . debug { command . join ( " " ) } result , status = Open3 . capture2e ( command_env , command . join ( " " ) ) status . success? || raise ( UnprocessablePage , result ) end
ghostscript prints out a warning, this regex matches it
ghostscript prints out a warning this regex matches it
pdf
<not_specific>
index
<not_specific>
path
<not_specific>
options
<not_specific>