cainteoir_document: create a get text length api