Use a proper Paper Size with the Same Aspect Ratio in CSS
To solve this problem, in CSS use a required paper size with the same aspect ratio, as shown below. This example is for A4 size.
@page {
/* A4 size (210mm × 297mm) scaled by 1.5x */
size: 315mm 445.5mm;
margin: 0;
}