use get_length to get length of document