How To Install ocrmypdf on Fedora 34

ocrmypdf is Add an OCR text layer to scanned PDF files

Introduction

In this tutorial we learn how to install ocrmypdf on Fedora 34.

What is ocrmypdf

OCRmyPDF adds an OCR text layer to scanned PDF files, allowing them to be searched or copy-pasted.

We can use yum or dnf to install ocrmypdf on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install ocrmypdf.

Install ocrmypdf on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install ocrmypdf using dnf by running the following command:

sudo dnf -y install ocrmypdf

Install ocrmypdf on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install ocrmypdf using yum by running the following command:

sudo yum -y install ocrmypdf

How To Uninstall ocrmypdf on Fedora 34

To uninstall only the ocrmypdf package we can use the following command:

sudo dnf remove ocrmypdf

ocrmypdf Package Contents on Fedora 34

/usr/bin/ocrmypdf
/usr/lib/python3.9/site-packages/ocrmypdf
/usr/lib/python3.9/site-packages/ocrmypdf-11.7.3-py3.9.egg-info
/usr/lib/python3.9/site-packages/ocrmypdf-11.7.3-py3.9.egg-info/PKG-INFO
/usr/lib/python3.9/site-packages/ocrmypdf-11.7.3-py3.9.egg-info/SOURCES.txt
/usr/lib/python3.9/site-packages/ocrmypdf-11.7.3-py3.9.egg-info/dependency_links.txt
/usr/lib/python3.9/site-packages/ocrmypdf-11.7.3-py3.9.egg-info/entry_points.txt
/usr/lib/python3.9/site-packages/ocrmypdf-11.7.3-py3.9.egg-info/not-zip-safe
/usr/lib/python3.9/site-packages/ocrmypdf-11.7.3-py3.9.egg-info/requires.txt
/usr/lib/python3.9/site-packages/ocrmypdf-11.7.3-py3.9.egg-info/top_level.txt
/usr/lib/python3.9/site-packages/ocrmypdf/__init__.py
/usr/lib/python3.9/site-packages/ocrmypdf/__main__.py
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/__init__.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/__init__.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/__main__.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/__main__.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_concurrent.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_concurrent.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_graft.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_graft.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_jobcontext.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_jobcontext.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_logging.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_logging.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_pipeline.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_pipeline.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_plugin_manager.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_plugin_manager.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_sync.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_sync.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_unicodefun.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_unicodefun.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_validation.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_validation.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_version.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/_version.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/api.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/api.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/cli.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/cli.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/exceptions.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/exceptions.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/helpers.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/helpers.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/hocrtransform.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/hocrtransform.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/leptonica.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/leptonica.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/optimize.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/optimize.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/pdfa.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/pdfa.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/pluginspec.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/pluginspec.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/quality.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/__pycache__/quality.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/_concurrent.py
/usr/lib/python3.9/site-packages/ocrmypdf/_exec
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/__init__.py
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/__pycache__
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/__pycache__/__init__.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/__pycache__/__init__.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/__pycache__/ghostscript.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/__pycache__/ghostscript.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/__pycache__/jbig2enc.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/__pycache__/jbig2enc.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/__pycache__/pngquant.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/__pycache__/pngquant.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/__pycache__/tesseract.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/__pycache__/tesseract.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/__pycache__/unpaper.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/__pycache__/unpaper.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/ghostscript.py
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/jbig2enc.py
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/pngquant.py
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/tesseract.py
/usr/lib/python3.9/site-packages/ocrmypdf/_exec/unpaper.py
/usr/lib/python3.9/site-packages/ocrmypdf/_graft.py
/usr/lib/python3.9/site-packages/ocrmypdf/_jobcontext.py
/usr/lib/python3.9/site-packages/ocrmypdf/_logging.py
/usr/lib/python3.9/site-packages/ocrmypdf/_pipeline.py
/usr/lib/python3.9/site-packages/ocrmypdf/_plugin_manager.py
/usr/lib/python3.9/site-packages/ocrmypdf/_sync.py
/usr/lib/python3.9/site-packages/ocrmypdf/_unicodefun.py
/usr/lib/python3.9/site-packages/ocrmypdf/_validation.py
/usr/lib/python3.9/site-packages/ocrmypdf/_version.py
/usr/lib/python3.9/site-packages/ocrmypdf/api.py
/usr/lib/python3.9/site-packages/ocrmypdf/builtin_plugins
/usr/lib/python3.9/site-packages/ocrmypdf/builtin_plugins/__init__.py
/usr/lib/python3.9/site-packages/ocrmypdf/builtin_plugins/__pycache__
/usr/lib/python3.9/site-packages/ocrmypdf/builtin_plugins/__pycache__/__init__.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/builtin_plugins/__pycache__/__init__.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/builtin_plugins/__pycache__/ghostscript.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/builtin_plugins/__pycache__/ghostscript.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/builtin_plugins/__pycache__/tesseract_ocr.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/builtin_plugins/__pycache__/tesseract_ocr.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/builtin_plugins/ghostscript.py
/usr/lib/python3.9/site-packages/ocrmypdf/builtin_plugins/tesseract_ocr.py
/usr/lib/python3.9/site-packages/ocrmypdf/cli.py
/usr/lib/python3.9/site-packages/ocrmypdf/data
/usr/lib/python3.9/site-packages/ocrmypdf/data/sRGB.icc
/usr/lib/python3.9/site-packages/ocrmypdf/exceptions.py
/usr/lib/python3.9/site-packages/ocrmypdf/helpers.py
/usr/lib/python3.9/site-packages/ocrmypdf/hocrtransform.py
/usr/lib/python3.9/site-packages/ocrmypdf/leptonica.py
/usr/lib/python3.9/site-packages/ocrmypdf/lib
/usr/lib/python3.9/site-packages/ocrmypdf/lib/__init__.py
/usr/lib/python3.9/site-packages/ocrmypdf/lib/__pycache__
/usr/lib/python3.9/site-packages/ocrmypdf/lib/__pycache__/__init__.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/lib/__pycache__/__init__.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/lib/__pycache__/_leptonica.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/lib/__pycache__/_leptonica.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/lib/__pycache__/compile_leptonica.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/lib/__pycache__/compile_leptonica.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/lib/_leptonica.py
/usr/lib/python3.9/site-packages/ocrmypdf/lib/compile_leptonica.py
/usr/lib/python3.9/site-packages/ocrmypdf/optimize.py
/usr/lib/python3.9/site-packages/ocrmypdf/pdfa.py
/usr/lib/python3.9/site-packages/ocrmypdf/pdfinfo
/usr/lib/python3.9/site-packages/ocrmypdf/pdfinfo/__init__.py
/usr/lib/python3.9/site-packages/ocrmypdf/pdfinfo/__pycache__
/usr/lib/python3.9/site-packages/ocrmypdf/pdfinfo/__pycache__/__init__.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/pdfinfo/__pycache__/__init__.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/pdfinfo/__pycache__/info.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/pdfinfo/__pycache__/info.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/pdfinfo/__pycache__/layout.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/pdfinfo/__pycache__/layout.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/pdfinfo/info.py
/usr/lib/python3.9/site-packages/ocrmypdf/pdfinfo/layout.py
/usr/lib/python3.9/site-packages/ocrmypdf/pluginspec.py
/usr/lib/python3.9/site-packages/ocrmypdf/py.typed
/usr/lib/python3.9/site-packages/ocrmypdf/quality.py
/usr/lib/python3.9/site-packages/ocrmypdf/subprocess
/usr/lib/python3.9/site-packages/ocrmypdf/subprocess/__init__.py
/usr/lib/python3.9/site-packages/ocrmypdf/subprocess/__pycache__
/usr/lib/python3.9/site-packages/ocrmypdf/subprocess/__pycache__/__init__.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/subprocess/__pycache__/__init__.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/subprocess/__pycache__/_windows.cpython-39.opt-1.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/subprocess/__pycache__/_windows.cpython-39.pyc
/usr/lib/python3.9/site-packages/ocrmypdf/subprocess/_windows.py
/usr/share/bash-completion/completions/ocrmypdf
/usr/share/doc/ocrmypdf
/usr/share/doc/ocrmypdf/README.md
/usr/share/fish
/usr/share/fish/vendor_completions.d
/usr/share/fish/vendor_completions.d/ocrmypdf.fish
/usr/share/licenses/ocrmypdf
/usr/share/licenses/ocrmypdf/LICENSE

References

Summary

In this tutorial we learn how to install ocrmypdf on Fedora 34 using yum and dnf.