Scan the document.