Iam working on reloading of a webpage after printing it in PDF Format.So after printing i provided a window.location.reload method.It works fine in Chrome but not on Firefox.How Can I get rid of this problem?
printDocument = () => {
const { match } = this.props;
const { orderNo } = match.params;
this.setState({ showPickSheet: true }, () => {
const printContents = document.getElementById("divToPrint").innerHTML;
document.title = `PickSheet_${orderNo}`;
const originalContents = document.body.innerHTMl;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;
window.location.reload();
});
};