OCR

Install OCRmyPDF from PyPI:

pip install ocrmypdf

ocrmypdf –output–ype pdfa –pdfa-image-compression jpeg input.pdf output.pdf