Class: Pdfrb::Model::Type::Outline
Overview
Outline (bookmark) root (s12.3.3). Linked from Catalog /Outlines.
Instance Attribute Summary
Attributes inherited from Object
#document, #gen, #oid, #value
Instance Method Summary
collapse
#[], #[]=, 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, 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
14
|
# File 'lib/pdfrb/model/type/outline.rb', line 14
def count; self[:Count]; end
|
#each_item(&block) ⇒ Object
38
39
40
41
42
43
44
45
46
47
48
49
50
|
# File 'lib/pdfrb/model/type/outline.rb', line 38
def each_item(&block)
return enum_for(:each_item) unless block
return unless first && document
cur_ref = first
while cur_ref
item = document.object(cur_ref)
break unless item
yield item
cur_ref = item[:Next]
end
end
|
#empty? ⇒ Boolean
16
17
18
|
# File 'lib/pdfrb/model/type/outline.rb', line 16
def empty?
!first
end
|
12
|
# File 'lib/pdfrb/model/type/outline.rb', line 12
def first; self[:First]; end
|
#has_items? ⇒ Boolean
20
21
22
|
# File 'lib/pdfrb/model/type/outline.rb', line 20
def has_items?
!!first
end
|
13
|
# File 'lib/pdfrb/model/type/outline.rb', line 13
def last; self[:Last]; end
|
#resolved_first ⇒ Object
24
25
26
27
28
29
|
# File 'lib/pdfrb/model/type/outline.rb', line 24
def resolved_first
ref = first
return nil unless ref && document
document.object(ref)
end
|
#resolved_last ⇒ Object
31
32
33
34
35
36
|
# File 'lib/pdfrb/model/type/outline.rb', line 31
def resolved_last
ref = last
return nil unless ref && document
document.object(ref)
end
|
11
|
# File 'lib/pdfrb/model/type/outline.rb', line 11
def type; self[:Type]; end
|