admin管理员组文章数量:1023204
Recently I am doing an archive project in Flasks. I want to view pdf with selectable text in a webpage using iframe or similar technology.
Since the pdf url is a signed url from google bucket, like this
name/filename.pdf?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=account%40 bluh bluh bluh(lots of other params)
It does not work with the pdf.js iframe:
<iframe class="iframe1" src="{{ url_for('static', filename='pdfjs-4.8.69-dist/web/viewer.html')}}?file= {{file_url}}"></iframe>
I have ensured the viewer.html and file_url are ready. How do I apply the iframe or similar methods?
Recently I am doing an archive project in Flasks. I want to view pdf with selectable text in a webpage using iframe or similar technology.
Since the pdf url is a signed url from google bucket, like this
name/filename.pdf?X-Goog-Algorithm=GOOG4-RSA-SHA256&X-Goog-Credential=account%40 bluh bluh bluh(lots of other params)
It does not work with the pdf.js iframe:
<iframe class="iframe1" src="{{ url_for('static', filename='pdfjs-4.8.69-dist/web/viewer.html')}}?file= {{file_url}}"></iframe>
I have ensured the viewer.html and file_url are ready. How do I apply the iframe or similar methods?
本文标签: javascriptpreview pdf from google bucket signed urlStack Overflow
版权声明:本文标题:javascript - preview pdf from google bucket signed url - Stack Overflow 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745585274a2157553.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论