Replacing ScanSnap Manager on MacOS

This article is WIP that’s being updated as I learn more.

Status 2026-05

I published ringbinder, my CLI tool that finds all docs and images in given directories, uses Mistral API to OCR them, and stores the results in a searchable SQLite database.

Status 2026-04

  • I am still using ScanSnap Manager (Tahoe 26.4.1) for scanning docs.
  • In addition to ScanSnap, I also now have shortcuts for scanning docs from my iPhone into iCloud dirs. I use these for docs that don’t fit into ScanSnap.
  • I use both the script described below, as well as Mistral OCR API to OCR my documents.
  • I built a custom SQLite-based CLI tool in GoLang with AI’s help. It stores document paths and Mistral OCR data for all documents, and helps AI find relevant docs for me.

Status 2025-11

  • I’m on MacOS Tahoe now (26.0.1), and I’m still using ScanSnap Manager software for scanning. It still works. As of this writing it’s possible to download the latest MacOS version of the software (v7.2 L70) from here. You have to wait a bit for the download to start.
  • New fact: newer versions of MacOS (Tahoe+) have LiveText, which is a better OCR than even Apple Vision Framework. I was working on my own solution to integrate with it, but then thanks to this project: https://github.com/mkyt/OCRmyPDF-AppleOCR, I can actually use OCRmyPDF, which is a well maintained project, with LiveText as the OCR engine.
  • Because of the above, I disabled the OCR feature in all my ScanSnap Manager profiles.
  • I wrote the script (shown below this bullet list). You run it like this: ocrpdfs 2025-11-12 and it will OCR all pdfs in the directories listed in the script, which were “Added” (using the MacOS “file added” date) on or after the given date. Note that in the script you have to specify your pdf dirs in search_dirs on top, and you have to install python venv with the OCRmyPDF-AppleOCR project in some dir that you specify with venv_dir="$HOME/…" variable in the middle of the script.
  • So now my workflow is: run ScanSnap Manager to scan a bunch of pdfs, and afterwards, run the ocrpdfs command that makes them searchable.
ocrpdfs
#!/usr/bin/env bash
set -euo pipefail

search_dirs=(
"/path/to/some/pdfs"
"/another/path/to/pdfs"
)

usage() {
printf '%s\n' "Usage: ocrpdfs [--redo-ocr] [YYYY-MM-DD]" ""
printf '%s\n' "Run OCR on PDFs found in:"
for dir in "${search_dirs[@]}"; do
printf '  - %s\n' "$dir"
done
printf '\n%s\n' "Only PDFs added on or after the provided date (default: today) are processed."
printf '%s\n' "Use --redo-ocr to reprocess files that already contain embedded text."
}

redo="false"
input_date=""

while [[ $# -gt 0 ]]; do
case "$1" in
--redo-ocr)
redo="true"
shift
;;
-h|--help)
usage
exit 0
;;
--)
shift
break
;;
-*)
echo "Unknown option: $1" >&2
usage
exit 1
;;
*)
if [[ -n "$input_date" ]]; then
echo "Only one date argument is allowed." >&2
usage
exit 1
fi
input_date="$1"
shift
;;
esac
done

