{"id":9099,"date":"2025-04-18T17:08:35","date_gmt":"2025-04-18T09:08:35","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/9099.html"},"modified":"2025-04-18T17:08:35","modified_gmt":"2025-04-18T09:08:35","slug":"%e8%ae%b0%e5%bd%95%e4%b8%80%e4%b8%8b%e4%bd%bf%e7%94%a8pdfjs%e9%81%87%e5%88%b0%e7%9a%84%e5%9d%91","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/9099.html","title":{"rendered":"\u8bb0\u5f55\u4e00\u4e0b\u4f7f\u7528PDFJS\u9047\u5230\u7684\u5751"},"content":{"rendered":"<h3>\u4e00\u3001PDF.js \u4ecb\u7ecd<\/h3>\n<p>\u5b98\u65b9\u5730\u5740<\/p>\n<p>\u4e2d\u56fd\u6587\u6863<\/p>\n<p>PDF.js \u662f\u4e00\u4e2a\u4f7f\u7528 HTML5 \u6784\u5efa\u7684\u4fbf\u643a\u5f0f\u6587\u6863\u683c\u5f0f\u67e5\u770b\u5668\u3002 pdf.js \u662f\u793e\u533a\u9a71\u52a8\u7684&#xff0c;\u5e76\u7531 Mozilla \u652f\u6301\u3002\u6211\u4eec\u7684\u76ee\u6807\u662f\u4e3a\u89e3\u6790\u548c\u5448\u73b0 PDF \u521b\u5efa\u4e00\u4e2a\u901a\u7528\u7684\u3001\u57fa\u4e8e Web \u6807\u51c6\u7684\u5e73\u53f0\u3002<\/p>\n<p>\u00a0PDF.js \u652f\u6301\u7684\u529f\u80fd&#xff1a;<\/p>\n<ul>\n<li>\n<p>\u5728\u7ebf\u68c0\u7d22\u6587\u6863\u4e2d\u7684\u5185\u5bb9&#xff0c;\u5e76\u652f\u6301\u9ad8\u4eae\u663e\u793a&#xff0c;\u5339\u914d\u5927\u5c0f\u5199&#xff0c;\u7edf\u8ba1\u5339\u914d\u9879\u7b49&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u6307\u5b9a\u9875\u8df3\u8f6c&#xff0c;\u4e0a\u4e0b\u4e00\u9875&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u4e0b\u8f7d\u6216\u8fde\u63a5\u6253\u5370\u673a\u6253\u5370\u5f53\u524d\u9884\u89c8\u6587\u4ef6&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u6309\u6bd4\u4f8b\u7f29\u653e\u5f53\u524d\u9884\u89c8\u7684\u6587\u4ef6&#xff0c;\u8c03\u6574\u9605\u8bfb\u89c6\u91ce&#xff1b;<\/p>\n<\/li>\n<li>\n<p>\u5bf9\u5f53\u524d\u9884\u89c8\u7684\u6587\u4ef6&#xff0c;\u5f00\u542f\u5728\u7ebf\u6f14\u793a\u6a21\u5f0f;<\/p>\n<\/li>\n<li>\n<p>\u652f\u6301\u9605\u8bfb\u672c\u5730pdf\u6587\u4ef6;<\/p>\n<\/li>\n<li>\n<p>\u652f\u6301\u5927\u6587\u4ef6\u5206\u7247\u4e0a\u4f20;<\/p>\n<\/li>\n<li>\n<p>\u652f\u6301\u5728 viewer.html \u6dfb\u52a0\u6c34\u5370;<\/p>\n<\/li>\n<li>\n<p>\u53ef\u5728 viewer.html \u4e2d\u81ea\u5b9a\u4e49\u6837\u5f0f;<\/p>\n<\/li>\n<\/ul>\n<h3>\u4e8c\u3001\u5b89\u88c5<\/h3>\n<h4>1.\u4e0b\u8f7dPDF.js<\/h4>\n<p>\u4e0b\u8f7d\u5730\u5740<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"904\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418090833-68021691c5a8e.png\" width=\"1200\" \/><\/p>\n<p>\u4e0b\u8f7d\u540e\u5f97\u5230\u4e00\u4e2a .zip \u7684\u538b\u7f29\u5305<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"91\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418090834-680216922f1fc.png\" width=\"347\" \/><\/p>\n<p>\u5907\u6ce8&#xff1a;\u65e7\u6d4f\u89c8\u5668\u7248\u672c&#xff0c;\u4e0d\u652f\u6301uos\u81ea\u5e26\u6d4f\u89c8\u5668\u3001\u5fae\u4fe1\u6d4f\u89c8\u5668\u7b49\u66f4\u65e7\u7248\u672c\u3002<\/p>\n<h4>2.\u89e3\u538b\u5230\u9879\u76ee\u4e2d<\/h4>\n<p>\u6211\u7528\u7684\u662f vue3&#xff0c;\u628a\u5b83\u89e3\u538b\u5230\u4e86\u00a0public \u6587\u4ef6\u5939\u5185&#xff1b;&#xff08;\u6211\u8fd9\u91cc\u7528\u7684\u662f\u30103.11.174\u3011\u7248\u672c&#xff0c;\u5e76\u4e14\u628a\u6587\u4ef6\u540d\u6210\u4e86fileView&#xff0c;\u6ca1\u9700\u6c42\u7684\u53ef\u4ee5\u4e0d\u7528\u6539&#xff09;<\/p>\n<p>\u5982\u679c\u662f\u65e9\u671f\u7248\u672c\u7684vue-cli\u811a\u624b\u67b6\u653e\u5230 static \u6587\u4ef6\u5939\u4e0b\u3002\u5982\u679c\u653e\u5728 src \u6587\u4ef6\u4e0b&#xff0c;\u53ef\u80fd\u4e0d\u5229\u4e8e\u5f15\u5165 viewer.html \u8fdb\u884c\u9884\u89c8\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"526\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418090834-680216923877b.png\" width=\"428\" \/><\/p>\n<h4>3.\u5141\u8bb8\u8de8\u57df<\/h4>\n<p>\u5728 web\/viewer.mjs \u6216\u8005\u00a0web\/viewer.js \u4e2d\u641c\u7d22\u00a0file origin does not match viewer&#039;s \u5e76\u6ce8\u91ca\u6389\u3002<\/p>\n<p>\u4e0d\u7136\u53ef\u80fd\u4f1a\u62a5\u8de8\u57df\u7684\u9519\u8bef<\/p>\n<h3><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"383\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418090834-680216924dc84.png\" width=\"588\" \/><\/h3>\n<h3>\u4e09\u3001\u57fa\u672c\u4f7f\u7528<\/h3>\n<h4>\u65b9\u6848\u4e00&#xff1a;\u901a\u8fc7\u5f39\u7a97\u9884\u89c8<\/h4>\n<h5>1.\u521b\u5efa\u7ec4\u4ef6 PDF.vue<\/h5>\n<p>&lt;script setup lang&#061;&#034;ts&#034;&gt;<br \/>\nimport { onMounted, ref } from &#039;vue&#039;;<br \/>\ninterface Props {<br \/>\n  url: string; \/\/ pdf\u6587\u4ef6\u5730\u5740<br \/>\n}<br \/>\nconst props &#061; defineProps&lt;Props&gt;();<br \/>\nconst pdfUrl &#061; ref(&#039;&#039;); \/\/ pdf\u6587\u4ef6\u5730\u5740<br \/>\nconst fileUrl &#061; &#039;\/fileView\/web\/viewer.html?file&#061;&#039;; \/\/ pdfjs\u6587\u4ef6\u5730\u5740<\/p>\n<p>onMounted(() &#061;&gt; {<br \/>\n  \/\/ encodeURIComponent() \u51fd\u6570\u53ef\u628a\u5b57\u7b26\u4e32\u4f5c\u4e3a URI \u7ec4\u4ef6\u8fdb\u884c\u7f16\u7801\u3002<br \/>\n  \/\/ \u6838\u5fc3\u5c31\u662f\u5c06 iframe \u7684 src \u5c5e\u6027\u8bbe\u7f6e\u4e3a pdfjs \u7684\u5730\u5740&#xff0c;\u7136\u540e\u5c06 pdf \u6587\u4ef6\u7684\u5730\u5740\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9 pdfjs<br \/>\n  \/\/ \u4f8b\u5982&#xff1a;http:\/\/localhost:8080\/pdfjs-4.0.189-dist\/web\/viewer.html?file&#061;http%3A%2F%2Flocalhost%3A8080%2Fpdf%2Ftest.pdf<br \/>\n  pdfUrl.value &#061; fileUrl &#043; encodeURIComponent(props.url);<br \/>\n});<br \/>\n&lt;\/script&gt;<\/p>\n<p>&lt;template&gt;<br \/>\n  &lt;div class&#061;&#034;container&#034;&gt;<br \/>\n    &lt;iframe :src&#061;&#034;pdfUrl&#034; width&#061;&#034;100%&#034; height&#061;&#034;100%&#034;&gt;&lt;\/iframe&gt;<br \/>\n  &lt;\/div&gt;<br \/>\n&lt;\/template&gt;<\/p>\n<p>&lt;style scoped lang&#061;&#034;scss&#034;&gt;<br \/>\n.container {<br \/>\n  width: 100%;<br \/>\n  height: 100%;<br \/>\n}<br \/>\n&lt;\/style&gt;<\/p>\n<h5>2.\u4f7f\u7528\u7ec4\u4ef6<\/h5>\n<p>\u5217\u5982\u6211\u4eec\u9700\u8981\u9884\u89c8 public \u4e0b\u7684\u4e00\u4e2a test.pdf \u6587\u4ef6; \u6216\u8005\u6362\u6210\u5176\u4ed6\u7f51\u7edc\u8def\u5f84\u3002<\/p>\n<p>&lt;div class&#061;&#034;pdf-box&#034;&gt;<br \/>\n  &lt;PDF url&#061;&#034;\/public\/test.pdf&#034; \/&gt;<br \/>\n&lt;\/div&gt; <\/p>\n<h4>\u65b9\u6848\u4e8c&#xff1a;\u76f4\u63a5\u8bbf\u95ee&#xff0c;\u901a\u8fc7\u6d4f\u89c8\u5668\u9884\u89c8<\/h4>\n<p>&lt;script&gt;<br \/>\n    const fileView &#061; (url:string) &#061;&gt; {<br \/>\n        const fileUrl &#061; &#039;\/fileView\/web\/viewer.html?file&#061;&#039;; \/\/ pdfjs\u6587\u4ef6\u5730\u5740<br \/>\n        window.open(fileUrl &#043; encodeURIComponent(url), &#039;_blank&#039;);<br \/>\n    }<br \/>\n&lt;\/script&gt;<\/p>\n<p>&lt;template&gt;<br \/>\n&lt;div&gt;<br \/>\n    &lt;!&#8211; \u6362\u6210 a \u6807\u7b7e\u4e5f\u662f\u4e00\u6837\u7684 &#8211;&gt;<br \/>\n    &lt;span &#064;click&#061;&#034;fileView(v.fileUrl)&#034; class&#061;&#034;mr-20 blue-300&#034; v-for&#061;&#034;v in form.fileInfos&#034; :key&#061;&#034;v.fileId&#034; style&#061;&#034;cursor: pointer;&#034;&gt;&lt;u&gt;{{ v.fileName }}&lt;\/u&gt;&lt;\/span&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;\/template&gt;<\/p>\n<h3>\u56db\u3001\u95ee\u9898\u4e0e\u89e3\u51b3\u65b9\u6848<\/h3>\n<h5>Q:\u5982\u679c\u51fa\u73b0\u4ee5\u4e0b\u95ee\u9898&#xff1a;<\/h5>\n<p>viewer.mjs:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of &#034;application\/octet-stream&#034;. Strict MIME type checking is enforced for module scripts per HTML spec.<\/p>\n<p> pdf.mjs:1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of &#034;application\/octet-stream&#034;. Strict MIME type checking is enforced for module scripts per HTML spec.<\/p>\n<p>\u00a0\u8bf4\u660e\u65e0\u6cd5\u89e3\u6790.mjs \u6587\u4ef6\u683c\u5f0f<\/p>\n<h5>A:\u89e3\u51b3\u65b9\u6cd5:<\/h5>\n<h6>\u65b9\u6848\u4e00&#xff1a;\u628amjs \u7684\u540e\u7f00\u6539\u6210js\u00a0\u6216\u8005\u5728\u00a0.htaccess \u6dfb\u52a0\u00a0<\/h6>\n<p>&lt;IfModule mod_mime.c&gt;<br \/>\n  AddType application\/\/javascript js mjs<br \/>\n&lt;\/IfModule&gt; <\/p>\n<h6>\u65b9\u6848\u4e8c&#xff1a;\u914d\u7f6e MIME\u00a0<\/h6>\n<h6>1&#xff09;Nginx<\/h6>\n<p>\u7531\u4e8enginx\u65e0\u6cd5\u8bc6\u522bmjs\u6587\u4ef6&#xff0c;\u4ece\u800c\u5728http header\u4e2d\u9519\u8bef\u7684\u4f7f\u7528 Content-Type:application\/octet-stream \u6765\u4f20\u8f93mjs\u6587\u4ef6&#xff0c;\u5bfc\u81f4\u6d4f\u89c8\u5668\u7aef\u8ba4\u4e3a\u5b83\u4e0d\u662f\u4e00\u4e2a\u5408\u6cd5\u7684js\u811a\u672c\u3002<\/p>\n<p>\u64cd\u4f5c\u5982\u4e0b&#xff1a;\u627e\u5230 Nginx \u6587\u4ef6\u5939\u4e0b\u7684 mime.types &#xff0c;\u6211\u7684mimetype\u6587\u4ef6\u8def\u5f84\u4e3a \u00a0\/usr\/local\/nginx\/mime.types<\/p>\n<p>sudo vim \/usr\/local\/nginx\/mime.types <\/p>\n<p>\u5c06<\/p>\n<p>application\/javascript \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 js; <\/p>\n<p>\u6539\u4e3a<\/p>\n<p>application\/javascript \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 js mjs; <\/p>\n<p>\u7136\u540e<\/p>\n<p>sudo nginx -s reload <\/p>\n<p>\u5c31\u53ef\u4ee5\u4e86\u3002<\/p>\n<p>\u5982\u679c\u6709\u53ef\u89c6\u5316\u5de5\u5177&#xff0c;\u4e5f\u53ef\u4ee5\u9f20\u6807\u53f3\u952e\u901a\u8fc7\u8bb0\u4e8b\u672c\u7f16\u8f91<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"171\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418090834-6802169263f38.png\" width=\"1045\" \/><\/p>\n<p>\u00a0<img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"214\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418090834-680216927eac8.png\" width=\"696\" \/><\/p>\n<p>\u5982\u679c\u6709\u7528\u5230 ftl \u6a21\u7248\u3001 gzip \u6587\u4ef6\u6216\u8005\u5176\u4ed6\u683c\u5f0f&#xff0c;\u53ef\u4ee5\u6309\u7167\u4e0a\u9762\u7684\u65b9\u6cd5\u6dfb\u52a0&#xff0c;\u5217\u5982:<\/p>\n<p>application\/x-freemarker \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 ftl;<\/p>\n<p>application\/x-gzip \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 gz; <\/p>\n<h6>2&#xff09;window<\/h6>\n<p>Windows\u90e8\u7f72\u5230IIS\u9700\u8981\u8bbe\u7f6eMIME\u7c7b\u578b&#xff08;\u6ca1\u7528\u5230IIS\u53ef\u4ee5\u5ffd\u7565&#xff09;<\/p>\n<p>.mjs\u00a0 application\/javascript .ftl\u00a0 \u00a0 \u00a0application\/x-freemarker<\/p>\n<h6>\u65b9\u6848\u4e09&#xff1a;\u5207\u6362\u7248\u672c<\/h6>\n<p>PDFjs\u6240\u6709\u5386\u53f2\u7248\u672c<\/p>\n<p>\u4e0d\u7528mjs\u7684\u7248\u672c\u5c31\u597d\u4e86&#xff0c;\u5207\u6362\u5230\u00a03.11.174 \u53ca\u4ee5\u4e0b\u7684\u7248\u672c\u90fd\u53ef\u4ee5\u3002<\/p>\n<h5>Q:\u600e\u4e48\u7981\u7528\u6253\u5370\u4e0b\u8f7d\u7b49\u529f\u80fd<\/h5>\n<h6>A:\u7981\u7528\u4e0b\u8f7d\u3001\u6253\u5370\u7b49\u529f\u80fd&#xff1a;<\/h6>\n<p>\u4e0d\u80fd\u76f4\u63a5\u6ce8\u91ca\u4f1a\u62a5\u9519&#xff0c;\u4e00\u822c\u5efa\u8bae\u91c7\u7528css\u65b9\u5f0f\u9690\u85cf\u3002\u4f8b\u5982\u6ce8\u91ca\u4e0b\u8f7d\u529f\u80fd&#xff1a;\u6253\u5f00web\/viewer.html\u6587\u4ef6&#xff0c;\u641c\u7d22\u5173\u952e\u5b57\u201cdownload\u201d&#xff0c;\u5728\u76f8\u5173\u4ee3\u7801\u6bb5\u52a0\u4e0astyle&#061;&#034;visibility: hidden;&#034;\u5373\u53ef<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"89\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418090834-680216928b85a.png\" width=\"1090\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3w\u6b21\uff0c\u70b9\u8d5e43\u6b21\uff0c\u6536\u85cf47\u6b21\u3002\u5728\u5f15\u7528PDFjs\u7684\u8fc7\u7a0b\u4e2d\uff0c\u9047\u5230\u4e86\u4e00\u4e0b\u5751\uff0c\u8fd9\u8fd9\u91cc\u8bb0\u5f55\u4e00\u4e0b\u3002\u5217\u5982\uff1a1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of &quot;application\/octet-stream&quot;. Strict MIME type checking is enforced for module scripts per HTML spec.\u548c\u7981\u7528\u6309\u94ae\u529f\u80fd\u7b49&#8230;_pdf.js<\/p>\n","protected":false},"author":2,"featured_media":9092,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[187,87,268,43],"topic":[],"class_list":["post-9099","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-javascript","tag-87","tag-268","tag-43"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u8bb0\u5f55\u4e00\u4e0b\u4f7f\u7528PDFJS\u9047\u5230\u7684\u5751 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/9099.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u8bb0\u5f55\u4e00\u4e0b\u4f7f\u7528PDFJS\u9047\u5230\u7684\u5751 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3w\u6b21\uff0c\u70b9\u8d5e43\u6b21\uff0c\u6536\u85cf47\u6b21\u3002\u5728\u5f15\u7528PDFjs\u7684\u8fc7\u7a0b\u4e2d\uff0c\u9047\u5230\u4e86\u4e00\u4e0b\u5751\uff0c\u8fd9\u8fd9\u91cc\u8bb0\u5f55\u4e00\u4e0b\u3002\u5217\u5982\uff1a1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of &quot;application\/octet-stream&quot;. Strict MIME type checking is enforced for module scripts per HTML spec.\u548c\u7981\u7528\u6309\u94ae\u529f\u80fd\u7b49..._pdf.js\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/9099.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-18T09:08:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418090833-68021691c5a8e.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/9099.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/9099.html\",\"name\":\"\u8bb0\u5f55\u4e00\u4e0b\u4f7f\u7528PDFJS\u9047\u5230\u7684\u5751 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-04-18T09:08:35+00:00\",\"dateModified\":\"2025-04-18T09:08:35+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/9099.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/9099.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/9099.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u8bb0\u5f55\u4e00\u4e0b\u4f7f\u7528PDFJS\u9047\u5230\u7684\u5751\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u8bb0\u5f55\u4e00\u4e0b\u4f7f\u7528PDFJS\u9047\u5230\u7684\u5751 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/9099.html","og_locale":"zh_CN","og_type":"article","og_title":"\u8bb0\u5f55\u4e00\u4e0b\u4f7f\u7528PDFJS\u9047\u5230\u7684\u5751 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb1.3w\u6b21\uff0c\u70b9\u8d5e43\u6b21\uff0c\u6536\u85cf47\u6b21\u3002\u5728\u5f15\u7528PDFjs\u7684\u8fc7\u7a0b\u4e2d\uff0c\u9047\u5230\u4e86\u4e00\u4e0b\u5751\uff0c\u8fd9\u8fd9\u91cc\u8bb0\u5f55\u4e00\u4e0b\u3002\u5217\u5982\uff1a1 Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of &quot;application\/octet-stream&quot;. Strict MIME type checking is enforced for module scripts per HTML spec.\u548c\u7981\u7528\u6309\u94ae\u529f\u80fd\u7b49..._pdf.js","og_url":"https:\/\/www.wsisp.com\/helps\/9099.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-04-18T09:08:35+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/04\/20250418090833-68021691c5a8e.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/9099.html","url":"https:\/\/www.wsisp.com\/helps\/9099.html","name":"\u8bb0\u5f55\u4e00\u4e0b\u4f7f\u7528PDFJS\u9047\u5230\u7684\u5751 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-04-18T09:08:35+00:00","dateModified":"2025-04-18T09:08:35+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/9099.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/9099.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/9099.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u8bb0\u5f55\u4e00\u4e0b\u4f7f\u7528PDFJS\u9047\u5230\u7684\u5751"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/9099","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=9099"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/9099\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/9092"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=9099"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=9099"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=9099"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=9099"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}