Historical document preservation with OCR