if [[ $# -gt 0 ]]; then
echo "Unexpected argument(s): $*" >&2
usage
exit 1
fi

if [[ -z "$input_date" ]]; then
target_date="$(date +%F)"
else
target_date="$input_date"
if ! python3 - "$target_date" <<'PY' 2>/dev/null; then
import sys
from datetime import date

try:
date.fromisoformat(sys.argv[1])
except ValueError:
sys.exit(1)
PY
echo "Invalid date (expected YYYY-MM-DD): $target_date" >&2
exit 1
fi
fi

venv_dir="$HOME/Engineering/ocrmypdf-appleocr-venv"
if [[ ! -d "$venv_dir" ]]; then
echo "Virtualenv not found at $venv_dir" >&2
exit 1
fi

# shellcheck disable=SC1091
source "$venv_dir/bin/activate"

if ! command -v ocrmypdf >/dev/null 2>&1; then
echo "ocrmypdf not found after activating $venv_dir" >&2
exit 1
fi

if ! command -v parallel >/dev/null 2>&1; then
echo "GNU parallel is required but was not found in PATH." >&2
exit 1
fi

existing_dirs=()
for dir in "${search_dirs[@]}"; do
if [[ -d "$dir" ]]; then
existing_dirs+=("$dir")
else
echo "Warning: directory not found: $dir" >&2
fi
done

if [[ ${#existing_dirs[@]} -eq 0 ]]; then
echo "No source directories are available to scan for PDFs." >&2
exit 1
fi

target_epoch=""
target_iso=""
if ! {
IFS= read -r target_epoch
IFS= read -r target_iso
} < <(python3 - "$target_date" <<'PY'
import sys
import time
from datetime import date, datetime, time as dtime

target = date.fromisoformat(sys.argv[1])
midnight = datetime.combine(target, dtime.min)
epoch = int(time.mktime(midnight.timetuple()))
print(epoch)
print(midnight.isoformat())
PY
); then
echo "Failed to establish comparison timestamp for $target_date." >&2
exit 1
fi

pdf_files=()
fallback_reason=""

if [[ -z "${OCRPDFS_FORCE_FILESYSTEM_SCAN:-}" ]] && command -v mdfind >/dev/null 2>&1; then
mdfind_query="kMDItemContentType == \"com.adobe.pdf\" && kMDItemDateAdded >= \$time.iso($target_iso)"
if tmpfile="$(mktemp 2>/dev/null)"; then
mdfind_cmd=(mdfind)
for dir in "${existing_dirs[@]}"; do
mdfind_cmd+=(-onlyin "$dir")
done
mdfind_cmd+=("$mdfind_query")

if "${mdfind_cmd[@]}" >"$tmpfile" 2>/dev/null; then
while IFS= read -r pdf; do
[[ -z "$pdf" ]] && continue
pdf_files+=("$pdf")
done <"$tmpfile"
else
fallback_reason="spotlight_failed"
fi
rm -f "$tmpfile"
else
fallback_reason="tmp_failed"
fi
else
if [[ -n "${OCRPDFS_FORCE_FILESYSTEM_SCAN:-}" ]]; then
fallback_reason="forced"
else
fallback_reason="spotlight_unavailable"
fi
fi

if [[ -n "$fallback_reason" ]]; then
case "$fallback_reason" in
forced)
echo "Info: Spotlight search disabled via OCRPDFS_FORCE_FILESYSTEM_SCAN; scanning filesystem instead." >&2
;;
spotlight_unavailable)
echo "Info: Spotlight (mdfind) unavailable; scanning filesystem instead." >&2
;;
spotlight_failed)
echo "Warning: Spotlight query failed; scanning filesystem instead." >&2
;;
tmp_failed)
echo "Warning: Unable to allocate temporary storage for Spotlight results; scanning filesystem instead." >&2
;;
esac

pdf_files=()
missing_metadata_count=0
missing_metadata_samples=()

while IFS= read -r -d '' pdf; do
date_added="$(mdls -raw -name kMDItemDateAdded "$pdf" 2>/dev/null | tr -d '\r')"

if [[ -z "$date_added" || "$date_added" == "(null)" ]]; then
((missing_metadata_count++))
if [[ ${#missing_metadata_samples[@]} -lt 5 ]]; then
missing_metadata_samples+=("$pdf")
fi
continue
fi

if date_added_epoch="$(date -j -f '%Y-%m-%d %H:%M:%S %z' "$date_added" '+%s' 2>/dev/null)"; then
if (( date_added_epoch >= target_epoch )); then
pdf_files+=("$pdf")
fi
else
echo "Warning: Unable to interpret Finder Date Added for $pdf (value: $date_added)." >&2
fi
done < <(find "${existing_dirs[@]}" -type f -iname '*.pdf' -print0)

if (( missing_metadata_count > 0 )); then
echo "Warning: Finder Date Added metadata unavailable for $missing_metadata_count file(s)." >&2
for sample in "${missing_metadata_samples[@]}"; do
echo "  - $sample" >&2
done
fi
fi

if [[ ${#pdf_files[@]} -eq 0 ]]; then
echo "No PDF files added on or after $target_date found."
exit 0
fi

success_marker="[✓]"
failure_marker="[x]"

process_file() {
local file="$1"

local -a args=(
ocrmypdf
-l eng
--plugin ocrmypdf_appleocr
--appleocr-recognition-mode livetext
--pdf-renderer sandwich
--jobs 1
)

if [[ "${redo}" == "true" ]]; then
args+=(--redo-ocr)
fi

args+=("$file" "$file")

local output=""

if output="$("${args[@]}" 2>&1)"; then
printf '%s %s\n' "$success_marker" "$file"
return 0
fi

local status=$?
local reason=""

if [[ $status -eq 6 && "${redo}" != "true" ]]; then
reason="already OCRed (use --redo-ocr)"
else
if [[ -n "$output" ]]; then
IFS=$'\n' read -r reason <<<"$output"
reason="${reason//$'\r'/}"
fi
if [[ -z "$reason" ]]; then
reason="failed (exit $status)"
fi
fi

printf '%s %s - %s\n' "$failure_marker" "$file" "$reason"

if [[ $status -ne 6 || "${redo}" == "true" ]]; then
[[ -n "$output" ]] && printf '%s\n' "$output" >&2
fi

return "$status"
}

parallel_jobs="${PARALLEL_JOBS:-}"
if [[ -z "$parallel_jobs" ]]; then
parallel_jobs="$(sysctl -n hw.ncpu 2>/dev/null || nproc 2>/dev/null || echo 1)"
fi

printf 'Processing %d PDF file(s) added on or after %s...\n' "${#pdf_files[@]}" "$target_date"

export -f process_file
export redo
export success_marker
export failure_marker
export SHELL="$(command -v bash)"

if ! parallel --will-cite --halt now,fail=1 --jobs "$parallel_jobs" --env redo --env success_marker --env failure_marker "process_file {}" ::: "${pdf_files[@]}"; then
status=$?
if [[ $status -eq 6 && "${redo}" != "true" ]]; then
echo "Existing OCR text detected. Re-run with --redo-ocr to replace existing text." >&2
fi
exit "$status"
fi

Status 2024-11

  • For now I ended up staying with ScanSnap Manager because it still functions in current MacOS Sequoia, and there’s nothing else producing similar results. I think I will wait until it no longer works, and end up upgrading the scanner.
  • I am trying to use OwlOCR app for making PDFs searchable, since I learned that the OCR in ScanSnap Manager is nowhere near as good as using the Apple Vision framework. OwlOCR uses Apple Vision framework and has a CLI (command line interface). When you give OwlOCR a non-searchable PDF, and save it as searchable, it produces much better results than ScanSnap Manager, recognizing all kinds of weird text formats.
  • Discovered that OwlOCR has a bug when you load many PDFs at once into it — the recognition will freeze. Want to try writing a loop with bash/CLI instead.

Background

I use an old Fujitsu ScanSnap S1500M. The first scan was in 2009 (15 years ago as of this writing), and it still works beautifully. I don’t want to replace it.

However, just now (November 2024) ScanSnap Manager software was discontinued in favor of ScanSnap Home. I went down the rabbit hole of making a better scanning pipeline to see if I can keep my scanner.

Note: I’m on latest MacOS Sequoia (15.1 at the time of this writing).

Does ScanSnap S1500M work with ScanSnap Home software?

Nobody on the internet answers this question. So here’s the answer.

If you have ScanSnap Manager installed, and you go ahead and install ScanSnap Home on top of it, it will do this weird thing where ScanSnap Home will actually start your ScanSnap Manager when you press the “scan” button in it. This may give you the impression that ScanSnap Home works with the old scanner, but it actually just delegates to ScanSnap Manager, which is why it seems to work. This of course doesn’t solve the problem that ScanSnap Manager is discontinued and can no longer be relied on.

If you use the ScanSnap Uninstaller to then uninstall the ScanSnap Manager, it will trigger ScanSnap Home to try to connect to your scanner directly. This will fail, because ScanSnap Home will not find your ScanSnap S1500M. It does not work with it at all, without also having the EOL’ed ScanSnap Manager installed. So no, ScanSnap Home does not work with S1500M, but it tricks you into thinking it does if you still have ScanSnap Manager installed.

Trying VueScan (this section is outdated, written circa ~2020-21)

VueScan has a lot of settings, but if you put most of them on Auto, then it will not produce as good results as ScanSnap Manager. You don’t get consistent results compared to ScanSnap Manager’s auto settings. This is unfortunate. Also, the cost of VueScan’s license doesn’t quite justify keeping the old scanner vs. upgrading to a new one.

Trying to use VueScan made me realized that “auto” settings are a priority for me — they should produce good results. I don’t want to adjust settings each time when scanning multi-page stacks.

Rough notes on open source solutions (outdated, ~2020-21)

  • SANE project has drivers for this scanner
  • sane-backends is the Homebrew package for scanimage tool and SANE drivers
  • ScanSnap Manager app has to be shut down for scanimage to recognize the scanner
  • There is only one good command line solution for making PDFs searchable that I could find that uses Apple Vision framework (instead of tesseract), and it’s OwlOCR app available on Mac App Store. It has command line interface. I immediately gave money to this guy. It worked really well on a simple test I did.
  • The problem with scanimage is that it doesn’t support auto-color, auto-resolution, etc. Which is why it’s still worth it to look into other options.

Code snippets in this post are covered by 0BSD License.


Tags
decision

Date
November 9, 2024