Automating paper-based processes