
pymupdf4llm
Open-source PDF-to-markdown for clean native PDFs, but unreliable on scans, dense tables, and images.
Strong on clean native PDFs, but brittle on scans and dense layouts
- You are converting clean, native-digital PDFs locally and want usable markdown without a hosted service.
- Your priority is readable prose and straightforward tables from well-structured pages.
- You can tolerate charts being reduced to OCR text and images being dropped.
- Your PDFs are scanned or OCR-heavy multi-column documents.
Our take
PyMuPDF4LLM is a solid local parser when the PDF is already clean and native-digital: it preserved prose, hierarchy, and straightforward tables well on the hybrid annual report, and it handled the narrative sections in the other digital report too. But its behavior is sharply bimodal rather than robust — dense financial statements, scanned multi-column pages, charts, and embedded images/logos/signatures all degraded into omissions, garbled picture-text blocks, or fragmented OCR text. For this use case, it is useful only when the source is already well-formed and text-heavy.
In-Depth Review
Our detailed analysis of pymupdf4llm — features, performance, and real-world testing.
Feature-by-Feature Breakdown
Native Text ExtractionReliable on clean native-digital prose, but OCR-heavy scanned pages become error-prone.▾
Feature tested: Native Text Extraction
Result: Passed
Verdict: Reliable on clean native-digital prose, but OCR-heavy scanned pages become error-prone.
Expected behavior: Extracts readable prose from native-digital report pages and keeps it in a coherent reading sequence. It handled the Target growth-story spread and the Sumitomo operating summary cleanly, but the scanned research paper introduced OCR spelling errors and column interleaving.
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_growth_section.png
Observed output: Output artifact (Image): The Target growth-story page was extracted cleanly, with prose preserved in reading order and no visible fragmentation. — pymupdf4llm_input1_hybridearnings_growth_section_parsed_success.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_growth_section.png
Output artifact: Output artifact (Image): The Target growth-story page was extracted cleanly, with prose preserved in reading order and no visible fragmentation. — pymupdf4llm_input1_hybridearnings_growth_section_parsed_success.png
What changed: Image transformed into Image
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input2_financialpdf_summary_section.png
Observed output: Output artifact (Image): The operating-performance summary was extracted as readable prose, with the section flow preserved. — pymupdf4llm_input2_financialpdf_summary_section_parsed_success.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input2_financialpdf_summary_section.png
Output artifact: Output artifact (Image): The operating-performance summary was extracted as readable prose, with the section flow preserved. — pymupdf4llm_input2_financialpdf_summary_section_parsed_success.png
What changed: Image transformed into Image
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input3_scannedpaper_multicolumn_text.png
Observed output: Output artifact (Image): The scanned multi-column page produced OCR errors and interleaved text, so the prose was no longer cleanly readable. — pymupdf4llm_input3_scannedpaper_multicolumn_text_parsed_failure.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input3_scannedpaper_multicolumn_text.png
Output artifact: Output artifact (Image): The scanned multi-column page produced OCR errors and interleaved text, so the prose was no longer cleanly readable. — pymupdf4llm_input3_scannedpaper_multicolumn_text_parsed_failure.png
What changed: Image transformed into Image
Why it matters / Conclusion: Best on clean, native text; not dependable once OCR and multi-column scanning enter the picture.
Extracts readable prose from native-digital report pages and keeps it in a coherent reading sequence. It handled the Target growth-story spread and the Sumitomo operating summary cleanly, but the scanned research paper introduced OCR spelling errors and column interleaving.






