decode and extract text from documentreference
decode and extract text from documentreference