i have a web page that encoded in html and css. the size of the web page is of A4 Page (300dpi) = 2480 X 3508 (PX).
the problem is that when i print my web page it's printing in 72/96dpi resolution and print 7 pages instead of 1, and i want that the printer will print my web page in 300dpi resolution.
some code in CSS, HTML, JAVASCRIPT or something that can help me?
thanks.
You can use CSS just like:
@media print {
@page {
size: 210mm 297mm;
}
}
or with px:
@media print {
@page {
size: 2480px 3508px;
}
}
https://developer.mozilla.org/en-US/docs/Web/CSS/@media#media_types
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With