Skip to content

Commit

Permalink
Update 0.3.4
Browse files Browse the repository at this point in the history
Better print
  • Loading branch information
isanchop authored Nov 15, 2021
1 parent 2994b97 commit 849d601
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ window.addEventListener('load', function(){
if(evt.detail === 3){

var head = document.getElementsByTagName("head")[0].innerHTML;

var tit = document.getElementsByTagName("h1")[0].innerHTML;
var pages = document.getElementById('page-container').childNodes;

for(i=0; i<pages.length; i++){
Expand All @@ -14,6 +14,7 @@ window.addEventListener('load', function(){

newWindow = window.open("", "Document", "height=865,width=625,status=yes,toolbar=no,menubar=no");
newWindow.document.getElementsByTagName("head")[0].innerHTML = head + "<style> .nofilter{filter: none !important;} </style>" + "<style> @media print {@page {size: A5;}}</style>" ;
newWindow.document.title = tit;
newWindow.document.getElementsByTagName("body")[0].innerHTML = pdf;
newWindow.document.getElementsByTagName("body")[0].childNodes[0].style = "";
}
Expand Down

0 comments on commit 849d601

Please sign in to comment.