microsoft / microsoft/markitdown

[Bug] Vision-LLM conversion only processes the first page of scanned PDFs

Open
#1,791 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
186k
Forks
13.7k
Avg merge
1d 4h
Merged PRs (30d)
49

Description

Description:

I am using markitdown to convert scanned PDF documents into Markdown with options markitdown-ocr.
However, I found that when processing a multi-page scanned PDF, the tool only extracts the content of the first page and ignores the remaining pages.

screenshots

code

Image

result

Image

Environment Information

  • OS: Ubuntu 24.04.2 LTS

  • python: Python 3.12.13

  • markitdown info:

    • Name: markitdown
      Version: 0.1.5
      Summary: Utility tool for converting various files to Markdown
      Home-page:
      Author:
      Author-email: Adam Fourney adamfo@microsoft.com
      License-Expression: MIT
      Location: /root/miniconda3/envs/markitdown/lib/python3.12/site-packages
      Requires: beautifulsoup4, charset-normalizer, defusedxml, magika, markdownify, requests
      Required-by: markitdown-ocr
  • llm_client: I use the api from bailian, aliyun

    • And I've tested several models, the results are the same.
  • the tested file: 👇
    4-2南实党委〔 2024〕20号-关于印发《南湖实验室采购管理办法实施细则(试行)》的通知.pdf

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue with markitdown-ocr and the attached multi-page scanned PDF, checking whether only the first page reaches the Vision-LLM conversion path. Trace the PDF conversion entry point and verify the result contains content from every page; the issue is done when the full document is converted rather than only its first page.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.