无法使用pdf js在移动设备上查看PDF

时间:2018-12-17 09:47:28

标签: ionic-framework ionic2 ionic3

我可以使用离子服务在浏览器中查看PDF,但无法在设备上查看PDF。我正在Android上进行测试。

这是我遇到的错误:

polyfills.js:3 Fetch API cannot load file:///android_asset/www/assets/imgs/11.pdf. URL scheme “file” is not supported.
(anonymous) @ polyfills.js:3

vendor.js:1 ERROR Error: Uncaught (in promise): TypeError: Failed to fetch
TypeError: Failed to fetch
at polyfills.js:3

at Generator._invoke (0.js:1)
at Generator.t.(anonymous function) [as next]
 (file:///android_asset/www/build/0.js:1:278295)

vendor.js:1 ERROR Error: Uncaught (in promise): DataCloneError: Failed to execute ‘postMessage’ on ‘Worker’: TypeError: Failed to fetch could not be cloned.
Error: Failed to execute ‘postMessage’ on ‘Worker’: TypeError: Failed to fetch could not be cloned.
at o.postMessage (0.js:1)

谢谢。

0 个答案:

没有答案