{"id":559,"date":"2025-12-06T19:02:41","date_gmt":"2025-12-06T11:02:41","guid":{"rendered":"https:\/\/www.52runoob.com\/?p=559"},"modified":"2025-12-06T19:02:41","modified_gmt":"2025-12-06T11:02:41","slug":"%e5%89%8d%e7%ab%af%e5%ae%9e%e7%8e%b0pdf%e6%96%87%e4%bb%b6%e9%a2%84%e8%a7%88%e7%9a%84%e6%93%8d%e4%bd%9c%e6%ad%a5%e9%aa%a4%e6%96%b9%e6%b3%95","status":"publish","type":"post","link":"https:\/\/www.52runoob.com\/index.php\/2025\/12\/06\/%e5%89%8d%e7%ab%af%e5%ae%9e%e7%8e%b0pdf%e6%96%87%e4%bb%b6%e9%a2%84%e8%a7%88%e7%9a%84%e6%93%8d%e4%bd%9c%e6%ad%a5%e9%aa%a4%e6%96%b9%e6%b3%95\/","title":{"rendered":"\u524d\u7aef\u5b9e\u73b0pdf\u6587\u4ef6\u9884\u89c8\u7684\u64cd\u4f5c\u6b65\u9aa4\u65b9\u6cd5"},"content":{"rendered":"\n<p>\u597d\u7684\uff0c\u6211\u7ed9\u4f60\u6574\u7406\u4e00\u4efd <strong>\u524d\u7aef\u5b9e\u73b0 PDF \u6587\u4ef6\u9884\u89c8\u7684\u5b8c\u6574\u64cd\u4f5c\u6b65\u9aa4\u65b9\u6cd5\uff082025 \u6700\u65b0\u7248\uff09<\/strong>\uff0c\u5305\u542b\u6d4f\u89c8\u5668\u539f\u751f\u65b9\u6cd5\u3001PDF.js \u5b9e\u73b0\u3001\u6587\u4ef6\u4e0a\u4f20\u52a8\u6001\u9884\u89c8\uff0c\u4ee5\u53ca\u5206\u9875\u548c\u7f29\u653e\u529f\u80fd\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\ude80 \u524d\u7aef\u5b9e\u73b0 PDF \u6587\u4ef6\u9884\u89c8\u6b65\u9aa4<\/h1>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e00\u3001\u4f7f\u7528\u6d4f\u89c8\u5668\u539f\u751f\u65b9\u6cd5\uff08\u5feb\u901f\u5b9e\u73b0\uff09<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">1\ufe0f\u20e3 <code>&lt;iframe&gt;<\/code> \u6807\u7b7e<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&amp;lt;iframe src=&quot;example.pdf&quot; width=&quot;100%&quot; height=&quot;600px&quot;&gt;&amp;lt;\/iframe&gt;\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">2\ufe0f\u20e3 <code>&lt;embed&gt;<\/code> \u6807\u7b7e<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&amp;lt;embed src=&quot;example.pdf&quot; type=&quot;application\/pdf&quot; width=&quot;100%&quot; height=&quot;600px&quot; \/&gt;\n\n<\/pre><\/div>\n\n\n<p>\u2705 \u4f18\u70b9\uff1a\u7b80\u5355\uff0c\u65e0\u9700\u7b2c\u4e09\u65b9\u5e93<br>\u26a0\ufe0f \u7f3a\u70b9\uff1a\u79fb\u52a8\u7aef\u517c\u5bb9\u6027\u5dee\uff0c\u529f\u80fd\u6709\u9650\uff08\u65e0\u6cd5\u5206\u9875\u3001\u7f29\u653e\u3001\u8df3\u9875\u63a7\u5236\uff09<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e8c\u3001\u4f7f\u7528 PDF.js \u6e32\u67d3 PDF\uff08\u63a8\u8350\uff09<\/h2>\n\n\n\n<p>PDF.js \u662f Mozilla \u5b98\u65b9\u5f00\u6e90\u5e93\uff0c\u53ef\u5728\u524d\u7aef\u6e32\u67d3 PDF\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">1\ufe0f\u20e3 \u5b89\u88c5 PDF.js<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnpm install pdfjs-dist\n\n<\/pre><\/div>\n\n\n<h3 class=\"wp-block-heading\">2\ufe0f\u20e3 \u57fa\u7840\u6e32\u67d3\u793a\u4f8b<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&amp;lt;canvas id=&quot;pdfCanvas&quot;&gt;&amp;lt;\/canvas&gt;\n\n&amp;lt;script type=&quot;module&quot;&gt;\nimport * as pdfjsLib from &quot;pdfjs-dist\/build\/pdf&quot;;\nimport pdfjsWorker from &quot;pdfjs-dist\/build\/pdf.worker.entry&quot;;\n\npdfjsLib.GlobalWorkerOptions.workerSrc = pdfjsWorker;\n\nconst url = &#039;example.pdf&#039;;\nconst canvas = document.getElementById(&#039;pdfCanvas&#039;);\nconst ctx = canvas.getContext(&#039;2d&#039;);\n\nasync function renderPDF(url, pageNumber = 1) {\n  const pdf = await pdfjsLib.getDocument(url).promise;\n  const page = await pdf.getPage(pageNumber);\n  const viewport = page.getViewport({ scale: 1.5 });\n  canvas.width = viewport.width;\n  canvas.height = viewport.height;\n\n  await page.render({ canvasContext: ctx, viewport }).promise;\n}\n\nrenderPDF(url);\n&amp;lt;\/script&gt;\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e09\u3001\u7528\u6237\u4e0a\u4f20 PDF \u52a8\u6001\u9884\u89c8<\/h2>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&amp;lt;input type=&quot;file&quot; id=&quot;fileInput&quot; accept=&quot;application\/pdf&quot; \/&gt;\n&amp;lt;canvas id=&quot;pdfCanvas&quot;&gt;&amp;lt;\/canvas&gt;\n\n&amp;lt;script type=&quot;module&quot;&gt;\nimport * as pdfjsLib from &quot;pdfjs-dist\/build\/pdf&quot;;\nimport pdfjsWorker from &quot;pdfjs-dist\/build\/pdf.worker.entry&quot;;\n\npdfjsLib.GlobalWorkerOptions.workerSrc = pdfjsWorker;\n\nconst input = document.getElementById(&quot;fileInput&quot;);\nconst canvas = document.getElementById(&quot;pdfCanvas&quot;);\nconst ctx = canvas.getContext(&quot;2d&quot;);\n\ninput.addEventListener(&quot;change&quot;, async (e) =&gt; {\n  const file = e.target.files&#x5B;0];\n  if (!file) return;\n\n  const fileURL = URL.createObjectURL(file);\n  const pdf = await pdfjsLib.getDocument(fileURL).promise;\n  const page = await pdf.getPage(1);\n\n  const viewport = page.getViewport({ scale: 1.5 });\n  canvas.width = viewport.width;\n  canvas.height = viewport.height;\n\n  await page.render({ canvasContext: ctx, viewport }).promise;\n});\n&amp;lt;\/script&gt;\n\n<\/pre><\/div>\n\n\n<p>\u2705 \u7279\u70b9\uff1a\u652f\u6301\u7528\u6237\u4e0a\u4f20\u6587\u4ef6\uff0c\u52a8\u6001\u9884\u89c8<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u56db\u3001\u589e\u5f3a\u529f\u80fd\uff08\u5206\u9875\u3001\u7f29\u653e\u3001\u65cb\u8f6c\uff09<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u5206\u9875\u6d4f\u89c8<\/strong><\/li>\n<\/ol>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nlet currentPage = 1;\n\nasync function nextPage(pdf) {\n  if(currentPage &amp;lt; pdf.numPages) currentPage++;\n  const page = await pdf.getPage(currentPage);\n  const viewport = page.getViewport({ scale: 1.5 });\n  canvas.width = viewport.width;\n  canvas.height = viewport.height;\n  await page.render({ canvasContext: ctx, viewport }).promise;\n}\n\n<\/pre><\/div>\n\n\n<ol start=\"2\" class=\"wp-block-list\">\n<li><strong>\u7f29\u653e<\/strong><\/li>\n<\/ol>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nconst viewport = page.getViewport({ scale: 2.0 }); \/\/ \u7f29\u653e\u500d\u6570\n\n<\/pre><\/div>\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li><strong>\u65cb\u8f6c<\/strong><\/li>\n<\/ol>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nconst viewport = page.getViewport({ scale: 1.5, rotation: 90 });\n\n<\/pre><\/div>\n\n\n<ol start=\"4\" class=\"wp-block-list\">\n<li><strong>\u8fdc\u7a0b PDF + \u9274\u6743<\/strong><\/li>\n<\/ol>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nconst res = await fetch(url, { headers: { Authorization: &quot;Bearer token&quot; } });\nconst blob = await res.blob();\nconst pdf = await pdfjsLib.getDocument(URL.createObjectURL(blob)).promise;\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e94\u3001\u4f7f\u7528\u7ec4\u4ef6\u5e93\u5c01\u88c5\uff08Vue \/ React \/ Angular\uff09<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u6846\u67b6<\/th><th>\u63a8\u8350\u5e93<\/th><th>\u7279\u70b9<\/th><\/tr><\/thead><tbody><tr><td>Vue3<\/td><td><code>vue-pdf<\/code><\/td><td>\u5c01\u88c5 PDF.js\uff0c\u652f\u6301\u5206\u9875\u3001\u7f29\u653e<\/td><\/tr><tr><td>React<\/td><td><code>react-pdf<\/code><\/td><td>React \u7ec4\u4ef6\u5316\uff0c\u529f\u80fd\u5168\u9762<\/td><\/tr><tr><td>Angular<\/td><td><code>ngx-extended-pdf-viewer<\/code><\/td><td>\u5f3a\u5927\u529f\u80fd\uff0c\u652f\u6301\u7f29\u653e\u3001\u641c\u7d22\u3001\u6ce8\u91ca<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Vue3 \u793a\u4f8b<\/strong><\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&amp;lt;template&gt;\n  &amp;lt;pdf src=&quot;example.pdf&quot;&gt;&amp;lt;\/pdf&gt;\n&amp;lt;\/template&gt;\n\n&amp;lt;script setup&gt;\nimport pdf from &#039;vue-pdf&#039;;\n&amp;lt;\/script&gt;\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u516d\u3001\u64cd\u4f5c\u6b65\u9aa4\u603b\u7ed3<\/h2>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u5feb\u901f\u9884\u89c8<\/strong>\uff1a\u4f7f\u7528 <code>&lt;iframe><\/code> \u6216 <code>&lt;embed><\/code><\/li>\n\n\n\n<li><strong>\u9ad8\u81ea\u5b9a\u4e49<\/strong>\uff1a\u4f7f\u7528 PDF.js \u6e32\u67d3\u5230 <code>&lt;canvas><\/code><\/li>\n\n\n\n<li><strong>\u7528\u6237\u4e0a\u4f20\u6587\u4ef6<\/strong>\uff1a\u7528 Blob + PDF.js<\/li>\n\n\n\n<li><strong>\u589e\u5f3a\u4f53\u9a8c<\/strong>\uff1a\u5206\u9875\u3001\u7f29\u653e\u3001\u65cb\u8f6c\u3001\u641c\u7d22<\/li>\n\n\n\n<li><strong>\u6846\u67b6\u9879\u76ee<\/strong>\uff1a\u4f7f\u7528 <code>vue-pdf<\/code> \/ <code>react-pdf<\/code> \/ <code>ngx-extended-pdf-viewer<\/code> \u5c01\u88c5<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u597d\uff0c\u6211\u5e2e\u4f60\u6574\u7406\u4e00\u4efd <strong>Vue3 + PDF.js \u5168\u529f\u80fd PDF \u9884\u89c8\u793a\u4f8b\u9879\u76ee<\/strong>\uff0c\u5305\u542b\u5206\u9875\u3001\u7f29\u653e\u3001\u7528\u6237\u4e0a\u4f20\u6587\u4ef6\u548c\u8fdc\u7a0b PDF \u6e32\u67d3\uff0c\u4e00\u952e\u53ef\u8fd0\u884c\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h1 class=\"wp-block-heading\">\ud83d\udce6 Vue3 + PDF.js PDF \u9884\u89c8\u793a\u4f8b\u9879\u76ee<\/h1>\n\n\n\n<h3 class=\"wp-block-heading\">1\ufe0f\u20e3 \u5b89\u88c5\u4f9d\u8d56<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnpm init vue@latest pdf-preview-demo\ncd pdf-preview-demo\nnpm install\nnpm install pdfjs-dist\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">2\ufe0f\u20e3 \u9879\u76ee\u7ed3\u6784\uff08\u793a\u4f8b\uff09<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nsrc\/\n \u251c\u2500 components\/\n \u2502   \u2514\u2500 PdfViewer.vue\n \u251c\u2500 App.vue\n \u2514\u2500 main.js\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">3\ufe0f\u20e3 PdfViewer.vue<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&amp;lt;template&gt;\n  &amp;lt;div&gt;\n    &amp;lt;input type=&quot;file&quot; @change=&quot;onFileChange&quot; accept=&quot;application\/pdf&quot; \/&gt;\n    &amp;lt;div class=&quot;controls&quot;&gt;\n      &amp;lt;button @click=&quot;prevPage&quot;&gt;\u4e0a\u4e00\u9875&amp;lt;\/button&gt;\n      &amp;lt;span&gt;\u7b2c {{ currentPage }} \u9875 \/ \u5171 {{ totalPages }} \u9875&amp;lt;\/span&gt;\n      &amp;lt;button @click=&quot;nextPage&quot;&gt;\u4e0b\u4e00\u9875&amp;lt;\/button&gt;\n      &amp;lt;button @click=&quot;zoomIn&quot;&gt;\u653e\u5927&amp;lt;\/button&gt;\n      &amp;lt;button @click=&quot;zoomOut&quot;&gt;\u7f29\u5c0f&amp;lt;\/button&gt;\n    &amp;lt;\/div&gt;\n    &amp;lt;canvas ref=&quot;pdfCanvas&quot;&gt;&amp;lt;\/canvas&gt;\n  &amp;lt;\/div&gt;\n&amp;lt;\/template&gt;\n\n&amp;lt;script setup&gt;\nimport { ref } from &quot;vue&quot;;\nimport * as pdfjsLib from &quot;pdfjs-dist\/build\/pdf&quot;;\nimport pdfjsWorker from &quot;pdfjs-dist\/build\/pdf.worker.entry&quot;;\n\npdfjsLib.GlobalWorkerOptions.workerSrc = pdfjsWorker;\n\nconst pdfCanvas = ref(null);\nconst currentPage = ref(1);\nconst totalPages = ref(0);\nlet pdfDoc = null;\nlet scale = 1.5;\n\nconst renderPage = async (pageNum) =&gt; {\n  const page = await pdfDoc.getPage(pageNum);\n  const viewport = page.getViewport({ scale });\n  const canvas = pdfCanvas.value;\n  const ctx = canvas.getContext(&quot;2d&quot;);\n  canvas.width = viewport.width;\n  canvas.height = viewport.height;\n  await page.render({ canvasContext: ctx, viewport }).promise;\n};\n\nconst loadPDF = async (url) =&gt; {\n  pdfDoc = await pdfjsLib.getDocument(url).promise;\n  totalPages.value = pdfDoc.numPages;\n  currentPage.value = 1;\n  renderPage(currentPage.value);\n};\n\nconst onFileChange = async (event) =&gt; {\n  const file = event.target.files&#x5B;0];\n  if (!file) return;\n  const fileURL = URL.createObjectURL(file);\n  await loadPDF(fileURL);\n};\n\nconst nextPage = () =&gt; {\n  if (currentPage.value &amp;lt; totalPages.value) {\n    currentPage.value++;\n    renderPage(currentPage.value);\n  }\n};\n\nconst prevPage = () =&gt; {\n  if (currentPage.value &gt; 1) {\n    currentPage.value--;\n    renderPage(currentPage.value);\n  }\n};\n\nconst zoomIn = () =&gt; {\n  scale += 0.25;\n  renderPage(currentPage.value);\n};\n\nconst zoomOut = () =&gt; {\n  if (scale &gt; 0.5) {\n    scale -= 0.25;\n    renderPage(currentPage.value);\n  }\n};\n\n\/\/ \u793a\u4f8b\u52a0\u8f7d\u8fdc\u7a0b PDF\n\/\/ loadPDF(&#039;https:\/\/example.com\/sample.pdf&#039;);\n&amp;lt;\/script&gt;\n\n&amp;lt;style scoped&gt;\n.controls {\n  margin: 10px 0;\n  display: flex;\n  align-items: center;\n  gap: 10px;\n}\ncanvas {\n  border: 1px solid #ccc;\n}\n&amp;lt;\/style&gt;\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">4\ufe0f\u20e3 App.vue<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n&amp;lt;template&gt;\n  &amp;lt;div id=&quot;app&quot;&gt;\n    &amp;lt;h1&gt;Vue3 PDF \u9884\u89c8 Demo&amp;lt;\/h1&gt;\n    &amp;lt;PdfViewer \/&gt;\n  &amp;lt;\/div&gt;\n&amp;lt;\/template&gt;\n\n&amp;lt;script setup&gt;\nimport PdfViewer from &#039;.\/components\/PdfViewer.vue&#039;\n&amp;lt;\/script&gt;\n\n&amp;lt;style&gt;\n#app {\n  padding: 20px;\n}\n&amp;lt;\/style&gt;\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">5\ufe0f\u20e3 main.js<\/h3>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nimport { createApp } from &#039;vue&#039;\nimport App from &#039;.\/App.vue&#039;\n\ncreateApp(App).mount(&#039;#app&#039;)\n\n<\/pre><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">6\ufe0f\u20e3 \u529f\u80fd\u8bf4\u660e<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u7528\u6237\u4e0a\u4f20 PDF \u6587\u4ef6<\/strong> \u2192 \u7acb\u5373\u9884\u89c8<\/li>\n\n\n\n<li><strong>\u5206\u9875\u63a7\u5236<\/strong> \u2192 \u4e0a\u4e00\u9875 \/ \u4e0b\u4e00\u9875<\/li>\n\n\n\n<li><strong>\u7f29\u653e<\/strong> \u2192 \u653e\u5927 \/ \u7f29\u5c0f<\/li>\n\n\n\n<li><strong>\u8fdc\u7a0b PDF \u6e32\u67d3<\/strong> \u2192 \u53ef\u901a\u8fc7 <code>loadPDF(url)<\/code> \u52a0\u8f7d<\/li>\n\n\n\n<li><strong>\u5b8c\u5168\u57fa\u4e8e PDF.js<\/strong> \u2192 \u65e0\u4f9d\u8d56 iframe<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u597d\u7684\uff0c\u6211\u7ed9\u4f60\u6574\u7406\u4e00\u4efd \u524d\u7aef\u5b9e\u73b0 PDF \u6587\u4ef6\u9884\u89c8\u7684\u5b8c\u6574\u64cd\u4f5c\u6b65\u9aa4\u65b9\u6cd5\uff082025 \u6700&#8230; <a class=\"more-link\" href=\"https:\/\/www.52runoob.com\/index.php\/2025\/12\/06\/%e5%89%8d%e7%ab%af%e5%ae%9e%e7%8e%b0pdf%e6%96%87%e4%bb%b6%e9%a2%84%e8%a7%88%e7%9a%84%e6%93%8d%e4%bd%9c%e6%ad%a5%e9%aa%a4%e6%96%b9%e6%b3%95\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[49],"tags":[],"class_list":["post-559","post","type-post","status-publish","format-standard","hentry","category-javascript"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/comments?post=559"}],"version-history":[{"count":1,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/559\/revisions"}],"predecessor-version":[{"id":560,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/posts\/559\/revisions\/560"}],"wp:attachment":[{"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/media?parent=559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/categories?post=559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.52runoob.com\/index.php\/wp-json\/wp\/v2\/tags?post=559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}