Is it possible? I would for example remove the default margin and remove header and footer. Now open the print window with these options set.
Is it possible? I would for example remove the default margin and remove header and footer. Now open the print window with these options set.
It is possible using CSS, using the media type print
Suppose you want to hide the header
tag when prompted to print:
<header>
<h1> Preciso sumir na impressão</h1>
<header>
<p> Eu quero aparecer na impressão </p>
In your CSS, you should define:
@media print {
header {
display: none
}
}
These are browser settings, not page settings. Some time ago I researched a lot on the subject as well and ended up solving the problem by setting these print settings as browser settings in the pre-document system requirements.
So unless JavaScript is possible to manipulate browser settings, no can be done.