In reply to Joe.

Hi Joe. The current version of the script I have is:
ocrmypdf --rotate-pages --deskew "$1" tmp.pdf
trash "$1"
mv tmp.pdf "$1"