Answer the question
In order to leave comments, you need to log in
How to print html page?
Is it possible to somehow print the page as it is displayed from the monitor? Those. without losing the background, fonts. Or print it as a picture?
Answer the question
In order to leave comments, you need to log in
Connect it https://html2canvas.hertzen.com/
Print like this
function printCanvas(dataUrl) {
var windowContent = '<!DOCTYPE html>';
windowContent += '<html>'
windowContent += '<head></head>';
windowContent += '<body style="margin: 0; padding: 0;">'
windowContent += '<img src="' + dataUrl + '" style="max-width: 100%;">';
windowContent += '</body>';
windowContent += '</html>';
var printWin = window.open('','');
printWin.document.open();
printWin.document.write(windowContent);
printWin.document.close();
printWin.focus();
printWin.print();
printWin.close();
}
html2canvas(window.parent.document.body, {
onrendered: function(canvas) {
var cand = document.getElementsByTagName('canvas');
printCanvas(canvas.toDataURL());
}
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question