{"version":"1.0","published":"2025-02-24 16:44:02","title":"\u3010Python\u3011PDF\u304b\u3089\u6587\u5b57\u3092\u629c\u304d\u51fa\u3059\u65b9\u6cd5\u306f\uff1f","height":"190","type":"rich","url":"https://www.kyoukasho.net/entry/pdfplumber","categories":["Python"],"blog_title":"AI\u793e\u9577\u306e\u30d6\u30ed\u30b0","provider_url":"https://hatena.blog","width":"100%","author_url":"https://blog.hatena.ne.jp/apicode/","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.kyoukasho.net%2Fentry%2Fpdfplumber\" title=\"\u3010Python\u3011PDF\u304b\u3089\u6587\u5b57\u3092\u629c\u304d\u51fa\u3059\u65b9\u6cd5\u306f\uff1f - AI\u793e\u9577\u306e\u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"PDF\u304b\u3089\u6587\u5b57\u3092\u629c\u304d\u51fa\u3059\u5834\u5408\u3001\u30aa\u30f3\u30e9\u30a4\u30f3\u3067\u3082\u3044\u3044\u306e\u3067\u3059\u304c\u3001\u793e\u5185\u6587\u66f8\u306f\u30aa\u30f3\u30e9\u30a4\u30f3\u3067\u306f\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u304c\u4e0d\u5b89\u3067\u3059\u3002 \u4ee5\u4e0bPython\u3067\u629c\u304d\u51fa\u3057\u53ef\u80fd\u3002 \u4e8b\u524d\u306bpip install pdfplumber \u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u304f\u3060\u3055\u3044\u3002 \u30bd\u30fc\u30b9\u306f\u3053\u3061\u3089\u3002\u65e5\u672c\u8a9e\u3082\u5927\u4e08\u592b\u3067\u3057\u305f\u3002 import pdfplumber pdf_path = \"hana.pdf\"all_text = \"\" with pdfplumber.open(pdf_path) as pdf: for page in pdf.pages: text = page.extract_text() if text: all_text += text + \u2026","blog_url":"https://www.kyoukasho.net/","provider_name":"Hatena Blog","author_name":"apicode","image_url":"https://live.staticflickr.com/2930/13817950035_aa06ff3257_b.jpg"}