lyg
2025-05-14 acde3bd32f07bf02839a21e8fe5b4e69bfca2251
knowledgebase/doc/doc_convert.py
@@ -69,17 +69,3 @@
        print(f"文件 {docx_file} 已成功转换为 {pdf_file}!")
    except  Exception as e:
        print(f"出现错误: {e}")
def test():
    # doc_to_docx("D:\\projects\\KnowledgeBase\\doc\\XA-5D无人机探测大纲(公开).doc",
    #             "D:\\projects\\KnowledgeBase\\doc\\XA-5D无人机探测大纲(公开)111.docx")
    # docx_to_pdf("D:/workspace/PythonProjects/KnowledgeBase/doc/ZL格式(公开).docx",
    #             "D:/workspace/PythonProjects/KnowledgeBase/doc/ZL格式(公开).pdf")
    import pymupdf4llm
    md_text = pymupdf4llm.to_markdown("D:/workspace/PythonProjects/KnowledgeBase/doc/ZL格式(公开).pdf")
    print(md_text)
if __name__ == '__main__':
    test()