Печать страницы:

Код:
<!--Печать страницы-->

<script type="text/javascript">
var link;
var l_h;
var i = 0;
 
function make_print() {
 x = document.getElementById("style");
 if (x.title == "print") {
  x.href = l_h;
  x.title = "full";
 }
 else if (x.title == "" || x.title == "full") {
  x.href = "https://forumstatic.ru/files/000f/51/7c/39472.css";
  x.title = "print";
 }
}
 
function create_link() {
    var main = document.getElementById("pun-main").getElementsByTagName("h1")[0];
    var a = document.createElement("a");
    a.id = "print";
    a.setAttribute("style", "float: right; cursor: pointer;");
    a.innerHTML = "<img src='https://forumstatic.ru/files/0019/f3/f4/60354.png' alt='print' />";
    a.href = "javascript:make_print();";
    main.appendChild(a);
}
 
if (document.URL.indexOf("viewtopic") != -1) {
link = document.getElementsByTagName("link");
 for (i in link) {
  if (link[i].rel == "stylesheet") {
   l_h = link[i].href;
   link[i].id = "style";
   break;
  }
 }
    create_link();
}
</script>

На самом деле этот скрипт лишь упрощает визуальное представление страницы для дальнейшей распечататки её посредством веб-браузера.

Пример - здесь.