added a way return BYTE string of a document