Skip to content

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

fix(pdf-extract): adjust box threshold for OCR detection (#447)

Xiaomeng Zhao041b9465b94e
diff --git a/magic_pdf/model/pdf_extract_kit.py b/magic_pdf/model/pdf_extract_kit.py
index fcf26797..c94cbef0 100644
--- a/magic_pdf/model/pdf_extract_kit.py
+++ b/magic_pdf/model/pdf_extract_kit.py
@@ -139,7 +139,7 @@ class CustomPEKModel:
)
# 初始化ocr
if self.apply_ocr:
- self.ocr_model = ModifiedPaddleOCR(show_log=show_log)
+ self.ocr_model = ModifiedPaddleOCR(show_log=show_log, det_db_box_thresh=0.3)
# init structeqtable
if self.apply_table: