Class: Pdfrb::Model::Type::LinkAnnotation
Instance Attribute Summary
Attributes inherited from Object
#document, #gen, #oid, #value
Instance Method Summary
collapse
Methods inherited from Annotation
#additional_actions, #appearance, #appearance_state, #color, #contents, #create_appearance_stream, #flags, for_subtype, #hidden?, #locked?, #locked_contents?, #modified_date, #name, #no_rotate?, #no_view?, #no_zoom?, #normal_appearance, #page, #print?, #read_only?, #rect, register_subtype, #subtype, subtype_map, #toggle_no_view?
#[], #[]=, arlington_available?, arlington_default, arlington_key_to_symbol, arlington_loaded_for?, arlington_mark_loaded, arlington_object, arlington_one_type_to_ruby, arlington_required?, arlington_types_to_ruby, arlington_version, define_field, define_field_from_arlington, #delete, #each, each_field, #each_raw, #empty?, field, #initialize, #key?, #keys, lookup_type, own_fields, #pdf_type, register_type, type_map, #validate
Methods inherited from Object
#==, define_type, #deref, #indirect?, #initialize, #must_be_indirect?, #pdf_type, pdf_type
Instance Method Details
7
|
# File 'lib/pdfrb/model/type/link_annotation.rb', line 7
def action; self[:A]; end
|
12
|
# File 'lib/pdfrb/model/type/link_annotation.rb', line 12
def border; self[:Border]; end
|
13
|
# File 'lib/pdfrb/model/type/link_annotation.rb', line 13
def bs; self[:BS]; end
|
#destination ⇒ Object
8
|
# File 'lib/pdfrb/model/type/link_annotation.rb', line 8
def destination; self[:Dest]; end
|
#goto_link? ⇒ Boolean
27
28
29
|
# File 'lib/pdfrb/model/type/link_annotation.rb', line 27
def goto_link?
has_action? && action && action[:S]&.to_sym == :GoTo
end
|
#has_action? ⇒ Boolean
15
16
17
|
# File 'lib/pdfrb/model/type/link_annotation.rb', line 15
def has_action?
!!action
end
|
#has_destination? ⇒ Boolean
19
20
21
|
# File 'lib/pdfrb/model/type/link_annotation.rb', line 19
def has_destination?
!!destination
end
|
#highlight ⇒ Object
35
36
37
|
# File 'lib/pdfrb/model/type/link_annotation.rb', line 35
def highlight
(highlight_mode || :Invert).to_sym
end
|
#highlight_mode ⇒ Object
9
|
# File 'lib/pdfrb/model/type/link_annotation.rb', line 9
def highlight_mode; self[:H]; end
|
#launch_link? ⇒ Boolean
31
32
33
|
# File 'lib/pdfrb/model/type/link_annotation.rb', line 31
def launch_link?
has_action? && action && action[:S]&.to_sym == :Launch
end
|
#quad_points ⇒ Object
11
|
# File 'lib/pdfrb/model/type/link_annotation.rb', line 11
def quad_points; self[:QuadPoints]; end
|
#uri_action ⇒ Object
10
|
# File 'lib/pdfrb/model/type/link_annotation.rb', line 10
def uri_action; self[:PA]; end
|
#uri_link? ⇒ Boolean
23
24
25
|
# File 'lib/pdfrb/model/type/link_annotation.rb', line 23
def uri_link?
has_action? && action && action[:S]&.to_sym == :URI
end
|