<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Invoice A5 for Print</title>
	<style>
		.a5 {
			border: 1px solid #DDD;
			margin: 0 auto;
			width: 420px;
			height: 595px;
			padding-top: 30px;
			padding-bottom: 50px;
			display: table-row-group;
			display: table;
		}
		p { page-break-inside: avoid; }
		header { position: absolute; top: 0; page:content; }
		footer { position: fixed; bottom: 0; display: table-footer-group;}
		.content {
			padding-bottom: 30px;
			padding-top: 30px;
		}
	</style>
</head>
<body>
	<div class="a5">
		<header>
			<h3>Header of INvoice</h3>
		</header>
		<section class="content">
			<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Officiis ut maxime dicta odio repudiandae quam, optio accusamus quia nobis aliquam, facere ratione praesentium voluptatum blanditiis, tempore exercitationem similique, modi voluptatem?</p>
			<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas optio perferendis unde dicta, pariatur, laboriosam placeat. Quibusdam perspiciatis, nulla, expedita, modi aut veritatis cupiditate hic illum, quasi nisi accusantium cumque!</p>
			<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas optio perferendis unde dicta, pariatur, laboriosam placeat. Quibusdam perspiciatis, nulla, expedita, modi aut veritatis cupiditate hic illum, quasi nisi accusantium cumque!</p>
			<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas optio perferendis unde dicta, pariatur, laboriosam placeat. Quibusdam perspiciatis, nulla, expedita, modi aut veritatis cupiditate hic illum, quasi nisi accusantium cumque!</p>
			<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas optio perferendis unde dicta, pariatur, laboriosam placeat. Quibusdam perspiciatis, nulla, expedita, modi aut veritatis cupiditate hic illum, quasi nisi accusantium cumque!</p>
			<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quas optio perferendis unde dicta, pariatur, laboriosam placeat. Quibusdam perspiciatis, nulla, expedita, modi aut veritatis cupiditate hic illum, quasi nisi accusantium cumque!</p>
			
		</section>
		<footer>
			<p>Copy right 2017</p>
		</footer>
	</div>
</body>
</html>