最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - preview pdf from google bucket signed url - Stack Overflow

programmeradmin1浏览0评论

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?

发布评论

评论列表(0)

  1. 暂无评论