reactToPrint library printing generates blurry images. I am using a thermal printer to print the contents using react.js

313 views Asked by At

Printed Image

I have been trying to figure this out to make the printing text clear using reactToPrint library, but it's coming as blurry. I have tried making font changes(font face, style etc) but none of them seems to work. I have tried subpixel-antialiasing also, but it still doesn't improve my print quality. I am using a thermal printer to print for a restaurant POS system developed.

When I print any content writing them in any text editor that gives me clear output using the same printer.

enter image description here

Part of code:

<ReactToPrint
trigger={(e) => {
    return <MDBBtn size='lg' className="me-2" color="info" disabled={printBtnDisabled}>
        Print
    </MDBBtn>

pageStyle={pageStyle}
content={() => componentRef.current} />

Can anyone please guide me on this? Let me know if anything else is required?

0

There are 0 answers