{"id":946730,"date":"2024-12-26T23:45:11","date_gmt":"2024-12-26T15:45:11","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/946730.html"},"modified":"2024-12-26T23:45:13","modified_gmt":"2024-12-26T15:45:13","slug":"python%e5%a6%82%e4%bd%95%e5%ae%89%e8%a3%85pdfkit","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/946730.html","title":{"rendered":"python\u5982\u4f55\u5b89\u88c5pdfkit"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25082802\/6c4b3dc8-66bf-4851-ba43-48b667eba9f9.webp\" alt=\"python\u5982\u4f55\u5b89\u88c5pdfkit\" \/><\/p>\n<p><p> <strong>\u8981\u5728Python\u4e2d\u5b89\u88c5PDFKit\uff0c\u4f60\u9700\u8981\u9996\u5148\u786e\u4fdd\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86wkhtmltopdf\u3001\u4f7f\u7528pip\u5b89\u88c5pdfkit\u5e93\u3001\u914d\u7f6epdfkit\u8def\u5f84\u3002<\/strong> \u5176\u4e2d\uff0c\u5b89\u88c5\u548c\u914d\u7f6ewkhtmltopdf\u662f\u6700\u4e3a\u5173\u952e\u7684\u4e00\u6b65\uff0c\u56e0\u4e3aPDFKit\u662f\u57fa\u4e8ewkhtmltopdf\u7684\u5de5\u5177\u6765\u8fdb\u884cPDF\u6587\u4ef6\u751f\u6210\u7684\u3002\u4e0b\u9762\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u6bcf\u4e2a\u6b65\u9aa4\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u5b89\u88c5WKHTMLTOPDF<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4e0b\u8f7dWKHTMLTOPDF<\/strong><\/p>\n<\/p>\n<p><p>wkhtmltopdf\u662f\u4e00\u4e2a\u5f00\u6e90\u5de5\u5177\uff0c\u7528\u4e8e\u5c06HTML\u9875\u9762\u8f6c\u6362\u4e3aPDF\u3002\u8981\u4f7f\u7528PDFKit\uff0c\u9996\u5148\u9700\u8981\u5728\u7cfb\u7edf\u4e2d\u5b89\u88c5wkhtmltopdf\u3002\u4f60\u53ef\u4ee5\u5728\u5176\u5b98\u65b9\u7f51\u7ad9\uff08<a href=\"https:\/\/wkhtmltopdf.org\/downloads.html%EF%BC%89%E4%B8%8B%E8%BD%BD%E9%80%82%E5%90%88%E4%BD%A0%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%E7%9A%84%E5%AE%89%E8%A3%85%E5%8C%85%E3%80%82%E6%A0%B9%E6%8D%AE%E4%B8%8D%E5%90%8C%E7%9A%84%E6%93%8D%E4%BD%9C%E7%B3%BB%E7%BB%9F%EF%BC%8C%E4%B8%8B%E8%BD%BD%E7%9B%B8%E5%BA%94%E7%9A%84%E7%89%88%E6%9C%AC%E3%80%82\">https:\/\/wkhtmltopdf.org\/downloads.html\uff09\u4e0b\u8f7d\u9002\u5408\u4f60\u64cd\u4f5c\u7cfb\u7edf\u7684\u5b89\u88c5\u5305\u3002\u6839\u636e\u4e0d\u540c\u7684\u64cd\u4f5c\u7cfb\u7edf\uff0c\u4e0b\u8f7d\u76f8\u5e94\u7684\u7248\u672c\u3002<\/a><\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b89\u88c5WKHTMLTOPDF<\/strong><\/p>\n<\/p>\n<p><p>\u4e0b\u8f7d\u5b8c\u6210\u540e\uff0c\u6839\u636e\u4f60\u7684\u64cd\u4f5c\u7cfb\u7edf\u8fdb\u884c\u5b89\u88c5\uff1a<\/p>\n<\/p>\n<ul>\n<li><strong>Windows<\/strong>: \u53cc\u51fb\u4e0b\u8f7d\u7684.exe\u6587\u4ef6\uff0c\u6839\u636e\u63d0\u793a\u5b8c\u6210\u5b89\u88c5\u3002<\/li>\n<li><strong>MacOS<\/strong>: \u4f7f\u7528\u547d\u4ee4\u884c\u5de5\u5177homebrew\u8fdb\u884c\u5b89\u88c5\uff0c\u547d\u4ee4\u5982\u4e0b\uff1a\n<pre><code>brew install wkhtmltopdf<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li><strong>Linux<\/strong>: \u53ef\u4ee5\u4f7f\u7528\u5305\u7ba1\u7406\u5de5\u5177\uff0c\u5982apt-get\u6216yum\u8fdb\u884c\u5b89\u88c5\u3002\u4f8b\u5982\u5728Debian\/Ubuntu\u7cfb\u7edf\u4e2d\uff0c\u6267\u884c\uff1a\n<pre><code>sudo apt-get install wkhtmltopdf<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u901a\u8fc7\u547d\u4ee4\u884c\u8f93\u5165<code>wkhtmltopdf -V<\/code>\u6765\u9a8c\u8bc1\u662f\u5426\u5b89\u88c5\u6210\u529f\u3002\u5982\u679c\u5b89\u88c5\u6210\u529f\uff0c\u4f1a\u663e\u793a\u51fawkhtmltopdf\u7684\u7248\u672c\u4fe1\u606f\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u4f7f\u7528PIP\u5b89\u88c5PDFKIT<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5PDFKIT<\/strong><\/p>\n<\/p>\n<p><p>\u786e\u4fdd\u4f60\u7684Python\u73af\u5883\u5df2\u7ecf\u5b89\u88c5\u4e86pip\u5de5\u5177\uff0c\u7136\u540e\u5728\u547d\u4ee4\u884c\u4e2d\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<\/p>\n<p><pre><code>pip install pdfkit<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9a8c\u8bc1\u5b89\u88c5<\/strong><\/p>\n<\/p>\n<p><p>\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u53ef\u4ee5\u5728Python\u4ea4\u4e92\u5f0f\u73af\u5883\u4e2d\u901a\u8fc7\u4ee5\u4e0b\u547d\u4ee4\u6765\u9a8c\u8bc1\u5b89\u88c5\u662f\u5426\u6210\u529f\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pdfkit<\/p>\n<p>print(pdfkit.__version__)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u914d\u7f6ePDFKIT\u8def\u5f84<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u8bbe\u7f6e\u73af\u5883\u53d8\u91cf<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u67d0\u4e9b\u60c5\u51b5\u4e0b\uff0cPDFKit\u53ef\u80fd\u65e0\u6cd5\u81ea\u52a8\u627e\u5230wkhtmltopdf\u7684\u5b89\u88c5\u8def\u5f84\u3002\u56e0\u6b64\uff0c\u4f60\u9700\u8981\u624b\u52a8\u8bbe\u7f6e\u8def\u5f84\u3002\u5728Python\u4ee3\u7801\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u6307\u5b9awkhtmltopdf\u7684\u8def\u5f84\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pdfkit<\/p>\n<p>path_wkhtmltopdf = &#39;\/path\/to\/wkhtmltopdf&#39;<\/p>\n<p>config = pdfkit.configuration(wkhtmltopdf=path_wkhtmltopdf)<\/p>\n<p>pdfkit.from_url(&#39;http:\/\/google.com&#39;, &#39;out.pdf&#39;, configuration=config)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8def\u5f84\u914d\u7f6e\u6ce8\u610f\u4e8b\u9879<\/strong><\/p>\n<\/p>\n<ul>\n<li><strong>Windows<\/strong>: \u901a\u5e38\u8def\u5f84\u7c7b\u4f3c\u4e8e<code>C:\\\\Program Files\\\\wkhtmltopdf\\\\bin\\\\wkhtmltopdf.exe<\/code>\u3002<\/li>\n<li><strong>MacOS\/Linux<\/strong>: \u53ef\u4ee5\u4f7f\u7528\u547d\u4ee4<code>which wkhtmltopdf<\/code>\u6765\u83b7\u53d6wkhtmltopdf\u7684\u8def\u5f84\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><p>\u56db\u3001\u4f7f\u7528PDFKIT\u751f\u6210PDF<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u4eceURL\u751f\u6210PDF<\/strong><\/p>\n<\/p>\n<p><p>\u4f7f\u7528PDFKit\u53ef\u4ee5\u5f88\u65b9\u4fbf\u5730\u4ece\u4e00\u4e2aURL\u751f\u6210PDF\u6587\u4ef6\u3002\u793a\u4f8b\u4ee3\u7801\u5982\u4e0b\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pdfkit<\/p>\n<p>pdfkit.from_url(&#39;http:\/\/google.com&#39;, &#39;out.pdf&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4eceHTML\u6587\u4ef6\u751f\u6210PDF<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u6709\u4e00\u4e2a\u672c\u5730\u7684HTML\u6587\u4ef6\uff0c\u53ef\u4ee5\u901a\u8fc7\u4ee5\u4e0b\u65b9\u5f0f\u751f\u6210PDF\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pdfkit<\/p>\n<p>pdfkit.from_file(&#39;test.html&#39;, &#39;out.pdf&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4ece\u5b57\u7b26\u4e32\u751f\u6210PDF<\/strong><\/p>\n<\/p>\n<p><p>\u4f60\u8fd8\u53ef\u4ee5\u76f4\u63a5\u4eceHTML\u5b57\u7b26\u4e32\u751f\u6210PDF\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import pdfkit<\/p>\n<p>html_str = &#39;&lt;h1&gt;Hello, World!&lt;\/h1&gt;&#39;<\/p>\n<p>pdfkit.from_string(html_str, &#39;out.pdf&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e94\u3001PDFKIT\u9ad8\u7ea7\u7528\u6cd5<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u914d\u7f6e\u9009\u9879<\/strong><\/p>\n<\/p>\n<p><p>PDFKit\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u914d\u7f6e\u9009\u9879\uff0c\u53ef\u4ee5\u901a\u8fc7\u5b57\u5178\u4f20\u9012\u7ed9PDFKit\u7684\u751f\u6210\u51fd\u6570\u3002\u4f8b\u5982\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">options = {<\/p>\n<p>    &#39;page-size&#39;: &#39;Letter&#39;,<\/p>\n<p>    &#39;margin-top&#39;: &#39;0.75in&#39;,<\/p>\n<p>    &#39;margin-right&#39;: &#39;0.75in&#39;,<\/p>\n<p>    &#39;margin-bottom&#39;: &#39;0.75in&#39;,<\/p>\n<p>    &#39;margin-left&#39;: &#39;0.75in&#39;,<\/p>\n<p>    &#39;encoding&#39;: &quot;UTF-8&quot;,<\/p>\n<p>    &#39;no-outline&#39;: None<\/p>\n<p>}<\/p>\n<p>pdfkit.from_url(&#39;http:\/\/google.com&#39;, &#39;out.pdf&#39;, options=options)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5904\u7406CSS<\/strong><\/p>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u7684HTML\u9700\u8981\u4f7f\u7528CSS\uff0c\u53ef\u4ee5\u901a\u8fc7<code>css<\/code>\u53c2\u6570\u4f20\u9012CSS\u6587\u4ef6\u8def\u5f84\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">pdfkit.from_file(&#39;test.html&#39;, &#39;out.pdf&#39;, css=&#39;style.css&#39;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u9519\u8bef\u5904\u7406<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u751f\u6210PDF\u65f6\uff0c\u53ef\u80fd\u4f1a\u9047\u5230\u4e00\u4e9b\u9519\u8bef\uff0c\u6bd4\u5982\u7f51\u7edc\u95ee\u9898\u3001HTML\u6587\u4ef6\u683c\u5f0f\u9519\u8bef\u7b49\u3002\u53ef\u4ee5\u901a\u8fc7\u6355\u83b7\u5f02\u5e38\u8fdb\u884c\u5904\u7406\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">try:<\/p>\n<p>    pdfkit.from_url(&#39;http:\/\/invalid-url.com&#39;, &#39;out.pdf&#39;)<\/p>\n<p>except IOError:<\/p>\n<p>    print(&quot;Error generating PDF&quot;)<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u516d\u3001PDFKIT\u7684\u5b9e\u9645\u5e94\u7528\u573a\u666f<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u81ea\u52a8\u5316\u62a5\u544a\u751f\u6210<\/strong><\/p>\n<\/p>\n<p><p>\u5728\u4f01\u4e1a\u5e94\u7528\u4e2d\uff0cPDFKit\u5e38\u7528\u4e8e\u751f\u6210\u81ea\u52a8\u5316\u7684\u62a5\u544a\u3002\u6bd4\u5982\u4ece\u4e00\u4e2aWeb\u5e94\u7528\u7a0b\u5e8f\u4e2d\u63d0\u53d6\u6570\u636e\u751f\u6210PDF\u62a5\u544a\uff0c\u53d1\u9001\u7ed9\u5ba2\u6237\u6216\u8005\u7528\u4e8e\u5b58\u6863\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7535\u5546\u5e73\u53f0\u53d1\u7968\u751f\u6210<\/strong><\/p>\n<\/p>\n<p><p>\u7535\u5546\u5e73\u53f0\u53ef\u4ee5\u4f7f\u7528PDFKit\u81ea\u52a8\u751f\u6210\u7528\u6237\u7684\u8d2d\u4e70\u53d1\u7968\uff0c\u5c06HTML\u683c\u5f0f\u7684\u53d1\u7968\u8f6c\u6362\u4e3aPDF\u6587\u4ef6\uff0c\u4f9b\u7528\u6237\u4e0b\u8f7d\u6216\u6253\u5370\u3002<\/p>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u6559\u5b66\u6750\u6599\u7684\u51c6\u5907<\/strong><\/p>\n<\/p>\n<p><p>\u6559\u5e08\u53ef\u4ee5\u4f7f\u7528PDFKit\u5c06\u5728\u7ebf\u8bfe\u7a0b\u5185\u5bb9\u8f6c\u6362\u4e3aPDF\u683c\u5f0f\uff0c\u65b9\u4fbf\u5b66\u751f\u4e0b\u8f7d\u5b66\u4e60\u3002<\/p>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u901a\u8fc7\u4ee5\u4e0a\u6b65\u9aa4\uff0c\u4f60\u53ef\u4ee5\u5728Python\u4e2d\u6210\u529f\u5b89\u88c5\u5e76\u4f7f\u7528PDFKit\uff0c\u751f\u6210\u5404\u79cd\u683c\u5f0f\u7684PDF\u6587\u4ef6\u3002\u8fd9\u4e0d\u4ec5\u80fd\u63d0\u9ad8\u6587\u6863\u5904\u7406\u7684\u6548\u7387\uff0c\u8fd8\u80fd\u5e2e\u52a9\u4f60\u5728\u4e0d\u540c\u7684\u5e94\u7528\u573a\u666f\u4e0b\u7075\u6d3b\u8fd0\u7528PDF\u751f\u6210\u6280\u672f\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u5b89\u88c5pdfkit\u5e93\uff1f<\/strong><br \/>\u8981\u5728Python\u4e2d\u5b89\u88c5pdfkit\u5e93\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528pip\u5de5\u5177\u3002\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<code>pip install pdfkit<\/code>\u3002\u786e\u4fdd\u60a8\u7684pip\u7248\u672c\u662f\u6700\u65b0\u7684\uff0c\u4ee5\u907f\u514d\u5b89\u88c5\u8fc7\u7a0b\u4e2d\u51fa\u73b0\u95ee\u9898\u3002<\/p>\n<p><strong>pdfkit\u5b89\u88c5\u540e\u9700\u8981\u914d\u7f6e\u4ec0\u4e48\u5417\uff1f<\/strong><br \/>\u662f\u7684\uff0cpdfkit\u4f9d\u8d56\u4e8ewkhtmltopdf\u5de5\u5177\uff0c\u56e0\u6b64\u5728\u5b89\u88c5pdfkit\u540e\uff0c\u60a8\u9700\u8981\u4e0b\u8f7d\u5e76\u5b89\u88c5wkhtmltopdf\u3002\u5b89\u88c5\u5b8c\u6210\u540e\uff0c\u786e\u4fdd\u5c06\u5176\u53ef\u6267\u884c\u6587\u4ef6\u7684\u8def\u5f84\u6dfb\u52a0\u5230\u7cfb\u7edf\u7684\u73af\u5883\u53d8\u91cf\u4e2d\uff0c\u4ee5\u4fbfpdfkit\u80fd\u591f\u627e\u5230\u5b83\u3002<\/p>\n<p><strong>\u5728\u4f7f\u7528pdfkit\u65f6\uff0c\u6709\u54ea\u4e9b\u5e38\u89c1\u7684\u95ee\u9898\u548c\u89e3\u51b3\u65b9\u6cd5\uff1f<\/strong><br \/>\u5e38\u89c1\u95ee\u9898\u5305\u62ecwkhtmltopdf\u672a\u627e\u5230\u6216\u6743\u9650\u4e0d\u8db3\u3002\u786e\u4fddwkhtmltopdf\u5df2\u6b63\u786e\u5b89\u88c5\u5e76\u5728\u73af\u5883\u53d8\u91cf\u4e2d\u3002\u5982\u679c\u9047\u5230\u6743\u9650\u95ee\u9898\uff0c\u53ef\u4ee5\u5c1d\u8bd5\u4ee5\u7ba1\u7406\u5458\u8eab\u4efd\u8fd0\u884c\u547d\u4ee4\u63d0\u793a\u7b26\u6216\u7ec8\u7aef\uff0c\u6216\u8005\u68c0\u67e5\u6587\u4ef6\u5939\u7684\u6743\u9650\u8bbe\u7f6e\u3002<\/p>\n<p><strong>pdfkit\u652f\u6301\u54ea\u4e9b\u8f93\u51fa\u683c\u5f0f\uff1f<\/strong><br \/>pdfkit\u4e3b\u8981\u7528\u4e8e\u5c06HTML\u6587\u4ef6\u8f6c\u6362\u4e3aPDF\u683c\u5f0f\u3002\u60a8\u53ef\u4ee5\u5c06HTML\u5b57\u7b26\u4e32\u3001URL\u6216\u672c\u5730HTML\u6587\u4ef6\u8def\u5f84\u4f5c\u4e3a\u8f93\u5165\uff0c\u5e76\u751f\u6210PDF\u6587\u4ef6\u3002\u6b64\u5916\uff0c\u60a8\u8fd8\u53ef\u4ee5\u901a\u8fc7\u81ea\u5b9a\u4e49\u9009\u9879\u8bbe\u7f6ePDF\u7684\u9875\u9762\u5927\u5c0f\u3001\u8fb9\u8ddd\u548c\u6253\u5370\u9009\u9879\u7b49\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"\u8981\u5728Python\u4e2d\u5b89\u88c5PDFKit\uff0c\u4f60\u9700\u8981\u9996\u5148\u786e\u4fdd\u7cfb\u7edf\u4e2d\u5b89\u88c5\u4e86wkhtmltopdf\u3001\u4f7f\u7528pip\u5b89\u88c5pdfki [&hellip;]","protected":false},"author":3,"featured_media":946735,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/946730"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=946730"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/946730\/revisions"}],"predecessor-version":[{"id":946737,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/946730\/revisions\/946737"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/946735"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=946730"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=946730"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=946730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}