Вспоминали OCR - и тут по-моему лучшее https://github.com/VikParuchuri/surya и примкнувший к ней https://github.com/VikParuchuri/marker
Еще обсуждали раньше OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched https://github.com/ocrmypdf/OCRmyPDF но я его не пробовал
Post #1315
426