Document Structure and Reading-Order PreservationSection hierarchy holds on straightforward digital pages, but scanned layouts lose heading markup and logical flow.▾
Feature tested: Document Structure and Reading-Order Preservation
Result: Passed
Verdict: Section hierarchy holds on straightforward digital pages, but scanned layouts lose heading markup and logical flow.
Expected behavior: Preserves headings and section nesting on straightforward digital report pages, including business and summary sections. On scanned pages, headings lose markdown-level structure, the Table of Contents can disappear, and multi-column pages no longer read in a clean top-to-bottom order.
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_business_section.png
Observed output: Output artifact (Image): The business section kept its section structure and stayed readable in the extracted markdown. — pymupdf4llm_input1_hybridearnings_business_section_parsed_success.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_business_section.png
Output artifact: Output artifact (Image): The business section kept its section structure and stayed readable in the extracted markdown. — pymupdf4llm_input1_hybridearnings_business_section_parsed_success.png
What changed: Image transformed into Image
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input2_financialpdf_summary_section.png
Observed output: Output artifact (Image): The summary section preserved a clear heading hierarchy in the extracted text. — pymupdf4llm_input2_financialpdf_summary_section_parsed_success.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input2_financialpdf_summary_section.png
Output artifact: Output artifact (Image): The summary section preserved a clear heading hierarchy in the extracted text. — pymupdf4llm_input2_financialpdf_summary_section_parsed_success.png
What changed: Image transformed into Image
Test case: Image → Text prompt
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input2_financialpdf_toc_omitted.png
Observed output: Output artifact (Text prompt): Output
Input artifact: Input artifact (Image): Input — pymupdf4llm_input2_financialpdf_toc_omitted.png
Output artifact: Output artifact (Text prompt): Output
What changed: Image transformed into Text prompt
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input3_scannedpaper_study_area_header.png
Observed output: Output artifact (Image): The scanned heading lost markdown heading markers, and the surrounding text was no longer cleanly separated from the layout. — pymupdf4llm_input3_scannedpaper_study_area_header_parsed_failure.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input3_scannedpaper_study_area_header.png
Output artifact: Output artifact (Image): The scanned heading lost markdown heading markers, and the surrounding text was no longer cleanly separated from the layout. — pymupdf4llm_input3_scannedpaper_study_area_header_parsed_failure.png
What changed: Image transformed into Image
Why it matters / Conclusion: Works well for clean report structure, but scanned headings and TOCs are not preserved reliably.
Preserves headings and section nesting on straightforward digital report pages, including business and summary sections. On scanned pages, headings lose markdown-level structure, the Table of Contents can disappear, and multi-column pages no longer read in a clean top-to-bottom order.







Table ReconstructionClean native tables can be rebuilt, but dense financial statements and scanned tables break badly.▾
Feature tested: Table Reconstruction
Result: Passed
Verdict: Clean native tables can be rebuilt, but dense financial statements and scanned tables break badly.
Expected behavior: Reconstructs well-structured native-digital tables into readable markdown. The hybrid annual report table came through cleanly, while dense financial statements and scanned tables lost alignment, header associations, or the table itself.
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_financial_table.png
Observed output: Output artifact (Image): The financial summary table stayed aligned, with year/value associations preserved in readable markdown. — pymupdf4llm_input1_hybridearnings_financial_table_parsed_success.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_financial_table.png
Output artifact: Output artifact (Image): The financial summary table stayed aligned, with year/value associations preserved in readable markdown. — pymupdf4llm_input1_hybridearnings_financial_table_parsed_success.png
What changed: Image transformed into Image
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input2_financialpdf_quarterly_table.png
Observed output: Output artifact (Image): The quarterly balance-sheet table collapsed into garbled fragments, losing the table structure. — pymupdf4llm_input2_financialpdf_quarterly_table_parsed_failure.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input2_financialpdf_quarterly_table.png
Output artifact: Output artifact (Image): The quarterly balance-sheet table collapsed into garbled fragments, losing the table structure. — pymupdf4llm_input2_financialpdf_quarterly_table_parsed_failure.png
What changed: Image transformed into Image
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input3_scannedpaper_table_6.png
Observed output: Output artifact (Image): The scanned table merged narrative text into the table area and broke the column layout. — pymupdf4llm_input3_scannedpaper_table_6_parsed_failure.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input3_scannedpaper_table_6.png
Output artifact: Output artifact (Image): The scanned table merged narrative text into the table area and broke the column layout. — pymupdf4llm_input3_scannedpaper_table_6_parsed_failure.png
What changed: Image transformed into Image
Why it matters / Conclusion: Good on straightforward native tables, unreliable on dense financial or scanned table layouts.
Reconstructs well-structured native-digital tables into readable markdown. The hybrid annual report table came through cleanly, while dense financial statements and scanned tables lost alignment, header associations, or the table itself.






