It's not something we have to do very often nowadays.
I usually have a print button that opens a popup with a separate master layout.
The data is the same, but there is no navigation bars, no ads, no banner etc...
Also, I have a specific print class on the body, so I format the width of the body to fit in A4.
Also, since there is a print class on body, I can customize sub styles/classes as I see fit.
Let's say I have a table with black background headers, it's not cool for printing, so I'll change it like so:
/* default */
.mytable th {
background: black;
color: white;
}
/* printing version */
.print .mytable th {
background: transparent;
color: black;
}
No need of media queries, it'll work in very old browsers as well.