-
-
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 entire UI on mobile #187
Comments
I am trying to understand the code and was wondering what the purpose of the setTimeout is in the startPrint method? |
It appears to be an issue with iframe. Where |
Unfortunately we have no control (to my knowledge) of what the browser decides to do after we call |
Hi. Ran into the same issue. Did you find a workaround? Cheers. |
@ekediala as noted above, to the best of my knowledge this is not something we can fix. If you know of a solution please let me know |
@MatthewHerbst thank you. Will let you know if I do. |
Any news on this one? Also ran into this when building a GatsbyJS website and I found the package perfect for the job. Will also do some digging if there is something doable here ;) |
Hmm looking for any news for this issue. |
Same issue still here in latest iOS with Chrome. I also can't get the CodeSandbox to print on mobile at all except for the Text-only option. (https://codesandbox.io/s/rzdhd) |
Also having the same issue. Let us know if there is a solution |
Facing the same issue. Does anyone have any update on this? |
I found a way around it that worked for me. I used <ReactToPrint
onBeforePrint={() => setIsPrinting(true)}
onAfterPrint={() => setIsPrinting(false)}
... Then make the particular component to take up the whole screen if isPrinting |
i have the same issue, |
@m-a-h1 could you maybe trick the browser by adding a wrapping |
it will not change the print size. the printer that i use is small, and even if the component take the whole screen , the print final print page will be the full page, not the size that i defined on the component |
Has anyone got the solution for this issue? |
Looking forward for the solution or any alternate library that can use for mobile chrome and firefox ? |
Can you please let me know the package? |
It seems that |
This is a known issue that is specifically called out on our README. It is not something we can fix. Please note that all browsers on iOS use WebKit under the hood (Apple forces this) so they are basically all the same as Safari. Apple may allow non-WebKit browsers in the near future due to anti-trust issues, especially in the EU and UK 🙏 |
So in iOS it works on safari, but doesn't on other browsers. I wonder is it a bug of iOS or all iOS browsers except safari? |
You can use the old version for this , In my case i use "react-to-print": "^2.14.15" and it work perfectly ... please make sure use let here
................................................................................. <ReactToPrint
trigger={() => <Button>Print</Button>}
content={() => contentRef}
/>
<StockLogs ref={(e)=>(contentRef=e)}/> ................................................................................ the export default class StockLogs extends React.Component {
render() {
return (<div>....</div>)
}
} |
@yash371 the version of |
I confirm that I am experiencing the same issue today on v3, while it works fine on v2. |
Confirming on my side as well. downgrading to v2 shows the print content vs white screen. I think it might be related with the |
Very strange. I'll look to see what's going on this week. Appreciate all the reports. The weird part is that desktop browsers are printing just fine. |
Confirming a similar issue on my end as well. |
ReacToPrint is able to print the specific react component I want to print on browsers on the desktop and on the IPad safari works as well. However, when printing the react component using chrome on the IPad the entire UI is printed.
I checked the console and there were no errors present.
I also checked that the ref returned to the content property is referring to the react component that needs to be printed.
I am not sure why ReactToPrint defaults to printing the entire UI on chrome on the IPad, I was wondering if someone else also ran into this issue.
The text was updated successfully, but these errors were encountered: