Giter VIP home page Giter VIP logo

Comments (15)

gregnb avatar gregnb commented on July 1, 2024

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.

LazarLidia avatar LazarLidia commented on July 1, 2024

Hello, I have the same problem on Firefox and I installed [email protected]. It still doesn't work.

from react-to-print.

gregnb avatar gregnb commented on July 1, 2024

Which version and OS?

from react-to-print.

LazarLidia avatar LazarLidia commented on July 1, 2024

I tested on Linux, Ubuntu 16.04.3 LTS distribution;

from react-to-print.

gregnb avatar gregnb commented on July 1, 2024

Which version of Firefox?

from react-to-print.

LazarLidia avatar LazarLidia commented on July 1, 2024

Firefox Quantum version: 61.0.1 (64-bit), tested on Linux and on Windows also.

from react-to-print.

gregnb avatar gregnb commented on July 1, 2024

try installing:

npm install [email protected]

from react-to-print.

LazarLidia avatar LazarLidia commented on July 1, 2024

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.

gregnb avatar gregnb commented on July 1, 2024

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?

screen shot 2018-07-20 at 9 35 23 am

from react-to-print.

LazarLidia avatar LazarLidia commented on July 1, 2024

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";

mozillapdf1

mozillapdf

from react-to-print.

gregnb avatar gregnb commented on July 1, 2024

@LazarLidia Have you been able to figure it out? i can't trigger your error

from react-to-print.

Okami92 avatar Okami92 commented on July 1, 2024

@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.

maloun96 avatar maloun96 commented on July 1, 2024

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.

jindal1982 avatar jindal1982 commented on July 1, 2024

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.

MatthewHerbst avatar MatthewHerbst commented on July 1, 2024

@jindal1982 this is now being tracked in #93

from react-to-print.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.