Merge images and scans into searchable and selectable PDFs! The core logic resides in a Python script that transforms the files with Tesseract via OCRmyPDF. For information about available options, see the OCRmyPDF documentation.
A Bash script is provided to automate the installation of dependencies and the execution of the Python script. The Docker image provides a self-contained virtual environment that runs the Bash script in a container. The Google Colab notebook and GitHub Actions workflow both run the container in the cloud.
Note
Files in subfolders will be merged in alphabetical order, but will still be available individually.
Get up and going in no time with these options:
Are you on mobile or simply want an easy and seamless experience?
To add OCRmyPDF options, append them to the run
command.
Do you want to run it on your own machine, but don't want to clone the repo?
- Ensure you have Docker, or Bash and cURL, installed
- Make two new nested folders and put your files in them:
pdf/todo/*
- Run one of the following from the outer
pdf
folder:
If you want to skip building an image, just use mine:
docker run --rm -v .:/app/pdf ghcr.io/ipitio/ocr-pdf \
bash predict.sh pdf [OCRmyPDF options]
Don't want to install Docker? No problem!
curl -sSLNZ https://ipitio.github.io/ocr-pdf/src/predict.sh |\
bash -s -- . [OCRmyPDF options]
It's still as easy as 1, 2, 3!
- Fork and clone this repo
- Put your files in
pdf/todo/
- Complete one of the following from the root of the repo:
Enable Actions on GitHub, then push your files:
git add .
git commit -m "add files"
git push
# wait for the magic to happen
git pull
To add OCRmyPDF options, edit the command in the predict.yml
file before committing.
To avoid polluting your system, use Docker Compose (which is included with Docker Desktop):
docker compose up
To add OCRmyPDF options, edit the command in the compose.yml
file.
Do you want to make the most out of your hardware?
bash src/predict.sh pdf [OCRmyPDF options]