{"id":2695,"date":"2024-10-01T19:44:09","date_gmt":"2024-10-01T10:44:09","guid":{"rendered":"https:\/\/secondlife.lol\/?p=2695"},"modified":"2024-10-02T21:17:12","modified_gmt":"2024-10-02T12:17:12","slug":"python-pdf-image-processing-pillow-reportlab","status":"publish","type":"post","link":"https:\/\/secondlife.lol\/zh\/python-pdf-image-processing-pillow-reportlab\/","title":{"rendered":"Python PDF \u751f\u6210\uff1a\u4f7f\u7528 Pillow \u548c ReportLab \u8fdb\u884c\u56fe\u50cf\u5904\u7406"},"content":{"rendered":"<p class=\"wp-block-paragraph\"><a href=\"https:\/\/secondlife.lol\/zh\/python-directory-exploration-os-module\/\">\u4e0a\u4e00\u7bc7\u6587\u7ae0<\/a>\u6765\u4e86\u89e3\u5982\u4f55\u4f7f\u7528 Python \u6d4f\u89c8\u76ee\u5f55\u7ed3\u6784\u3002 \u90a3\u4e48\uff0c\u8ba9\u6211\u4eec\u66f4\u8fdb\u4e00\u6b65\uff1a\u4f7f\u7528 Python \u53ef\u4ee5\u975e\u5e38\u5bb9\u6613\u5730\u81ea\u52a8\u5b8c\u6210\u5c06\u591a\u4e2a\u56fe\u50cf\u6587\u4ef6\u8f6c\u6362\u6210\u4e00\u4e2a PDF \u7684\u4efb\u52a1\u3002 <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u672c\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u5c06\u5b66\u4e60\u5982\u4f55\u521b\u5efa Python PDF\uff0c\u4e3a\u6b64\uff0c\u6211\u4eec\u5c06\u4f7f\u7528 <strong><a href=\"https:\/\/python-pillow.org\/\" target=\"_blank\" rel=\"noopener\">\u6795\u5934<\/a>\u548c <a href=\"https:\/\/docs.reportlab.com\/\" data-type=\"link\" data-id=\"https:\/\/docs.reportlab.com\/\" target=\"_blank\" rel=\"noopener\">\u62a5\u544a\u5b9e\u9a8c\u5ba4<\/a> \u5982\u4f55\u4f7f\u7528\u56fe\u5e93\u5904\u7406\u56fe\u50cf\u5e76\u5c06\u5176\u8f6c\u6362\u4e3a PDF \u6587\u4ef6<\/strong>\u8fd9\u5bf9\u4e8e\u521b\u5efa\u62a5\u544a\u6216\u4f5c\u54c1\u96c6\u975e\u5e38\u6709\u7528\u3002\u672c\u5e16\u5c06\u5411\u60a8\u4f20\u6388\u521b\u5efa Python PDF \u6240\u9700\u7684\u6280\u80fd\u3002<\/p>\n\n\n<style>.kb-image2695_e21422-5a .kb-image-has-overlay:after{opacity:0.3;}.kb-image2695_e21422-5a img.kb-img, .kb-image2695_e21422-5a .kb-img img{box-shadow:0px 0px 14px 0px rgba(0, 0, 0, 0.2);}<\/style>\n<div class=\"wp-block-kadence-image kb-image2695_e21422-5a\"><figure class=\"aligncenter size-large\"><img decoding=\"async\" width=\"600\" height=\"258\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/09\/image-6-2-600x258.jpg\" alt=\"Python PDF \uc0dd\uc131\" class=\"kb-img wp-image-2696\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/09\/image-6-2-600x258.jpg 600w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/09\/image-6-2-300x129.jpg 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/09\/image-6-2-768x330.jpg 768w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/09\/image-6-2.jpg 1200w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure><\/div>\n\n\n<style>.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap{padding-top:var(--global-kb-spacing-sm, 1.5rem);padding-right:var(--global-kb-spacing-sm, 1.5rem);padding-bottom:var(--global-kb-spacing-sm, 1.5rem);padding-left:var(--global-kb-spacing-sm, 1.5rem);border-top:3px solid var(--global-palette2, #2B6CB0);border-right:3px solid var(--global-palette2, #2B6CB0);border-bottom:3px solid var(--global-palette2, #2B6CB0);border-left:3px solid var(--global-palette2, #2B6CB0);border-top-left-radius:5px;border-top-right-radius:5px;border-bottom-right-radius:5px;border-bottom-left-radius:5px;box-shadow:0px 0px 14px 0px rgba(0, 0, 0, 0.2);}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title-wrap{padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title-wrap{color:var(--global-palette2, #2B6CB0);}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title{color:var(--global-palette2, #2B6CB0);font-size:28px;font-weight:regular;font-style:normal;}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap .kb-table-of-content-list{color:var(--global-palette1, #3182CE);line-height:2em;font-weight:regular;font-style:normal;margin-top:var(--global-kb-spacing-sm, 1.5rem);margin-right:0px;margin-bottom:0px;margin-left:0px;}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap .kb-table-of-content-list .kb-table-of-contents__entry:hover{color:var(--global-palette6, #718096);}@media all and (max-width: 1024px){.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap{border-top:3px solid var(--global-palette2, #2B6CB0);border-right:3px solid var(--global-palette2, #2B6CB0);border-bottom:3px solid var(--global-palette2, #2B6CB0);border-left:3px solid var(--global-palette2, #2B6CB0);}}@media all and (max-width: 1024px){.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title{font-size:28px;}}@media all and (max-width: 767px){.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-content-wrap{border-top:3px solid var(--global-palette2, #2B6CB0);border-right:3px solid var(--global-palette2, #2B6CB0);border-bottom:3px solid var(--global-palette2, #2B6CB0);border-left:3px solid var(--global-palette2, #2B6CB0);}.kb-table-of-content-nav.kb-table-of-content-id83_5f28a6-34 .kb-table-of-contents-title{font-size:28px;}}<\/style>\n\n\n<h2 class=\"wp-block-heading\">\u6795\u5934\u5e93\uff1a\u56fe\u50cf\u5904\u7406\u57fa\u7840\u77e5\u8bc6<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u6795\u5934<\/strong>\u662f\u5728 Python \u4e2d\u5904\u7406\u56fe\u50cf\u6587\u4ef6\u6700\u5e38\u7528\u7684\u5e93\u4e4b\u4e00\uff0c\u53ef\u4ee5\u8f7b\u677e\u6253\u5f00\u56fe\u50cf\u3001\u8c03\u6574\u56fe\u50cf\u5927\u5c0f\u3001\u4ee5\u4e0d\u540c\u683c\u5f0f\u4fdd\u5b58\u56fe\u50cf\u7b49\u3002\u5728 PDF \u521b\u5efa\u4efb\u52a1\u4e2d\uff0c\u5b83\u7528\u4e8e\u68c0\u67e5\u56fe\u50cf\u7684\u5927\u5c0f\u548c\u5206\u8fa8\u7387\uff0c\u5e76\u5c06\u5176\u539f\u6837\u8f6c\u6362\u4e3a PDF\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b89\u88c5\u548c\u4f7f\u7528\u6795\u5934<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f7f\u7528 pip \u53ef\u4ee5\u8f7b\u677e\u5b89\u88c5 Pillow\u3002\u5982\u679c\u4f7f\u7528 VS \u4ee3\u7801\uff0c\u53ef\u4ee5\u5728\u7ec8\u7aef\u7a97\u53e3\u4e2d\u8fd0\u884c\u3002\u6211\u7684\u673a\u5668\u4e0a\u5df2\u7ecf\u5b89\u88c5\u4e86\u8be5\u8f6f\u4ef6\u5305\uff0c\u6240\u4ee5\u5b83\u663e\u793a\u5df2\u7ecf\u6ee1\u8db3\u5b89\u88c5\u8981\u6c42\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install Pillow<\/code><\/pre>\n\n\n<style>.kb-image2695_85f2a0-60 .kb-image-has-overlay:after{opacity:0.3;}.kb-image2695_85f2a0-60 img.kb-img, .kb-image2695_85f2a0-60 .kb-img img{box-shadow:0px 0px 14px 0px rgba(0, 0, 0, 0.2);}<\/style>\n<div class=\"wp-block-kadence-image kb-image2695_85f2a0-60\"><figure class=\"aligncenter size-full\"><img decoding=\"async\" width=\"730\" height=\"108\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/09\/image-7-5.jpg\" alt=\"Python PDF \uc0dd\uc131 \ud3ec\uc2a4\ud2b8 \ud130\ubbf8\ub110 \ucea1\uccd0 \uadf8\ub9bc\" class=\"kb-img wp-image-2708\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/09\/image-7-5.jpg 730w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/09\/image-7-5-300x44.jpg 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/09\/image-7-5-600x89.jpg 600w\" sizes=\"(max-width: 730px) 100vw, 730px\" \/><\/figure><\/div>\n\n\n\n<p class=\"wp-block-paragraph\">\u8ba9\u6211\u4eec\u6765\u770b\u4e00\u4e2a\u5b89\u88c5\u540e\u6253\u5f00\u548c\u9a8c\u8bc1\u56fe\u50cf\u7684\u7b80\u5355\u793a\u4f8b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u4ece PIL \u5bfc\u5165\u56fe\u50cf\n\nimg_path = \"C:\/Users\/user\/Documents\/lease_renewal_process.png\"\nimg = Image.open(img_path)\nprint(img.size) \u6253\u5370 # \u56fe\u50cf\u5927\u5c0f<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6bb5\u4ee3\u7801\u6267\u884c\u4f7f\u7528 Pillow \u6253\u5f00\u56fe\u50cf\u5e76\u8f93\u51fa\u56fe\u50cf\u5927\u5c0f\u7684\u57fa\u672c\u4efb\u52a1\u3002\u8fd9\u4e9b\u4fe1\u606f\u5728\u4ee5\u540e\u751f\u6210 PDF \u65f6\u975e\u5e38\u91cd\u8981\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u62a5\u544a\u5b9e\u9a8c\u5ba4\uff1a\u521b\u5efa PDF \u7684\u57fa\u7840\u77e5\u8bc6<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\u62a5\u544a\u5b9e\u9a8c\u5ba4<\/strong>\u662f\u4e00\u4e2a\u975e\u5e38\u6709\u7528\u7684\u5e93\uff0c\u53ef\u7528\u4e8e\u5728 Python \u4e2d\u521b\u5efa PDF\u3002\u60a8\u53ef\u4ee5\u81ea\u7531\u6dfb\u52a0\u6587\u672c\u3001\u56fe\u50cf\u3001\u5f62\u72b6\u7b49\uff0c\u751a\u81f3\u53ef\u4ee5\u8bbe\u7f6e\u81ea\u5b9a\u4e49\u9875\u9762\u5927\u5c0f\u3002\u5c06\u56fe\u50cf\u8f6c\u6362\u4e3a PDF \u65f6\uff0c\u60a8\u9700\u8981\u8bbe\u7f6e\u4e00\u4e2a\u9002\u5408\u56fe\u50cf\u5927\u5c0f\u7684\u9875\u9762\uff0c\u7136\u540e\u5728\u9875\u9762\u4e0a\u63d2\u5165\u56fe\u50cf\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b89\u88c5\u548c\u4f7f\u7528 ReportLab<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e5f\u53ef\u4f7f\u7528 pip \u547d\u4ee4\u5b89\u88c5 ReportLab\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install reportlab<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e0b\u9762\u6211\u4eec\u6765\u770b\u4e00\u4e2a\u5b89\u88c5\u540e\u521b\u5efa\u7b80\u5355 PDF \u6587\u4ef6\u7684\u4f8b\u5b50\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\u4ece reportlab.pdfgen \u5bfc\u5165 canvas\n\npdf_path = \"C:\/Users\/user\/Documents\/output.pdf\"\nc = canvas.Canvas(pdf_path)\nc.drawString(100, 750, \"\u4f60\u597d\uff0c\u8fd9\u662f PDF\uff01\")\nc.save()<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u8fd9\u6bb5\u4ee3\u7801\u5c06\u521b\u5efa\u4e00\u4e2a\u5e26\u6709 \"\u4f60\u597d\uff0c\u8fd9\u662f PDF\uff01\"\u6587\u672c\u7684 PDF \u6587\u4ef6\u3002\u60a8\u53ef\u4ee5\u5728 PDF \u9875\u9762\u4e2d\u6dfb\u52a0\u56fe\u50cf\u548c\u6587\u672c\uff0c\u8fd8\u53ef\u4ee5\u4f7f\u7528 <strong>Python PDF<\/strong>\u81ea\u52a8\u3002<\/p>\n\n\n<style>.kb-image2695_a17c7f-3f .kb-image-has-overlay:after{opacity:0.3;}.kb-image2695_a17c7f-3f img.kb-img, .kb-image2695_a17c7f-3f .kb-img img{box-shadow:0px 0px 14px 0px rgba(0, 0, 0, 0.2);}<\/style>\n<div class=\"wp-block-kadence-image kb-image2695_a17c7f-3f\"><figure class=\"aligncenter size-medium_large\"><img decoding=\"async\" width=\"768\" height=\"427\" src=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/09\/image-7-6-768x427.jpg\" alt=\"Python PDF \uc0dd\uc131 \ud3ec\uc2a4\ud2b8 pdf \uc0dd\uc131\uacb0\uacfc \ucea1\uccd0 \uadf8\ub9bc\" class=\"kb-img wp-image-2709\" srcset=\"https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/09\/image-7-6-768x427.jpg 768w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/09\/image-7-6-300x167.jpg 300w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/09\/image-7-6-600x333.jpg 600w, https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/09\/image-7-6.jpg 869w\" sizes=\"(max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4ece\u56fe\u50cf\u8f6c\u6362\u4e3a PDF<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u73b0\u5728\uff0c\u8ba9\u6211\u4eec\u6765\u770b\u4e00\u4e2a\u7ed3\u5408 Pillow \u548c ReportLab \u5c06\u591a\u4e2a\u56fe\u50cf\u6587\u4ef6\u8f6c\u6362\u4e3a\u5355\u4e00 PDF \u7684\u793a\u4f8b\uff0c\u5176\u4e2d\u6d89\u53ca\u5bfc\u5165\u591a\u4e2a\u56fe\u50cf\u6587\u4ef6\uff0c\u4e3a\u6bcf\u4e2a\u5c3a\u5bf8\u521b\u5efa\u4e00\u4e2a\u9875\u9762\uff0c\u5e76\u5c06\u56fe\u50cf\u6587\u4ef6\u63d2\u5165\u9875\u9762\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5b8c\u6574\u4ee3\u7801\u793a\u4f8b<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>\u5bfc\u5165 os\n\u4ece PIL \u5bfc\u5165\u56fe\u50cf\n\u4ece reportlab.pdfgen \u5bfc\u5165 canvas\n\ndef process_images(c, dir_path)\uff1a\n    img_list = sorted([img_name for img_name in os.listdir(dir_path) if img_name.endswith(\".png\")])\n    for img_name in img_list\uff1a\n        img_path = os.path.join(dir_path, img_name)\n        img = Image.open(img_path)\n        img_width, img_height = img.size\n        c.setPageSize((img_width, img_height)) # \u8bbe\u7f6e\u9875\u9762\u5927\u5c0f\u4ee5\u9002\u5e94\u56fe\u50cf\u5927\u5c0f\n        c.drawInlineImage(img_path, 0, 0, width=img_width, height=img_height) # \u63d2\u5165\u56fe\u50cf\n        c.showPage()\n\ndef create_pdf_from_images(main_dir, output_pdf)\uff1a\n    c = canvas.Canvas(output_pdf)\n    process_images(c, main_dir)\n    c.save()\n    print(f \"PDF \u6587\u4ef6\u521b\u5efa\uff1a{output_pdf}\")\n\nmain_dir = \"C:\/Users\/user\/Documents\/images\" # \u5b58\u50a8\u56fe\u50cf\u7684\u6587\u4ef6\u5939\uff08\u6839\u636e\u73af\u5883\u8fdb\u884c\u8c03\u6574\uff09\noutput_pdf = \"C:\/Users\/user\/Documents\/output.pdf\" # \u8f93\u51fa PDF \u7684\u8def\u5f84\uff08\u6839\u636e\u73af\u5883\u8c03\u6574\uff09\ncreate_pdf_from_images(main_dir, output_pdf)<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u4ee3\u7801\u8bf4\u660e<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u56fe\u50cf\u5904\u7406\u51fd\u6570<\/strong>\u6ce8\uff1a\u6b64\u529f\u80fd\u4ece\u6307\u5b9a\u76ee\u5f55\u5bfc\u5165 PNG \u6587\u4ef6\uff0c\u5904\u7406\u56fe\u50cf\uff0c\u5e76\u4e3a\u6bcf\u4e2a\u56fe\u50cf\u5927\u5c0f\u7684 PDF \u6dfb\u52a0\u9875\u9762\u3002<\/li>\n\n\n\n<li><strong>\u4ece\u56fe\u50cf\u521b\u5efa PDF \u51fd\u6570<\/strong>\u8bf4\u660e\uff1a\u6b64\u51fd\u6570\u521b\u5efa\u4e00\u4e2a\u753b\u5e03\u5bf9\u8c61\uff0c\u5904\u7406\u56fe\u50cf\u6587\u4ef6\uff0c\u5e76\u5c06\u5176\u4fdd\u5b58\u4e3a PDF \u6587\u4ef6\u3002<\/li>\n\n\n\n<li><strong>\u4f7f\u7528\u6795\u5934\u8fdb\u884c\u56fe\u50cf\u5904\u7406<\/strong>\u5173\u952e\u662f\u8981\u68c0\u67e5\u6bcf\u5f20\u56fe\u7247\u7684\u5927\u5c0f\uff0c\u786e\u4fdd PDF \u9875\u9762\u7684\u5927\u5c0f\u9002\u5408\u56fe\u7247\u3002<\/li>\n\n\n\n<li><strong>\u4f7f\u7528 ReportLab \u751f\u6210 PDF<\/strong>\u901a\u8fc7 Canvas \u5bf9\u8c61\u5c06\u6bcf\u4e2a\u56fe\u50cf\u6587\u4ef6\u9010\u9875\u8f6c\u6362\u4e3a PDF\uff0c\u6700\u540e\u4fdd\u5b58\u4e3a PDF \u6587\u4ef6\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u4ece\u56fe\u50cf\u8f6c\u6362\u4e3a PDF \u65f6\u7684\u6ce8\u610f\u4e8b\u9879<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f7f\u7528 Python \u751f\u6210 PDF \u6709\u4e00\u4e9b\u6ce8\u610f\u4e8b\u9879\u3002\u9996\u5148\uff0c\u60a8\u5e94\u8be5\u4e8b\u5148\u68c0\u67e5\u56fe\u50cf\u7684\u5206\u8fa8\u7387\u548c\u5927\u5c0f\uff1b\u5982\u679c\u9875\u9762\u5c3a\u5bf8\u8bbe\u7f6e\u5f97\u592a\u5c0f\uff0c\u56fe\u50cf\u53ef\u80fd\u65e0\u6cd5\u6b63\u5e38\u8f93\u51fa\u3002 \u60a8\u8fd8\u5e94\u8be5\u660e\u786e\u6307\u5b9a\u8981\u8f6c\u6362\u7684\u56fe\u50cf\u6587\u4ef6\u683c\u5f0f\uff0c\u56e0\u4e3a\u4e0d\u540c\u7684\u56fe\u50cf\u6269\u5c55\u540d\u53ef\u80fd\u9700\u8981\u4e0d\u540c\u7684\u5904\u7406\u65b9\u5f0f\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7ed3\u8bba\uff1aPython \u751f\u6210 PDF \u7684\u5b9e\u7528\u6027<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u672c\u5e16\u4e2d\uff0c\u6211\u4eec\u5c06\u4f7f\u7528 <strong>Python PDF<\/strong> \u4e86\u89e3\u521b\u4f5c\u3001 <strong>\u6795\u5934<\/strong>\u548c <strong>\u62a5\u544a\u5b9e\u9a8c\u5ba4<\/strong>\u901a\u8fc7\u8fd9\u79cd\u6280\u672f\uff0c\u60a8\u53ef\u4ee5\u5728\u5355\u4e2a PDF \u4e2d\u8bb0\u5f55\u591a\u4e2a\u56fe\u50cf\u6587\u4ef6\uff0c\u8fd9\u5bf9\u4e8e\u521b\u5efa\u62a5\u544a\u6216\u4f5c\u54c1\u96c6\u975e\u5e38\u6709\u7528\u3002 <strong>Python PDF<\/strong>\u5982\u679c\u60a8\u60f3\u81ea\u52a8\u5b8c\u6210\u521b\u5efa\u4efb\u52a1\uff0c\u8bf7\u6309\u7167\u672c\u5e16\u4e2d\u7684\u6b65\u9aa4\u64cd\u4f5c\uff01<\/p>","protected":false},"excerpt":{"rendered":"<p>\u5728\u4e0a\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u6211\u4eec\u8be6\u7ec6\u4ecb\u7ecd\u4e86\u5982\u4f55\u5728 Python \u4e2d\u6d4f\u89c8\u76ee\u5f55\u7ed3\u6784...<\/p>","protected":false},"author":3,"featured_media":2804,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"categories":[3],"tags":[294,292,291,296,290,293,295,215],"class_list":["post-2695","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python-coding","tag-pdf-","tag-pillow","tag-python-pdf","tag-python-pdf-","tag-reportlab","tag--pdf-","tag-295","tag-215"],"taxonomy_info":{"category":[{"value":3,"label":"\ud30c\uc774\uc36c(Python)"}],"post_tag":[{"value":294,"label":"PDF \uc0dd\uc131"},{"value":292,"label":"Pillow"},{"value":291,"label":"Python PDF"},{"value":296,"label":"Python PDF \uc791\uc131"},{"value":290,"label":"ReportLab"},{"value":293,"label":"\uc774\ubbf8\uc9c0 PDF \ubcc0\ud658"},{"value":295,"label":"\uc774\ubbf8\uc9c0 \ucc98\ub9ac"},{"value":215,"label":"\ud30c\uc774\uc36c \ucd08\ubcf4\uc790"}]},"featured_image_src_large":["https:\/\/secondlife.lol\/wp-content\/uploads\/2024\/10\/Python-PDF-\uc0dd\uc131-\ud3ec\uc2a4\ud2b8-\uc378\ub124\uc77c-600x600.jpg",600,600,true],"author_info":{"display_name":"TERE","author_link":"https:\/\/secondlife.lol\/zh\/author\/tere\/"},"comment_info":0,"category_info":[{"term_id":3,"name":"\ud30c\uc774\uc36c(Python)","slug":"python-coding","term_group":0,"term_taxonomy_id":3,"taxonomy":"category","description":"","parent":20,"count":119,"filter":"raw","cat_ID":3,"category_count":119,"category_description":"","cat_name":"\ud30c\uc774\uc36c(Python)","category_nicename":"python-coding","category_parent":20}],"tag_info":[{"term_id":294,"name":"PDF \uc0dd\uc131","slug":"pdf-%ec%83%9d%ec%84%b1","term_group":0,"term_taxonomy_id":294,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":292,"name":"Pillow","slug":"pillow","term_group":0,"term_taxonomy_id":292,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":291,"name":"Python PDF","slug":"python-pdf","term_group":0,"term_taxonomy_id":290,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":296,"name":"Python PDF \uc791\uc131","slug":"python-pdf-%ec%9e%91%ec%84%b1","term_group":0,"term_taxonomy_id":296,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":290,"name":"ReportLab","slug":"reportlab","term_group":0,"term_taxonomy_id":291,"taxonomy":"post_tag","description":"","parent":0,"count":1,"filter":"raw"},{"term_id":293,"name":"\uc774\ubbf8\uc9c0 PDF \ubcc0\ud658","slug":"%ec%9d%b4%eb%af%b8%ec%a7%80-pdf-%eb%b3%80%ed%99%98","term_group":0,"term_taxonomy_id":293,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":295,"name":"\uc774\ubbf8\uc9c0 \ucc98\ub9ac","slug":"%ec%9d%b4%eb%af%b8%ec%a7%80-%ec%b2%98%eb%a6%ac","term_group":0,"term_taxonomy_id":295,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"},{"term_id":215,"name":"\ud30c\uc774\uc36c \ucd08\ubcf4\uc790","slug":"%ed%8c%8c%ec%9d%b4%ec%8d%ac-%ec%b4%88%eb%b3%b4%ec%9e%90","term_group":0,"term_taxonomy_id":215,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw"}],"_links":{"self":[{"href":"https:\/\/secondlife.lol\/zh\/wp-json\/wp\/v2\/posts\/2695","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/secondlife.lol\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/secondlife.lol\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/zh\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/zh\/wp-json\/wp\/v2\/comments?post=2695"}],"version-history":[{"count":3,"href":"https:\/\/secondlife.lol\/zh\/wp-json\/wp\/v2\/posts\/2695\/revisions"}],"predecessor-version":[{"id":2712,"href":"https:\/\/secondlife.lol\/zh\/wp-json\/wp\/v2\/posts\/2695\/revisions\/2712"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/secondlife.lol\/zh\/wp-json\/wp\/v2\/media\/2804"}],"wp:attachment":[{"href":"https:\/\/secondlife.lol\/zh\/wp-json\/wp\/v2\/media?parent=2695"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/secondlife.lol\/zh\/wp-json\/wp\/v2\/categories?post=2695"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/secondlife.lol\/zh\/wp-json\/wp\/v2\/tags?post=2695"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}