Warn Safari users that PDF export won't work as intended
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:
- the blur in a
global-bottom.vuelike this is not applied to the exported PDF, making it look ugly:
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.
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
I am not sure if it shows up as expected or not - I don't have a Safari to test 🥹
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:
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).