Class: PDF::Core::OutlineRoot Private

Inherits:
Object
  • Object
show all
Defined in:
lib/pdf/core/outline_root.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Document Outline root.

See Also:

  • PDF 1.7 spec, section 8.2.2 Document Outline

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeOutlineRoot

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of OutlineRoot.



22
23
24
# File 'lib/pdf/core/outline_root.rb', line 22

def initialize
  @count = 0
end

Instance Attribute Details

#countInteger

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

The total number of open items at all levels of the outline.

Returns:

  • (Integer)


12
13
14
# File 'lib/pdf/core/outline_root.rb', line 12

def count
  @count
end

#firstReference

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

The first top-level item in the outline.

Returns:



16
17
18
# File 'lib/pdf/core/outline_root.rb', line 16

def first
  @first
end

#lastReference

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

The last top-level item in the outline.

Returns:



20
21
22
# File 'lib/pdf/core/outline_root.rb', line 20

def last
  @last
end

Instance Method Details

#to_hashHash

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Hash representation of the outline root

Returns:

  • (Hash)


28
29
30
# File 'lib/pdf/core/outline_root.rb', line 28

def to_hash
  { Type: :Outlines, Count: count, First: first, Last: last }
end