When I encountered this issue some time back while creating a basic form, it posed quite a challenge for me.
It appears that Chrome is considered the top browser when it comes to restricting user control over the printing process. Nonetheless, its capabilities are still limited, and other browsers like Firefox do not support @page.
To address this, I decided to incorporate a @media print into the style sheet to prompt the user to print the page in portrait mode. I used display: none; on the header, nav, and footer elements to eliminate any unwanted browser additions (this method works on Chrome and Firefox, but IE may require manual adjustments). Additionally, I set border: 0; on input fields since they were part of a form... Lastly, I specified a width and height for the container div to align with an 8.5 x 11 paper size for optimal fitting.
@media print{
@page {size: auto; margin: auto;}
header nav, footer {display: none;}
input {border: 0px;}
#container {width:9.1in; height:10in;}
}
In the end, webpage printing remains heavily influenced by the user's browser choice, making it a rather complex issue to tackle. Utilizing @media print certainly helps, but generating a PDF version of the page for users to export may be the most reliable way to ensure accurate printing results.