Skip to content

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

fix: dup classify pdf type

icecraft4e7511fb8662
diff --git a/magic_pdf/tools/common.py b/magic_pdf/tools/common.py
index 4f416f40..d64328c4 100644
--- a/magic_pdf/tools/common.py
+++ b/magic_pdf/tools/common.py
@@ -123,6 +123,9 @@ def do_parse(
formula_enable=formula_enable,
table_enable=table_enable,
)
+ pipe_result = infer_result.pipe_txt_mode(
+ image_writer, debug_mode=True, lang=lang
+ )
else:
infer_result = ds.apply(
doc_analyze,
@@ -132,9 +135,9 @@ def do_parse(
formula_enable=formula_enable,
table_enable=table_enable,
)
- pipe_result = infer_result.pipe_auto_mode(
- image_writer, debug_mode=True, lang=lang
- )
+ pipe_result = infer_result.pipe_ocr_mode(
+ image_writer, debug_mode=True, lang=lang
+ )
elif parse_method == 'txt':
infer_result = ds.apply(