Skip to content

Instantly share code, notes, and snippets.

@blbwd blbwd/print.html
Last active May 9, 2016

Embed
What would you like to do?
Printer Friendly Version Of Your Web Page Content
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Clinet side printer version</title>
<style type="text/css">
.style1 {color: #0033FF}
.style3 {
font-size: 13px;
font-family: "Times New Roman", Times, serif;
}
</style>
</head>
<script language="javascript">
function Clickheretoprint()
{
var disp_setting="toolbar=yes,location=no,directories=yes,menubar=yes,";
disp_setting+="scrollbars=yes,width=650, height=600, left=100, top=25";
var content_vlue = document.getElementById("print_content").innerHTML;
var docprint=window.open("","",disp_setting);
docprint.document.open();
docprint.document.write('<html><head><title>Inel Power System</title>');
docprint.document.write('</head><body onLoad="self.print()"><center>');
docprint.document.write(content_vlue);
docprint.document.write('</center></body></html>');
docprint.document.close();
docprint.focus();
}
</script>
<body bgcolor="#CCCCCC">
<table width="50%" border="0" align="center" cellpadding="4" cellspacing="4" bgcolor="#FFFFFF">
<tr>
<td colspan="2" bgcolor="#CCCCFF"><h2 align="center" class="style1">Site Header Name </h2></td>
</tr>
<tr>
<td width="16%" valign="top" bgcolor="#CCCCFF"> <table width="62%" border="0" align="center" cellpadding="0"
cellspacing="0">
<tr>
<td><a href="#">Link1</a></td>
</tr>
<tr>
<td><a href="#">Link2</a></td>
</tr>
<tr>
<td><a href="#">Link3</a></td>
</tr>
</table></td>
<td width="84%">
<div align="right"><a href="javascript:Clickheretoprint()"> Click here to print</a> </div>
<div class="style3" id="print_content">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eget urna a nisl egestas imperdiet. Duis in justo augue, ut gravida nisl. Praesent malesuada adipiscing libero, sit amet fringilla metus vehicula in. Donec quis dolor velit. Aliquam erat volutpat. Fusce risus augue, tincidunt et fermentum a, commodo sit amet nulla. Aliquam erat volutpat. Vivamus id nisi ipsum, eu elementum urna. Vivamus feugiat ipsum eget lectus tempus aliquam. Maecenas eleifend aliquet convallis.
<br />
<br />
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus eget urna a nisl egestas imperdiet. Duis in justo augue, ut gravida nisl. Praesent malesuada adipiscing libero, sit amet fringilla metus vehicula in. Donec quis dolor velit. Aliquam erat volutpat. Fusce risus augue, tincidunt et fermentum a, commodo sit amet nulla. Aliquam erat volutpat. Vivamus id nisi ipsum, eu elementum urna. Vivamus feugiat ipsum eget lectus tempus aliquam. Maecenas eleifend aliquet convallis.
</td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td colspan="2" bgcolor="#CCCCFF"><span class="style3">footer</span></td>
</tr>
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.