html 웹페이지 인쇄하기 설정 A5 A4
페이지 정보
본문
<div>
<div class="ABCD">
<div class="content">Page 1</div>
</div>
<div class="ABCD">
<div class="content">Page 2</div>
</div>
</div>
body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
background-color: #ddd;
}
* {
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.ABCD {
margin:0;
padding:0;
width: 148mm;
height: 69.9mm;
min-height: 69.9mm;
border: 0;
border-radius: 0;
padding-bottom:7mm;
border-bottom:0;
box-shadow: 0;
background: #fff;
}
.page_p {
margin:0;
padding:0;
width: 148mm;
height: 69.9mm;
min-height: 69.9mm;
border: 0;
border-radius: 0;
padding-bottom:7mm;
border-bottom:dotted 1px #999;
box-shadow: 0;
background: #fff;
}
@page {
size: A5;
margin: 0;
}
@media print {
html, body {
margin:0;
padding:0;
width: 148mm;
height: 209.9mm;
background: #fff;
}
.ABCD {
page-break-after: always
}
}
A5 기준으로 작성 A4로 만들경우 A5를 A5로 수정하고고 사이즈도 수정