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: 1. 修复写markdown乱码 2. 更新readme
houlinfeng19ae33d83c05
diff --git a/projects/web_demo/README.md b/projects/web_demo/README.mdindex 3f85d6d9..95b36f1f 100644--- a/projects/web_demo/README.md+++ b/projects/web_demo/README.md@@ -36,7 +36,7 @@ pip3 install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple# 进入程序目录cd projects/web_demo/web_demo# 启动服务-python3 app.py+python3 app.py 或者 python app.py# 在浏览器访问启动的地址即可访问界面```diff --git a/projects/web_demo/web_demo/api/analysis/pdf_ext.py b/projects/web_demo/web_demo/api/analysis/pdf_ext.pyindex 2046fd31..b3a4a98d 100644--- a/projects/web_demo/web_demo/api/analysis/pdf_ext.py+++ b/projects/web_demo/web_demo/api/analysis/pdf_ext.py@@ -97,7 +97,7 @@ def analysis_pdf_task(pdf_dir, image_dir, pdf_path, is_ocr, analysis_pdf_id):full_md_content += item["md_content"] + "\n"full_md_name = "full.md"- with open(f"{pdf_dir}/{full_md_name}", "w") as file:+ with open(f"{pdf_dir}/{full_md_name}", "w", encoding="utf-8") as file:file.write(full_md_content)with app.app_context():full_md_link = url_for('analysis.mdview', filename=full_md_name, as_attachment=False)@@ -108,7 +108,7 @@ def analysis_pdf_task(pdf_dir, image_dir, pdf_path, is_ocr, analysis_pdf_id):for n, md in enumerate(json.loads(md_content)):md_content = md["md_content"]md_name = f"{md.get('page_no', n)}.md"- with open(f"{pdf_dir}/{md_name}", "w") as file:+ with open(f"{pdf_dir}/{md_name}", "w", encoding="utf-8") as file:file.write(md_content)md_url = url_for('analysis.mdview', filename=md_name, as_attachment=False)md_link_list.append(f"{md_url}&pdf={pdf_name}")