Class: DynamicPDFApi::GoToAction
- Defined in:
- lib/ruby_client/GoToAction.rb
Overview
Represents a goto action in a PDF document that navigates to a specific page using page number and zoom options.
Instance Attribute Summary collapse
-
#_input ⇒ Object
Returns the value of attribute _input.
-
#_input_id ⇒ Object
Returns the value of attribute _input_id.
-
#page_offset ⇒ Object
Gets or sets page Offset.
-
#page_zoom ⇒ Object
Gets or sets PageZoom to display the destination.
Instance Method Summary collapse
-
#initialize(input, page_offset = 0, page_zoom = PageZoom::FIT_PAGE) ⇒ GoToAction
constructor
Initializes a new instance of the GoToAction class using an input to create the PDF, page number, and a zoom option.
- #to_json(_options = {}) ⇒ Object
Constructor Details
#initialize(input, page_offset = 0, page_zoom = PageZoom::FIT_PAGE) ⇒ GoToAction
Initializes a new instance of the GoToAction class using an input to create the PDF, page number, and a zoom option.
19 20 21 22 23 24 25 |
# File 'lib/ruby_client/GoToAction.rb', line 19 def initialize(input, page_offset = 0, page_zoom = PageZoom::FIT_PAGE) super() @_input = input @_input_id = input.id @page_offset = page_offset @page_zoom = page_zoom end |
Instance Attribute Details
#_input ⇒ Object
Returns the value of attribute _input.
27 28 29 |
# File 'lib/ruby_client/GoToAction.rb', line 27 def _input @_input end |
#_input_id ⇒ Object
Returns the value of attribute _input_id.
27 28 29 |
# File 'lib/ruby_client/GoToAction.rb', line 27 def _input_id @_input_id end |
#page_offset ⇒ Object
Gets or sets page Offset.
32 33 34 |
# File 'lib/ruby_client/GoToAction.rb', line 32 def page_offset @page_offset end |
#page_zoom ⇒ Object
Gets or sets PageZoom to display the destination.
37 38 39 |
# File 'lib/ruby_client/GoToAction.rb', line 37 def page_zoom @page_zoom end |
Instance Method Details
#to_json(_options = {}) ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/ruby_client/GoToAction.rb', line 39 def to_json( = {}) json_array = {} json_array['input'] = @_input unless @_input.nil? json_array['inputID'] = @_input_id unless @_input_id.nil? json_array['pageOffset'] = @page_offset unless @page_offset.nil? json_array['pageZoom'] = @page_zoom unless @page_zoom.nil? JSON.pretty_generate(json_array) end |