Comments (15)
Try the new beta version which is going to rely on an iframe to solve the cross origin issues some people are experiencing.
npm install [email protected]
and let me know the feedback if this solves issues
from react-to-print.
Hello, I have the same problem on Firefox and I installed [email protected]. It still doesn't work.
from react-to-print.
Which version and OS?
from react-to-print.
I tested on Linux, Ubuntu 16.04.3 LTS distribution;
from react-to-print.
Which version of Firefox?
from react-to-print.
Firefox Quantum version: 61.0.1 (64-bit), tested on Linux and on Windows also.
from react-to-print.
try installing:
npm install [email protected]
from react-to-print.
I'm sorry but your suggestion didn't help me. The print file doesn't open on Mozilla. I don't have any error but it just doesn't work. (with the last version of [email protected] I tested only on Linux, I didn't try on Windows but probably will be the same behavior) Thanks for you trying.
from react-to-print.
This is me testing the lastest Firefox with this link here: https://codesandbox.io/s/vj843ljyk3
I'm on a Mac. I'll give different OS a shot later. Can you let me know the results of that link for you?
from react-to-print.
Hey, indeed your example works. I tested on Linux / Mozilla. There are some issues, you can see them in the first screenshot, but after a few seconds the print dialog appears well. So.. I don't know why my print button doesn't work on Mozilla. I see there a react version difference but I don't think is that.. I'm using "react": "^15.5.4";
from react-to-print.
@LazarLidia Have you been able to figure it out? i can't trigger your error
from react-to-print.
@gregnb Hello. for some reason, after build I am having this error: http://prntscr.com/kaszq7
Do you know what it could be?
from react-to-print.
that's because the print button is above the trigger button.
Please add a ref="print"
and than when user click print add this.refs['print'].triggerRef.click();
<Button type="primary" className={'modal-print-button'} onClick={() => this.print()}>
<div>
<ReactToPrint
trigger={() => <div href="#" style={{color: '#fff', width: '100%'}}>Print</div>}
content={() => this.componentRef}
copyStyles={true}
ref="print"
/>
<div style={{display: 'none'}}>
<PrintTemplate ref={el => (this.componentRef = el)} />
</div>
</div>
</Button>
And in this.print() method add this code
if(this.refs['print']) this.refs['print'].triggerRef.click();
from react-to-print.
Still not working Print window in firefox
In 1.0.1 version, working fine https://codesandbox.io/s/6n0mo326mz
but after 2.0 version, not working https://codesandbox.io/s/kmmw7l39y7
from react-to-print.
@jindal1982 this is now being tracked in #93
from react-to-print.
Related Issues (20)
- Page break wide content HOT 3
- Superscripts <sup/> and subscripts <sub/> HOT 1
- react-to-print custom print html content dev vs prod discrepancy HOT 4
- [BUG] [TEMPORARY FIX] - Print container on Chrome + MUI is hiding `Header and Footers` option as default behavior HOT 5
- The FOOTER to only display at the LAST PAGE HOT 3
- codesandbox examples are not loading HOT 2
- onAfterPrint is called before print iframe appears HOT 1
- On mobile devices are not truncated accordingly ref HOT 1
- Add Border to every Page HOT 4
- Add dynamic colors to print function HOT 1
- How to check that the user click on Save in `onAfterPrint`? HOT 2
- getting Supplied Data is not a valid base64-String jsPDF.convertStringToImageData erorr while directly downloading image HOT 1
- Border top and bottom HOT 1
- Save as PDF hangs in print view HOT 1
- Blank PDF when trying to generate in production. HOT 2
- How should i handle large data to print? HOT 8
- Why does it render different content when in im browsing in mobile HOT 3
- Blank Page while printing after a certain period of time HOT 9
- How to add style using PageStyle prop, without it overriding component’s style HOT 5
- Warning: findDOMNode is deprecated outside StrictMode. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-to-print.