Physically print webpage (div/body) to printer with same html output as rendered (no custom printer CSS)

108 Views Asked by At

Javascript

What I have tried so far

Window.print();

Prints out page without my CSS layout...

The other solutions says you have to use this type of css code

@media print /*--This is for Print--*/ {
        .btn
        {
            display: none;
        } 
}

I would like to see a solution without the custom CSS stylesheet for printer with plain JS.

Thanks

0

There are 0 best solutions below