class PDF::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 PDF::Writer::Object::new
   # File lib/pdf/writer/object/outlines.rb
13 def initialize(parent)
14   super(parent)
15 
16   @list = []
17   @parent.catalog.outlines = self
18 end

Public Instance Methods

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