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

[Bug]手机 PDF 无法正常查看,Web 可以。 #4140

Closed
6 of 8 tasks
bihell opened this issue May 17, 2024 · 4 comments
Closed
6 of 8 tasks

[Bug]手机 PDF 无法正常查看,Web 可以。 #4140

bihell opened this issue May 17, 2024 · 4 comments
Assignees
Labels
question Question or discussion

Comments

@bihell
Copy link

bihell commented May 17, 2024

Checklist

  • I am using LTS version of Node.js.
  • I am using the latest v2 version of VuePress and VuePress official plugins.
  • I am using the latest v2 version of vuepress-theme-hope and all plugins in this repo.
  • I followed the docs and I double checked my configuration.
  • I have searched FAQ and I did not find the answer.

Package name

vuepress-theme-hope

Which operating system are you using?

  • macOS
  • Windows
  • Linux

Describe the bug

同样的内容,WEB 可以访问,但是手机看不了

MD 内容:

---
icon: arcticons:idle-egg-factory
order: 3
---

# 闲置VPS

::: tip
为测试更多的 VPS,我经常会买入卖出,有兴趣的小伙伴可以查看我下方的 PDF 文档,有看中的请添加微信:**digital-review** 购买。
:::

<PDF url="/vps.pdf" />

手机页面截图(看不到):
IMG_8801BAAF5C1A-1

网页页面截图(可看到):

Screenshot 2024-05-17 at 12 42 40

Additional context

No response

@bihell bihell added the bug Something isn't working label May 17, 2024
@Mister-Hope
Copy link
Member

Mister-Hope commented May 17, 2024

Need reproduction, I think it might be related to cross-origin things? At least I think my demo site and documentation is working.

The documentation has detailed description, on PC browser internal viewer is used while the phone is using an external PDF viewer.

@Mister-Hope Mister-Hope added needs reproduction Reproduction repo or stackblitz link is required and removed bug Something isn't working labels May 17, 2024
Copy link

Hello @bihell. Please provide a minimal reproduction using a GitHub repository or vuepress-theme-hope.github.io/v2-new. Issues marked with needs reproduction will be closed if they have no activity within 3 days.

@bihell
Copy link
Author

bihell commented May 17, 2024

Hello @bihell. Please provide a minimal reproduction using a GitHub repository or vuepress-theme-hope.github.io/v2-new. Issues marked with needs reproduction will be closed if they have no activity within 3 days.

用你们文档的命令创建了项目pnpm create vuepress-theme-hope my-docs。见附件,就改了首页然后配置里面开了 pdf
reproduction.zip

访问截图:

电脑:
Screenshot 2024-05-17 at 18 37 46

手机:
IMG_4D8A1445A2F6-1

@Mister-Hope Mister-Hope removed the needs reproduction Reproduction repo or stackblitz link is required label May 20, 2024
@Mister-Hope
Copy link
Member

the embeed pdf viewer requires a correct CORS policy, and local links under dev server is not accessible. So in some cases, this is expected not working, I already update the related docs.

@Mister-Hope Mister-Hope added the question Question or discussion label May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or discussion
Projects
None yet
Development

No branches or pull requests

2 participants