Sha256: b4457e0f41b5df4b4b9357c958daae2e13d6fe5f52eda843b65e845c9641e971
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
# encoding: UTF-8 require 'safe_shell' module Grim # Default resize output width, any positive integer WIDTH = 1024 # Default image quality, 1 to 100 QUALITY = 90 # Default density, any positive integer DENSITY = 300 # Default exception class for Grim. class Exception < ::StandardError end # Exception that is raised if pdf is not found. class PdfNotFound < Grim::Exception end # Exception that is raised if pdf does not have page class PageNotFound < Grim::Exception end # Exception that is raised if an empty path is passed to Grim::Page#save class PathMissing < Grim::Exception end # Exception that is raised if Grim::Page#save can't process the page class UnprocessablePage < Grim::Exception end # Creates and returns a new instance of Grim::Pdf # # path - a path string or object # # For example: # # pdf = Grim.reap(/path/to/pdf) # # Returns an instance of Grim::Pdf # def self.reap(path) Grim::Pdf.new(path) end end require 'grim/pdf' require 'grim/page'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
grim-0.2.4 | lib/grim.rb |