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

print orientation #240

Closed
manfye opened this issue Apr 25, 2020 · 9 comments
Closed

print orientation #240

manfye opened this issue Apr 25, 2020 · 9 comments

Comments

@manfye
Copy link

manfye commented Apr 25, 2020

How do I set for portrait or landscape mode in default?

@MatthewHerbst
Copy link
Owner

I don't believe there is a way to do that. The settings in the print preview dialog are determined by your browser, and there is no standard way that I know of to set them across all browsers. If you know of such a mechanism please let me know!

@xgj1988
Copy link

xgj1988 commented Jun 29, 2020

@manfye Did you resolve this problem?

@bashleigh
Copy link

bashleigh commented Aug 2, 2020

I found a way to force the orientation. Inside my refed component I added this block

<style type="text/css" media="print">{"\
   @page {\ size: landscape;\ }\
"}</style>

@MatthewHerbst
Copy link
Owner

Thanks for posting that @bashleigh!

@bashleigh
Copy link

No problem!

@ronyfhebrian
Copy link

@bashleigh's answer is worked on me rather than importing "index.css" in my refed component. Don't know why

@fastDev01
Copy link

Dosen't work on Safari

@jeff-r-koyaltech
Copy link

Dosen't work on Safari

Correct, and for anyone else wondering, CanIUse gives you a pretty good idea of which browsers will and will not support this. That means both you and the library maintainer are left w/o workarounds for some browsers.

https://caniuse.com/css-paged-media

@vandan501
Copy link

vandan501 commented Aug 9, 2024

Dosen't work on Safari

Correct, and for anyone else wondering, CanIUse gives you a pretty good idea of which browsers will and will not support this. That means both you and the library maintainer are left w/o workarounds for some browsers.

https://caniuse.com/css-paged-media

How can i do default selected Orientation Landscape in safari browser only?
I dont want to show portrait mode is their any ways??

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

8 participants