Chart and Figure Text CaptureIt can mine text from figures, but it does not preserve chart geometry or visual structure.▾
Feature tested: Chart and Figure Text Capture
Result: Passed
Verdict: It can mine text from figures, but it does not preserve chart geometry or visual structure.
Expected behavior: Recovers chart labels, titles, and numbers as OCR text inside picture-text wrappers. On the annual report charts it kept values and labels, while scanned figures degraded into fragmented OCR text blocks.
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_sales_and_ebit_chart.png
Observed output: Output artifact (Image): The bar chart's labels and values were recovered as text, but the bar graphics were lost. — pymupdf4llm_input1_hybridearnings_sales_and_ebit_chart_partial_success.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_sales_and_ebit_chart.png
Output artifact: Output artifact (Image): The bar chart's labels and values were recovered as text, but the bar graphics were lost. — pymupdf4llm_input1_hybridearnings_sales_and_ebit_chart_partial_success.png
What changed: Image transformed into Image
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_comparison_chart.png
Observed output: Output artifact (Image): The line chart title and legend survived only as fragmented OCR text, with no reconstructed plot geometry. — pymupdf4llm_input1_hybridearnings_comparison_chart_partial_success.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_comparison_chart.png
Output artifact: Output artifact (Image): The line chart title and legend survived only as fragmented OCR text, with no reconstructed plot geometry. — pymupdf4llm_input1_hybridearnings_comparison_chart_partial_success.png
What changed: Image transformed into Image
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input3_scannedpaper_figure_4.png
Observed output: Output artifact (Image): The scanned figure degraded into broken OCR text, so the chart itself was not reconstructed. — pymupdf4llm_input3_scannedpaper_figure_4_parsed_failure.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input3_scannedpaper_figure_4.png
Output artifact: Output artifact (Image): The scanned figure degraded into broken OCR text, so the chart itself was not reconstructed. — pymupdf4llm_input3_scannedpaper_figure_4_parsed_failure.png
What changed: Image transformed into Image
Why it matters / Conclusion: Useful if you only need figure text; not a faithful chart reconstruction tool.
Recovers chart labels, titles, and numbers as OCR text inside picture-text wrappers. On the annual report charts it kept values and labels, while scanned figures degraded into fragmented OCR text blocks.






