Class: Ilovepdf::Tool::Imagepdf
- Inherits:
-
Ilovepdf::Task
- Object
- Ilovepdf
- Ilovepdf::Task
- Ilovepdf::Tool::Imagepdf
- Defined in:
- lib/ilovepdf/tool/imagepdf.rb
Constant Summary collapse
- API_PARAMS =
[:orientation, :margin, :pagesize, :merge_after]
- ORIENTATION_VALUES =
['portrait', 'landscape']
- PAGESIZE_VALUES =
['fit', 'A4', 'letter']
Constants inherited from Ilovepdf::Task
Constants included from Ilovepdf
Instance Attribute Summary
Attributes inherited from Ilovepdf::Task
#ignore_errors, #ignore_password, #output_filename, #packaged_filename, #result, #task_id, #tool, #try_pdf_repair
Instance Method Summary collapse
-
#initialize(public_key, secret_key, make_start = true) ⇒ Imagepdf
constructor
A new instance of Imagepdf.
- #orientation=(new_val) ⇒ Object
- #pagesize=(new_val) ⇒ Object
Methods inherited from Ilovepdf::Task
#add_file, #add_file_from_url, #assign_meta_value, #blob, #chained_task?, #delete!, #delete_file, #download, #download_info, #enable_file_encryption, #execute, #files, #next, #status
Methods included from Ilovepdf
Constructor Details
#initialize(public_key, secret_key, make_start = true) ⇒ Imagepdf
Returns a new instance of Imagepdf.
10 11 12 13 14 |
# File 'lib/ilovepdf/tool/imagepdf.rb', line 10 def initialize(public_key, secret_key, make_start=true) self.tool = :imagepdf self.merge_after = true super(public_key, secret_key, make_start) end |
Instance Method Details
#orientation=(new_val) ⇒ Object
16 17 18 19 |
# File 'lib/ilovepdf/tool/imagepdf.rb', line 16 def orientation=(new_val) raise Errors::ArgumentEnumError.new(ORIENTATION_VALUES) unless ORIENTATION_VALUES.include? new_val @orientation = new_val end |
#pagesize=(new_val) ⇒ Object
21 22 23 24 |
# File 'lib/ilovepdf/tool/imagepdf.rb', line 21 def pagesize=(new_val) raise Errors::ArgumentEnumError.new(PAGESIZE_VALUES) unless PAGESIZE_VALUES.include? new_val @pagesize = new_val end |