-1

I'm trying to change the URL that gets printed on the bottom of the page when using window.print();

like this : enter image description here

to a simple text like "powered by". I have found some solutions to remove the Url using css , so is there any way for changing it ?

Thanks.

1
  • Your ability to customize the header/footer is pretty minimal, to my knowledge.
    – ceejayoz
    Oct 3, 2019 at 21:47

1 Answer 1

1

While you can't show custom text, you can change the url shown by calling

history.pushState({}, "", "URLtoShow");
window.print()
history.back()

Note that the url must be on the same domain as the page being printed. You can try to show text by calling

history.pushState({}, "", "#  "+messagetoshow);
window.print()
history.back()

but that might not work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.