问题
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