diff --git a/src/ocrmypdf/exec/ghostscript.py b/src/ocrmypdf/exec/ghostscript.py index 0f2499e2..7c36eb30 100644 --- a/src/ocrmypdf/exec/ghostscript.py +++ b/src/ocrmypdf/exec/ghostscript.py @@ -42,7 +42,18 @@ if os.name == 'nt': if not GS: GS = which('gswin32c') if not GS: - raise MissingDependencyError("Ghostscript (gswin64c or gswin32c)") + raise MissingDependencyError( + """ + --------------------------------------------------------------------- + This error normally occurs when ocrmypdf can't Ghostscript. Please + ensure Ghostscript is installed and its location is added to the + system PATH environment variable. + + For details see: + https://ocrmypdf.readthedocs.io/en/latest/installation.html + --------------------------------------------------------------------- + """ + ) GS = Path(GS).stem diff --git a/src/ocrmypdf/leptonica.py b/src/ocrmypdf/leptonica.py index 6fbf2d99..a4dec30f 100644 --- a/src/ocrmypdf/leptonica.py +++ b/src/ocrmypdf/leptonica.py @@ -47,7 +47,16 @@ else: _libpath = find_library(libname) if not _libpath and os.name == 'nt': raise MissingDependencyError( - "Please ensure that 'tesseract' is on your PATH environment variable. " + """ + --------------------------------------------------------------------- + This error normally occurs when ocrmypdf can't find a file named + liblept-5.dll (Leptonica). Please ensure Tesseract-OCR is installed + and its location is added to the system PATH environment variable. + + For details see: + https://ocrmypdf.readthedocs.io/en/latest/installation.html + --------------------------------------------------------------------- + """ ) lept = ffi.dlopen(_libpath) lept.setMsgSeverity(lept.L_SEVERITY_WARNING)