class Writer::Object::Outlines

Define the outlines in the doc, empty for now

Attributes

list[R]

Public Class Methods

new(parent) click to toggle source
Calls superclass method
# File lib/pdf/writer/object/outlines.rb, line 13
def initialize(parent)
  super(parent)

  @list = []
  @parent.catalog.outlines = self
end

Public Instance Methods

to_s() click to toggle source
# File lib/pdf/writer/object/outlines.rb, line 22
def to_s
  if @list.empty?
    "\n#{@oid} 0 obj\n<< /Type /Outlines >>\nendobj"
  else
    "\n#{@oid} 0 obj\n<< /Type /Outlines /First #{@list[0].oid} 0 R /Last
    #{@list[-1].oid} 0 R>>\nendobj"
  end
end