Question
changing Default Values of the printer using Javascript
Hey,
I added to my project a print button to print the current slide.
for that I just execute this Js code : window.print();
the problem is that the print() method calls in the browser the built in printer.
I want set the default value of the skaling in the printer to 50% so that it fits properly.
I wrote this function but it seems not to work:
function printCurrentSlide50Percent() {
var currentSlide = document.getElementsByClassName("slide-div")[0];
var img = new Image();
img.src=currentSlide.toDataURL();
img.style.transform = "scale(0.5)";
var printWindow = window.open();
printWindow.document.write(img.outerHTML);
printWindow.print();
}
any help would be appreciated
