class PDF::Reader::Content

def decode_strings(obj)

strings outside of page content should be in either PDFDocEncoding or UTF-16.
def decode_strings(obj)
  case obj
  when String then 
    if obj[0,2] == "\376\377"
      PDF::Reader::Encoding::UTF16Encoding.new.to_utf8(obj)
    else
      PDF::Reader::Encoding::PDFDocEncoding.new.to_utf8(obj)
    end
  when Hash   then obj.each { |key,val| obj[key] = decode_strings(val) }
  when Array  then obj.collect { |item| decode_strings(item) }
  else
    obj
  end
end