class PDF::Reader::Parser

def string

Reads a PDF String from the buffer and converts it to a Ruby String
###############################################################################
def string
  str = @buffer.token
  return "".dup.force_encoding("binary") if str == ")"
  Error.assert_equal(parse_token, ")")
  str.gsub!(/\\(\r\n|[nrtbf()\\\n\r]|([0-7]{1,3}))?|\r\n?/m) do |match|
    if $2.nil? # not octal digits
      MAPPING[match] || "".dup
    else # must be octal digits
      ($2.oct & 0xff).chr # ignore high level overflow
    end
  end
  str.force_encoding("binary")
end