Is it possible to remove the header and footer when printing with browsers?


I would like to know if it is possible to automatically deactivate the headers and footers generated by google chrome or firefox.

Date, title of the page, URL address and number of pages.

There is a manual way, giving you other options and removing the check for that option.

but I would like to know if it is possible with javascript or other elements, but that the person clicking on my web page can have their file without those added

use: window.print ();

asked by Victor Alvarado 29.03.2017 в 20:07

1 answer


The CSS standard enables advanced formats. There is the directive @page in CSS that allows you to format media pages (like paper). Here is interesting documentation about it link .

It would suffice to include this in your CSS to remove the header and footer.

        size:  auto;   /* auto es el valor inicial */
        margin: 0mm;  /* afecta el margen en la configuración de impresión */
answered by 29.03.2017 / 22:33