Skip to content

Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.

Update mineru/utils/pdf_image_tools.py

Xiaomeng Zhaoe010b0974ac3
diff --git a/mineru/utils/pdf_image_tools.py b/mineru/utils/pdf_image_tools.py
index 7347b9d5..450f024d 100644
--- a/mineru/utils/pdf_image_tools.py
+++ b/mineru/utils/pdf_image_tools.py
@@ -88,7 +88,7 @@ def load_images_from_pdf(
total_pages = end_page_id - start_page_id + 1
# 实际使用的进程数不超过总页数
- actual_threads = min(min(os.cpu_count() or 1, threads), total_pages)
+ actual_threads = min(os.cpu_count() or 1, threads, total_pages)
# 根据实际进程数分组页面范围
pages_per_thread = max(1, total_pages // actual_threads)