DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to pull text out of images inside PDFs and slides with Markitdown

Add the markitdown-ocr plugin so text in embedded images is extracted with a vision LLM.

Short answer: Install the plugin with pip install markitdown-ocr and an OpenAI-compatible client with pip install openai; then check installed plugins with markitdown --list-plugins; in Python, create a MarkItDown object with enable_plugins=True plus your llm_client and llm_model (the README uses OpenAI() and gpt-4o), then run md.convert("document_with_images.pdf"). All steps.

  • Research
  • Intermediate
  • 20 minutes
  • From the README
  • Claude Code
  • Codex
  • Cursor

Credentials. The plugin sends embedded images to the model provider behind your client, so do not run it on confidential files with a hosted model and keep the API key out of your code.

Who it is forSomeone converting slide decks and PDFs full of screenshots and scanned figures that come out blank.

The problemText that lives inside embedded images is invisible to a normal converter, so key numbers and labels go missing.

The outcomeMarkdown that includes the text from images in PDF, DOCX, PPTX and XLSX files.

What you need first

  • Python 3.10 through 3.14, ideally in a virtual environment
  • Optional dependency groups for each format, or [all] for everything
  • Optional: an OpenAI-compatible client for image descriptions and the markitdown-ocr plugin
  • Optional: an Azure Document Intelligence or Content Understanding resource, which is billed per call

Steps

  1. Install the plugin with pip install markitdown-ocr and an OpenAI-compatible client with pip install openai
  2. Check installed plugins with markitdown --list-plugins
  3. In Python, create a MarkItDown object with enable_plugins=True plus your llm_client and llm_model (the README uses OpenAI() and gpt-4o), then run md.convert("document_with_images.pdf")
  4. Print result.markdown and compare it with the plain conversion
  5. Remember that without an llm_client the plugin still loads but OCR is silently skipped

Prompt for your agent

Using microsoft/markitdown with the markitdown-ocr plugin, convert <file> to Markdown with an OpenAI-compatible client and model <model>. Show me which text came from embedded images that the plain converter missed.

Caveat. OCR quality and cost depend on the vision model you pick; every image is a model call.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for microsoft/markitdown and "Pull text out of images inside PDFs and slides"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer