{"id":9794,"date":"2024-12-09T00:57:24","date_gmt":"2024-12-08T16:57:24","guid":{"rendered":"http:\/\/www.yliyun.com\/?p=9794"},"modified":"2024-12-09T00:57:24","modified_gmt":"2024-12-08T16:57:24","slug":"pdf-%e5%86%85%e5%ae%b9%e6%8f%90%e5%8f%96%e5%af%b9%e6%af%94pymupdf4llm-%e5%92%8c-pdf-extract-api","status":"publish","type":"post","link":"http:\/\/www.yliyun.com\/2024\/12\/09\/pdf-%e5%86%85%e5%ae%b9%e6%8f%90%e5%8f%96%e5%af%b9%e6%af%94pymupdf4llm-%e5%92%8c-pdf-extract-api\/","title":{"rendered":"PDF \u5185\u5bb9\u63d0\u53d6\u5bf9\u6bd4Pymupdf4llm \u548c pdf-extract-api"},"content":{"rendered":"\n

\u4e0b\u9762\u662f\u5bf9\u6bd4 Pymupdf4llm<\/strong> \u548c pdf-extract-api<\/strong> \u4e24\u79cd\u5de5\u5177\u5728\u591a\u4e2a\u7ef4\u5ea6\u4e0a\u7684\u5206\u6790\uff1a<\/p>\n\n\n\n

1. \u5de5\u5177\u4ecb\u7ecd<\/strong><\/p>\n\n\n\n

\u2022 Pymupdf4llm<\/strong><\/p>\n\n\n\n

\u662f\u57fa\u4e8e PyMuPDF \u7684\u8f7b\u91cf\u7ea7\u5e93\uff0c\u7528\u4e8e\u89e3\u6790 PDF \u6587\u6863\u5e76\u5c06\u5176\u8f93\u51fa\u4e3a\u9002\u5408 LLM \u4f7f\u7528\u7684\u683c\u5f0f\u3002\u4e3b\u8981\u4fa7\u91cd\u6587\u672c\u63d0\u53d6\u548c\u7ed3\u6784\u5316\u5904\u7406\uff0c\u9002\u5408\u751f\u6210\u4e0a\u4e0b\u6587\u826f\u597d\u7684\u6bb5\u843d\uff0c\u4fbf\u4e8e\u7528\u4e8e LLM \u7684\u95ee\u7b54\u573a\u666f\u3002<\/p>\n\n\n\n

\u2022 pdf-extract-api<\/strong><\/p>\n\n\n\n

\u662f\u4e00\u4e2a\u57fa\u4e8e API \u7684\u5de5\u5177\uff0c\u4e13\u6ce8\u4e8e\u4ece PDF \u4e2d\u63d0\u53d6\u7279\u5b9a\u7684\u6570\u636e\uff08\u5982\u8868\u683c\u3001\u5143\u6570\u636e\u3001\u5173\u952e\u6bb5\u843d\u7b49\uff09\u3002\u5b83\u901a\u5e38\u63d0\u4f9b\u66f4\u7cbe\u7ec6\u7684\u914d\u7f6e\u9009\u9879\uff0c\u4e14\u9700\u8981\u5728\u7ebf\u670d\u52a1\u652f\u6301\u3002<\/p>\n\n\n\n

2. \u4f18\u70b9<\/strong><\/p>\n\n\n\n

Pymupdf4llm<\/strong><\/p>\n\n\n\n

\u2022 \u5f00\u6e90\u548c\u8f7b\u91cf\u5316<\/strong>\uff1a\u57fa\u4e8e PyMuPDF\uff0c\u4f9d\u8d56\u7b80\u5355\uff0c\u4e0d\u9700\u8981\u7f51\u7edc\u8bf7\u6c42\u3002<\/p>\n\n\n\n

\u2022 \u7075\u6d3b\u6027<\/strong>\uff1a\u652f\u6301\u672c\u5730\u5316\u90e8\u7f72\u548c\u5b9a\u5236\uff0c\u9002\u5408\u5bf9\u9690\u79c1\u654f\u611f\u7684\u6570\u636e\u5904\u7406\u3002<\/p>\n\n\n\n

\u2022 LLM\u4f18\u5316<\/strong>\uff1a\u6587\u672c\u63d0\u53d6\u7ecf\u8fc7\u4f18\u5316\uff0c\u66f4\u9002\u5408\u76f4\u63a5\u5582\u7ed9 LLM \u4f7f\u7528\u3002<\/p>\n\n\n\n

\u2022 \u793e\u533a\u652f\u6301<\/strong>\uff1a\u6709 Python \u793e\u533a\u7684\u5e7f\u6cdb\u652f\u6301\uff0c\u6587\u6863\u4e30\u5bcc\u3002<\/p>\n\n\n\n

pdf-extract-api<\/strong><\/p>\n\n\n\n

\u2022 \u7cbe\u786e\u63d0\u53d6<\/strong>\uff1a\u901a\u8fc7 API \u63d0\u4f9b\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u5982\u8bc6\u522b\u8868\u683c\u3001\u56fe\u50cf\u63d0\u53d6\u4ee5\u53ca\u7ed3\u6784\u5316\u5185\u5bb9\u5206\u79bb\u3002<\/p>\n\n\n\n

\u2022 \u4fbf\u6377\u6027<\/strong>\uff1a\u901a\u5e38\u4e0d\u9700\u8981\u7528\u6237\u8fc7\u591a\u4e86\u89e3 PDF \u5185\u90e8\u7ed3\u6784\uff0c\u9002\u5408\u5feb\u901f\u5b9e\u73b0\u63d0\u53d6\u76ee\u6807\u3002<\/p>\n\n\n\n

\u2022 \u6269\u5c55\u6027<\/strong>\uff1a\u53ef\u4e0e\u5176\u4ed6 API \u7ec4\u5408\u5b9e\u73b0\u590d\u6742\u4efb\u52a1\uff0c\u5982 OCR \u96c6\u6210\u5904\u7406\u626b\u63cf PDF\u3002<\/p>\n\n\n\n

3. \u7f3a\u70b9<\/strong><\/p>\n\n\n\n

Pymupdf4llm<\/strong><\/p>\n\n\n\n

\u2022 \u590d\u6742\u6027\u6709\u9650<\/strong>\uff1a\u5bf9\u975e\u5e38\u590d\u6742\u7684 PDF\uff08\u5982\u591a\u5c42\u5d4c\u5957\u3001\u8868\u683c\u3001\u56fe\u7247\uff09\u652f\u6301\u4e0d\u5982\u4e13\u4e1a\u5316\u5de5\u5177\u3002<\/p>\n\n\n\n

\u2022 \u624b\u52a8\u8c03\u6574\u9700\u6c42\u9ad8<\/strong>\uff1a\u5bf9\u63d0\u53d6\u540e\u7684\u6570\u636e\uff0c\u9700\u8981\u7f16\u5199\u4ee3\u7801\u8fdb\u4e00\u6b65\u6e05\u6d17\u548c\u6574\u7406\u3002<\/p>\n\n\n\n

pdf-extract-api<\/strong><\/p>\n\n\n\n

\u2022 \u4f9d\u8d56\u5728\u7ebf\u670d\u52a1<\/strong>\uff1a\u9700\u8981\u7f51\u7edc\u8bbf\u95ee\uff0c\u53ef\u80fd\u5bf9\u654f\u611f\u6587\u6863\u4e0d\u9002\u5408\u3002<\/p>\n\n\n\n

\u2022 \u6210\u672c\u95ee\u9898<\/strong>\uff1a\u901a\u5e38\u662f\u6536\u8d39\u670d\u52a1\uff0c\u4f7f\u7528\u91cf\u5927\u65f6\u8d39\u7528\u53ef\u80fd\u8f83\u9ad8\u3002<\/p>\n\n\n\n

\u2022 \u4e0a\u624b\u95e8\u69db\u9ad8<\/strong>\uff1a\u9700\u8981\u4e86\u89e3 API \u8c03\u7528\u7684\u57fa\u7840\uff0c\u590d\u6742\u8bbe\u7f6e\u53ef\u80fd\u589e\u52a0\u5b66\u4e60\u6210\u672c\u3002<\/p>\n\n\n\n

4. \u51c6\u5907\u5ea6\u4e0e\u4e0a\u624b\u96be\u5ea6<\/strong><\/p>\n\n\n\n

\u6307\u6807<\/strong> Pymupdf4llm<\/strong> pdf-extract-api<\/strong><\/p>\n\n\n\n

\u90e8\u7f72\u4e0e\u5b89\u88c5<\/strong> \u5b89\u88c5\u7b80\u5355\uff08pip install pymupdf \u7b49\uff09 \u9700\u8981\u6ce8\u518c API \u670d\u52a1\u5e76\u914d\u7f6e\u8bbf\u95ee\u6743\u9650<\/p>\n\n\n\n

\u5b66\u4e60\u66f2\u7ebf<\/strong> \u6613\u4e8e\u4e0a\u624b\uff0cPython \u5f00\u53d1\u8005\u53cb\u597d \u9700\u8981\u719f\u6089 API \u6587\u6863\uff0c\u914d\u7f6e\u53c2\u6570\u7a0d\u590d\u6742<\/p>\n\n\n\n

\u5b9a\u5236\u5316\u80fd\u529b<\/strong> \u9ad8\uff0c\u4ee3\u7801\u7075\u6d3b\uff0c\u81ea\u7531\u63a7\u5236\u8f93\u51fa\u5185\u5bb9\u548c\u683c\u5f0f \u4e2d\uff0c\u5b9a\u5236\u9700\u4f9d\u8d56 API \u63d0\u4f9b\u7684\u63a5\u53e3\u548c\u9009\u9879<\/p>\n\n\n\n

\u901f\u5ea6<\/strong> \u672c\u5730\u8fd0\u884c\uff0c\u901f\u5ea6\u5feb API \u8bf7\u6c42\u53d7\u7f51\u7edc\u548c\u670d\u52a1\u7aef\u6027\u80fd\u5f71\u54cd<\/p>\n\n\n\n

\u73af\u5883\u4f9d\u8d56<\/strong> \u672c\u5730\u8fd0\u884c\uff0c\u65e0\u9700\u8054\u7f51 \u9700\u8054\u7f51\u4f7f\u7528\u5728\u7ebf API \u670d\u52a1<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

\u603b\u7ed3\u4e0e\u5efa\u8bae<\/strong><\/p>\n\n\n\n

\u2022 \u9009\u62e9 Pymupdf4llm<\/strong>\uff1a<\/p>\n\n\n\n

\u5982\u679c\u4f60\u5e0c\u671b\u5b8c\u5168\u638c\u63a7 PDF \u7684\u63d0\u53d6\u903b\u8f91\u3001\u5bf9\u654f\u611f\u6570\u636e\u6709\u9690\u79c1\u4fdd\u62a4\u9700\u6c42\uff0c\u5e76\u503e\u5411\u4e8e\u672c\u5730\u5316\u8f7b\u91cf\u90e8\u7f72\uff0cPymupdf4llm \u662f\u4e0d\u9519\u7684\u9009\u62e9\u3002<\/p>\n\n\n\n

\u2022 \u9009\u62e9 pdf-extract-api<\/strong>\uff1a<\/p>\n\n\n\n

\u5982\u679c\u9700\u8981\u5feb\u901f\u5904\u7406\u590d\u6742\u7684 PDF \u4efb\u52a1\uff08\u5982\u8868\u683c\u89e3\u6790\u3001\u7cbe\u786e\u63d0\u53d6\u7279\u5b9a\u5185\u5bb9\uff09\uff0c\u4e14\u4e0d\u4ecb\u610f\u4f7f\u7528\u5728\u7ebf\u670d\u52a1\u548c\u652f\u4ed8\u4e00\u5b9a\u8d39\u7528\uff0c\u90a3\u4e48 pdf-extract-api \u66f4\u52a0\u9002\u5408\u3002<\/p>\n\n\n\n

\u6700\u7ec8\u9009\u62e9\u53d6\u51b3\u4e8e\u9879\u76ee\u7684\u590d\u6742\u6027\u3001\u9690\u79c1\u8981\u6c42\u548c\u5f00\u53d1\u8d44\u6e90<\/strong>\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

\u4e0b\u9762\u662f\u5bf9\u6bd4 Pymupdf4llm \u548c pdf-e […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[83,86],"tags":[89,79],"class_list":["post-9794","post","type-post","status-publish","format-standard","hentry","category-ai-rag","category-86","tag-pymupdf4llm-pdf-extract-api","tag-rag"],"_links":{"self":[{"href":"http:\/\/www.yliyun.com\/wp-json\/wp\/v2\/posts\/9794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.yliyun.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.yliyun.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.yliyun.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.yliyun.com\/wp-json\/wp\/v2\/comments?post=9794"}],"version-history":[{"count":1,"href":"http:\/\/www.yliyun.com\/wp-json\/wp\/v2\/posts\/9794\/revisions"}],"predecessor-version":[{"id":9796,"href":"http:\/\/www.yliyun.com\/wp-json\/wp\/v2\/posts\/9794\/revisions\/9796"}],"wp:attachment":[{"href":"http:\/\/www.yliyun.com\/wp-json\/wp\/v2\/media?parent=9794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.yliyun.com\/wp-json\/wp\/v2\/categories?post=9794"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.yliyun.com\/wp-json\/wp\/v2\/tags?post=9794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}