getDocument method