Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
fix(magic_pdf): filter out formulas outside image bounds during cropped_img
myhloliee81b3398e1c
diff --git a/magic_pdf/model/pdf_extract_kit.py b/magic_pdf/model/pdf_extract_kit.pyindex 8504548a..fc7b98ca 100644--- a/magic_pdf/model/pdf_extract_kit.py+++ b/magic_pdf/model/pdf_extract_kit.py@@ -207,7 +207,8 @@ class CustomPEKModel:y0 = mf_ymin - ymin + paste_yx1 = mf_xmax - xmin + paste_xy1 = mf_ymax - ymin + paste_y- if any([x0 < 0, y0 < 0, x1 < 0, y1 < 0]) or any([x0 > new_width, y0 > new_height, x1 > new_width, y1 > new_height]):+ # 过滤在图外的公式块+ if any([x1 < 0, y1 < 0]) or any([x0 > new_width, y0 > new_height]):continueelse:adjusted_mfdetrec_res.append({