Class: Pdf4me::TextStamp
- Inherits:
-
WrapperAction
- Object
- WrapperAction
- Pdf4me::TextStamp
- Defined in:
- lib/pdf4me/actions/text_stamp.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#pages ⇒ Object
Returns the value of attribute pages.
-
#position_x ⇒ Object
Returns the value of attribute position_x.
-
#position_y ⇒ Object
Returns the value of attribute position_y.
-
#save_path ⇒ Object
Returns the value of attribute save_path.
-
#text ⇒ Object
Returns the value of attribute text.
Attributes inherited from WrapperAction
Instance Method Summary collapse
Methods inherited from WrapperAction
#assign_attributes, #defaults, #initialize, #run, #run!
Constructor Details
This class inherits a constructor from Pdf4me::WrapperAction
Instance Attribute Details
#file ⇒ Object
Returns the value of attribute file.
3 4 5 |
# File 'lib/pdf4me/actions/text_stamp.rb', line 3 def file @file end |
#pages ⇒ Object
Returns the value of attribute pages.
3 4 5 |
# File 'lib/pdf4me/actions/text_stamp.rb', line 3 def pages @pages end |
#position_x ⇒ Object
Returns the value of attribute position_x.
3 4 5 |
# File 'lib/pdf4me/actions/text_stamp.rb', line 3 def position_x @position_x end |
#position_y ⇒ Object
Returns the value of attribute position_y.
3 4 5 |
# File 'lib/pdf4me/actions/text_stamp.rb', line 3 def position_y @position_y end |
#save_path ⇒ Object
Returns the value of attribute save_path.
3 4 5 |
# File 'lib/pdf4me/actions/text_stamp.rb', line 3 def save_path @save_path end |
#text ⇒ Object
Returns the value of attribute text.
3 4 5 |
# File 'lib/pdf4me/actions/text_stamp.rb', line 3 def text @text end |
Instance Method Details
#call_api ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/pdf4me/actions/text_stamp.rb', line 44 def call_api client.multipart_post( path, file: File.open(file, 'rb'), alignX: position_x, alignY: position_y, text: text, pages: pages.join(',') ) do |request| download(request, save_path) end end |
#path ⇒ Object
40 41 42 |
# File 'lib/pdf4me/actions/text_stamp.rb', line 40 def path '/Stamp/TextStamp' end |