I created a view which look like a PDF document. Now I want to print it using window.print()
, but when I run this code it generates header and footer.
I change the footer using this code:
let footer = "Nr"+this.contractForm.contract_number+this.datePipe.transform(this.contractForm.date, 'd.MM.yyyy');
window.history.pushState("object or string", "Title", footer.replace("http://", ""));
I want to remove header (it generates date and (I think) title).
I tried to use remove header and footer from window print
And many similar solutions.
Summarizing, I want to remove header from generated file.