Skip to content

ollama pdf2markdown.stub

Nicolas Cravino edited this page Apr 13, 2026 · 2 revisions

id: ollama-pdf2markdown name: OllamaPDF2Markdown repo_path: ~/Documents/sw30labs/repos/OllamaPDF2Markdown remote_url: https://github.com/sw30labs/OllamaPDF2Markdown.git primary_language: Python framework: Ollama + pdf2image + Mistral Small 3.1 24B ingested: 2026-04-13 last_commit_date: 2025-04-15

Purpose

Converts PDF files to Markdown by extracting pages as images and processing them through multimodal vision-language models locally via Ollama. Provides both GUI (Streamlit) and CLI interfaces with support for Mistral Small 3.1 24B and Llama 3.2 models.

Architecture

  • Two-interface approach: Streamlit GUI for end-users, Python CLI for automation/batch
  • PDF → Image conversion: pdf2image to JPEG with configurable quality
  • Multimodal vision-language processing: Ollama integration for local inference
  • Streaming and memory management: Explicit garbage collection between images, configurable delays
  • Progress tracking: Real-time progress indicators with processing time per image
  • Intermediate saving: Preserves progress every 5 images (CLI version)
  • Batch processing: Handles multiple PDFs with maintained order

Dependencies

  • ollama - local LLM serving
  • pdf2image - PDF to image conversion
  • Pillow - image manipulation
  • streamlit - GUI framework
  • Python stdlib (gc, logging, os, subprocess)

Key Features

  • Local PDF processing (private, no cloud API)
  • Multimodal model support (Mistral Small 3.1 24B, Llama 3.2)
  • 128k context window (Mistral) for large documents
  • Memory-efficient processing with GC and cleanup
  • Progress tracking and logging
  • Drag-and-drop GUI interface
  • Batch CLI processing
  • Configurable model and output directories
  • Error handling with graceful recovery

Tags

  • python
  • ocr
  • local-inference
  • ollama
  • cli
  • streamlit
  • developer-tools

Entities and Topics

Clone this wiki locally