Window.print() and IE11 (React)

Hi,

I have the following code which call the print window with window.print(). In Chrome and Edge, it shows the print preview window but not in Firefox and IE11. Is there a way to make Firefox and IE11 to show the print preview window as well, or this is something that is browsers specific issue that can’t be solved by code?

    const printOut = () => {
        window.print();
    }

This is the part of code which calls the printOut

return (
        <>
           <Button 
              variant="contained" 
              color="primary" 
              onClick={printOut}
           >
              {t('common.button.print')}
          </Button>
    )

Hi @dark_dragonian

From the Mozilla doc., Window.print has been supported in firefox since v1 and IE since v5. If the print preview is displayed by other browsers and not in firefox and IE, my guess is there could be some settings in those specific browsers in your PC preventing the preview from showing .

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.