I have taken a template from w3-schools, did some research, and tried this by looking into this question:
@page {
size: 7in 9.25in;
margin: 27mm 16mm 27mm 16mm;
}
I inserted this print code
<script>
$(document).ready(function()
{
window.print();
});
</script>
And got this result:
But this is not I want. I do not want the extra whitespaces around the div
s. It should be printed as an A4 page, like this:
What should I do to achieve this?
PS: Before unleashing frustration, I am a pure backend developer. My partner, who is a front-end dev, is sick for days. Sorry and thank you :)