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

Warn Safari users that PDF export won't work as intended #2013

Open
gy-mate opened this issue Jan 18, 2025 · 3 comments
Open

Warn Safari users that PDF export won't work as intended #2013

gy-mate opened this issue Jan 18, 2025 · 3 comments

Comments

@gy-mate
Copy link
Contributor

gy-mate commented Jan 18, 2025

Is your feature request related to a problem? Please describe.

When exporting to PDF in Safari...

  • there are no Margin options, you can only select paper sizes
  • the exported PDF's margins are too large:
    Image
  • the blur in a global-bottom.vue like this is not applied to the exported PDF, making it look ugly:
    Image

Environment

  • Slidev version: 51.0.1 (local)
  • Browser: Safari 18.2
  • OS: macOS 15.2

Describe the solution you'd like

A warning shown to Safari users that these features won't work in their browser.
Or—even better—if possible, a fix for these issues.

Describe alternatives you've considered

These work in Chrome so I had to use it for exporting. The CLI could also be used.

@kermanx
Copy link
Member

kermanx commented Feb 21, 2025

@kermanx kermanx closed this as completed Feb 21, 2025
@gy-mate
Copy link
Contributor Author

gy-mate commented Feb 21, 2025

There has been some warning for non-Chrome users:

https://github.com/kermanx/slidev/blob/d40ae7852b2305ad0ac8b3ff0c12438f30c782ac/packages/client/logic/screenshot.ts#L60-L61

https://github.com/kermanx/slidev/blob/d40ae7852b2305ad0ac8b3ff0c12438f30c782ac/packages/client/pages/export.vue#L256-L261

@kermanx Yeah but this warning is shown above / for .pptx and PNG exports, not PDF ones:

Image

@kermanx
Copy link
Member

kermanx commented Feb 21, 2025

My bad. For PDF exporting, I think it is possible to somehow support it in Safari (unlike image exporting which requires APIs that Safari doesn't currently provide).

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

No branches or pull requests

2 participants