Paper recognition and alignment