-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Printing uses mobile viewport instead of desktop #327
Comments
Hello. Any chance you could make a working codesandbox to show the problem please? |
Hello, I am having the same issue. |
Hi @dantecarlo would it be possible for you to share any of the code you are using, or to at least make a replica of the problem with fake data? It's very difficult to help with only blurred photos |
Working on an example, but you can see the explained behavior in this issue in stack overflow |
Thanks! Yeah, I understand the problem, but it's almost certainly with the layout library you are using, and not |
Example finished here, I hope this helps to understand the current behavior |
@MatthewHerbst if you are working in this issue, could you please mark it as open again |
I believe I have a solution for this: #553 Not sure why I never found this earlier. Thanks for bringing attention back to it. My one concern about merging it is that it could change existing behavior for people without them knowing, but I think I'm willing to try it as a patch change instead of a major and we'll see and go from there. |
@dantecarlo the fix is published in version v2.14.9, and I have confirmed that if you upgrade the version in your example it fixes the problem. Please let me know if you run into any other issues! |
@MatthewHerbst thank you for your quick response and your openness to solving this error. |
@MatthewHerbst one last question: how can I force even if I am on a mobile resolution to print with desktop resolution? |
Hmm. If you open the "Desktop site" (what the option is called on Android Chrome at least) does it still print as if it was mobile? My guess is it still does. To support a custom viewport size we'd probably have to add a new prop that, if set, would override the size taken from the parent window |
What I'm trying to achieve is to print my content in 1024px resolution, whatever the current device resolution is. If you could give that prop (an iframe width) would be excellent |
Hi ,
In my application I applied styling for the content based on the view port. For example for the desktop I am using col-lg-3 , for ipad i am using col-md-3 and for mobile- col-sm-6 and col-xs-6. But on the print preview it is taking only mobile version styling sm and xs even on when the user is clicking on print from desktop. Is there any fix for this issue where it supports lg and md as well?
The text was updated successfully, but these errors were encountered: