PDF 文件预览问题
#125
Replies: 2 comments 1 reply
-
|
PDF.js 可以解决,该库对于 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
hydro-pdf-preview 插件已完成,使用该插件插入 例: 支持任意路径,如果跨域则需要设置正确。 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
个人感觉这个问题还是后端的 MIME 发错了,应为
application/pdf实际上发送了binary/octet-stream,所以会唤起下载。对于一般的附加文件,使用这个 MIME 非常正确,但是对于需要预览的 PDF 文件,这个 MIME 会导致难以使用iframe(唤起下载)或object(MIME 对不上)来内联到题面中。这里预想了几种解决方案:
application/pdf的 MIME;binary/octet-stream该库能否正常工作。Beta Was this translation helpful? Give feedback.
All reactions