I recently created an HTML page to display data from a MySQL database, and I'm pleased to say that everything is functioning correctly.
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background-color: #F0F0F0;
font: 12pt "Times New Roman";
}
* {
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.page {
width: 210mm;
min-height: 297mm;
padding: 18mm;
margin: 5mm auto;
border: 1px #D3D3D3 solid;
border-radius: 5px;
background: white;
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}
.subpage {
padding: 1cm;
border: 5px solid;
height: 257mm;
outline: 2cm #FFEAEA solid;
}
@page {
size: A4;
margin: 0;
}
@media print {
html, body {
width: 210mm;
height: 297mm;
-webkit-print-color-adjust: exact
}
.page {
margin: 0;
border: initial;
border-radius: initial;
width: initial;
min-height: initial;
box-shadow: initial;
background: initial;
page-break-after: always;
}
ISSUE:
However, I've run into an issue: when I attempt to print and save the document as a PDF, the content gets split onto two pages, leaving the second page blank.
Any suggestions on how to resolve this problem would be greatly appreciated.