Is there a PDF viewer to be used in a DART/Angulardart Chrome Packaged App ?

馋奶兔 提交于 2019-12-08 14:15:27

问题


I am trying to find a suitable PDF viewer to simply display PDF URLs ( external ) / or files ( after creating blobs to the external URLs) in my Chrome packaged app. Tried various things , webview/sandbox pages and using pdf.js. but no luck so far. I am able to get the PDF show up with the webview for the first time but not able to dynamically change the webview's src; as I believe there is an issue with that. Is there anyone displaying dynamic external PDF URLs in a chrome packaged app / how ?


回答1:


I ended up using webview element which loads the PDF using chrome's default viewer, but if I do display ="none", and display ="block", it encounters CSP security issues, so as work around I move the PDF window out of visible and bring it back after updating the src link dynamically.



来源:https://stackoverflow.com/questions/25984975/is-there-a-pdf-viewer-to-be-used-in-a-dart-angulardart-chrome-packaged-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!