Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

功能建议: 添加 pdf 预览 #1657

Open
xj63 opened this issue Nov 30, 2024 · 3 comments
Open

功能建议: 添加 pdf 预览 #1657

xj63 opened this issue Nov 30, 2024 · 3 comments

Comments

@xj63
Copy link

xj63 commented Nov 30, 2024

希望当点击一个pdf资源链接时,触发预览pdf而不是下载,效果类似于Firefox点击pdf链接打开预览页面。
本地pdf文件也可以使用via打开预览。

这是via打开 pdf.js 官方的demo效果,真的很漂亮,希望via也能有这个功能(. ❛ ᴗ ❛.)。
Screenshot_2024-11-30-11-10-04-420_mark via

@htc159243768
Copy link

这个需要魔改内核,然而via使用的是系统内核…

@xj63
Copy link
Author

xj63 commented Dec 2, 2024

或许可以粗暴一点,拦截所有以.pdf结尾(或者其他规则)的所有点击跳转链接
然后转发跳转到 https://mozilla.github.io/pdf.js/web/viewer.html?file=<url>
<url> 替换为pdf资源链接
例如:https://mozilla.github.io/pdf.js/web/viewer.html?file=https://arxiv.org/pdf/1804.03209
这个思路是否可行?

@htc159243768
Copy link

或许可以粗暴一点,拦截所有以.pdf结尾(或者其他规则)的所有点击跳转链接
然后转发跳转到 https://mozilla.github.io/pdf.js/web/viewer.html?file=<url>
<url> 替换为pdf资源链接
例如:https://mozilla.github.io/pdf.js/web/viewer.html?file=https://arxiv.org/pdf/1804.03209
这个思路是否可行?

天才₍•Д•)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants