Image to PDF with OCR on Fedora Linux
sudo dnf install ocrmypdf tesseract tesseract-langpack-eng tesseract-langpack-fas ImageMagick
Convert to PDF, enhance clarity (e.g., for OCR), add filters:
magick 01.jpeg \ -resize 200% \ -colorspace Gray \ -sharpen 0x1 \ -contrast-stretch 0 \ -threshold 50% \ cleaned.pdf
Or for OCR preprocessing (especially with Tesseract):
magick 01.jpeg \ -resize 300% \ -colorspace Gray \ -normalize \ -sharpen 0x1 \ cleaned.pdf
Then apply OCR:
ocrmypdf -l eng+fas cleaned.pdf output.pdf