Erpnext Print Format issue

Hello

I have some issue in header and footer print format, I use a letter head to print all header and footer in each page except first page [cover page]. So to achieve that I update pdf_header_footer.html , put this remove the content of header and footer put the spaces still shown.

And This is a code

<!DOCTYPE html>
<html lang="{{ lang }}" dir="{{ layout_direction }}">
<head>
<meta charset="utf-8">
 
	{% if html_id == "footer-html" %}
<style>
		{{ css }}
</style>
	{% else %}
	{% for tag in head %}
	{{ tag | string }}
	{% endfor %}
	{% endif %}
 
	<style>
		body {
			margin: 0 !important;
			border: 0 !important;
		}
 
 
		.letter-head-footer {
            	/*margin-top: -3mm !important;
            	padding: 15mm 0 0mm !important;*/
            	height: 10% !important;
		}
 
		.letter-head-header {
/*     		padding: 0mm 0 0mm !important;*/
    			z-index:-1;
		}
 
		.letter-head-header,
		.letter-head-footer {
    			display: block;
    			width: 100%; 
		}
 
 
@media print {
	a[href]:after {
		content: none;
	}
 
}
</style>
 
<script>
	function subst() {
		var vars = {};
		var x = window.location.search.substring(1).split('&');
		for (var i in x) {
			var z = x[i].split('=', 2);
			vars[z[0]] = decodeURIComponent(z[1]);
		}
		var x = ['frompage', 'topage', 'page', 'webpage', 'section', 'subsection', 'subsubsection'];
		for (var i in x) {
			var y = document.getElementsByClassName(x[i]);
			for (var j = 0; j < y.length; ++j) {
				y[j].textContent = vars[x[i]];
			}
		}
 
		var footerElements = document.getElementsByClassName('letter-head-footer');
		for (var i = 0; i < footerElements.length; ++i) {
			if (parseInt(vars['page']) == 1) {
				footerElements[i].style.display = 'none';
			} 
			else {
				footerElements[i].style.display = 'block';
				}
			}
 
		var headerElements = document.getElementsByClassName('letter-head-header');
		for (var i = 0; i < headerElements.length; ++i) {
			if (parseInt(vars['page']) == 1) {
				headerElements[i].style.display = 'none';
			} 
			else {
				headerElements[i].style.display = 'block';
				}
			}
	}
</script>
 
{% for tag in styles %}
{{ tag | string }}
{% endfor %}
 
</head>
<body onload="subst()" class="{{ 'first-page' if is_first_page else '' }}">
 
	<div class="print-format">
<div class="wrapper">
			{% for tag in content %}
			{{ tag | string }}
			{% endfor %}
</div>
</div>
</body>
</html>

Notice: I use wkhtmltopdf