A tool for converting PDFs to text files using Ollama.
- Convert PDFs to text files locally, no token costs.
- Use the latest multimodal models supported by Ollama.
- Turn images and diagrams into detailed text descriptions.
- Python 3.10+
- Ollama installed and running locally
- Install Ollama
- Pull the default model:
ollama run qwen2.5vl:latest
Install using pip:
or uv:
uv tool install llama-scan
Basic usage:
llama-scan path/to/your/file.pdf
--output
,-o
: Output directory (default: "output")--model
,-m
: Ollama model to use (default: "qwen2.5vl:latest")--keep-images
,-k
: Keep the intermediate image files (default: False)--width
,-w
: Width of the resized images (0 to skip resizing; default: 0)--start
,-s
: Start page number (default: 0)--end
,-e
: End page number (default: 0)
Process specific pages with custom width:
llama-scan document.pdf --start 1 --end 5 --width 1000
Use a different Ollama model:
llama-scan document.pdf --model qwen2.5vl:3b