# File lib/pdf/writer/object/action.rb, line 24 24: def to_s 25: @parent.arc4.prepare(self) if @parent.encrypted? 26: res = "\n#{@oid} 0 obj\n<< /Type /Action" 27: if @type == :ilink 28: res << "\n/S /GoTo\n/D #{@parent.destinations[@label].oid} 0 R" 29: elsif @type == 'URI' 30: res << "\n/S /URI\n/URI (" 31: if @parent.encrypted? 32: res << PDF::Writer.escape(@parent.arc4.encrypt(@label)) 33: else 34: res << PDF::Writer.escape(@label) 35: end 36: res << ")\n" 37: end 38: res << ">>\nendobj" 39: end