Embedded Image RetentionStandalone visuals are a clear weak spot: they are dropped or turned into OCR text instead of being retained as images.▾
Feature tested: Embedded Image Retention
Result: Passed
Verdict: Standalone visuals are a clear weak spot: they are dropped or turned into OCR text instead of being retained as images.
Expected behavior: Retains standalone visuals such as portraits, logos, signatures, and header art. The Target CEO photo and signature disappeared, and the Sumitomo and USDA page headers were flattened into garbled repeated OCR text instead of being kept as images.
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_ceo_image.png
Observed output: Output artifact (Image): The CEO photo vanished with no image placeholder or retained image element. — pymupdf4llm_input1_hybridearnings_ceo_image_omitted_failure.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_ceo_image.png
Output artifact: Output artifact (Image): The CEO photo vanished with no image placeholder or retained image element. — pymupdf4llm_input1_hybridearnings_ceo_image_omitted_failure.png
What changed: Image transformed into Image
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_ceo_sign.png
Observed output: Output artifact (Image): The handwritten signature was omitted, leaving only surrounding text and the printed title. — pymupdf4llm_input1_hybridearnings_ceo_sign_omitted_failure.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_ceo_sign.png
Output artifact: Output artifact (Image): The handwritten signature was omitted, leaving only surrounding text and the printed title. — pymupdf4llm_input1_hybridearnings_ceo_sign_omitted_failure.png
What changed: Image transformed into Image
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input2_financialpdf_company_header.png
Observed output: Output artifact (Image): The company header/logo was converted into repeated garbled text rather than retained as a visual asset. — pymupdf4llm_input2_financialpdf_company_header_parsed_failure.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input2_financialpdf_company_header.png
Output artifact: Output artifact (Image): The company header/logo was converted into repeated garbled text rather than retained as a visual asset. — pymupdf4llm_input2_financialpdf_company_header_parsed_failure.png
What changed: Image transformed into Image
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input3_scannedpaper_usda_logo.png
Observed output: Output artifact (Image): The USDA header/logo area was flattened into corrupted OCR text instead of being kept as an image. — pymupdf4llm_input3_scannedpaper_usda_logo_parsed_failure.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input3_scannedpaper_usda_logo.png
Output artifact: Output artifact (Image): The USDA header/logo area was flattened into corrupted OCR text instead of being kept as an image. — pymupdf4llm_input3_scannedpaper_usda_logo_parsed_failure.png
What changed: Image transformed into Image
Why it matters / Conclusion: If visual assets matter, this is not the right parser.
Retains standalone visuals such as portraits, logos, signatures, and header art. The Target CEO photo and signature disappeared, and the Sumitomo and USDA page headers were flattened into garbled repeated OCR text instead of being kept as images.








Caption and Footnote AssociationFootnotes stay attached on clean tables, but scanned captions can be absorbed into the wrong block.▾
Feature tested: Caption and Footnote Association
Result: Passed
Verdict: Footnotes stay attached on clean tables, but scanned captions can be absorbed into the wrong block.
Expected behavior: Keeps footnotes grouped under clean native tables, but scanned figure/table captions can be folded into picture-text blocks or merged directly into table cells. The hybrid annual report preserved the table footnotes cleanly, while the scanned research paper merged the Table 6 caption into the table.
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_financial_table_footnotes.png
Observed output: Output artifact (Image): Footnotes (a) through (i) stayed directly associated with the financial summary table. — pymupdf4llm_input1_hybridearnings_financial_table_footnotes_parsed_success.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input1_hybridearnings_financial_table_footnotes.png
Output artifact: Output artifact (Image): Footnotes (a) through (i) stayed directly associated with the financial summary table. — pymupdf4llm_input1_hybridearnings_financial_table_footnotes_parsed_success.png
What changed: Image transformed into Image
Test case: Image → Image
Input type: Image
Input used: Input artifact (Image): Input — pymupdf4llm_input3_scannedpaper_table_6_caption.png
Observed output: Output artifact (Image): The Table 6 caption was merged into the extracted table rather than remaining separate from it. — pymupdf4llm_input3_scannedpaper_table_6_caption_parsed_failure.png
Input artifact: Input artifact (Image): Input — pymupdf4llm_input3_scannedpaper_table_6_caption.png
Output artifact: Output artifact (Image): The Table 6 caption was merged into the extracted table rather than remaining separate from it. — pymupdf4llm_input3_scannedpaper_table_6_caption_parsed_failure.png
What changed: Image transformed into Image
Why it matters / Conclusion: Precise on straightforward table footnotes, brittle on scanned captions and caption/table boundaries.
Keeps footnotes grouped under clean native tables, but scanned figure/table captions can be folded into picture-text blocks or merged directly into table cells. The hybrid annual report preserved the table footnotes cleanly, while the scanned research paper merged the Table 6 caption into the table.




Pricing
Open source, no paid tiers evaluated.
The report describes pymupdf4llm as free and open source (AGPL).
Banner Preview
How the embed badge will look on your site

Embed HTML
Copy this code to your website source
Quick Integration Guide
- 1Copy the HTML code block above.
- 2Paste it into your site's HTML or CMS editor.
- 3Banner appears instantly on your page.
- 4Links back to your tool profile here.
Similar Tools
Discover more AI tools like pymupdf4llm to enhance your workflow.