Answer the question
In order to leave comments, you need to log in
Page template?
How can I print a specific area of a page in vue?
I did it like this, but print goes without css, just bare html. How can this be fixed?<div id="printableArea"> текст </div>
<a @click="printPageArea('printableArea')">Print</a>
methods: {
printPageArea(areaID){
var printContent = document.getElementById(areaID);
var WinPrint = window.open('', '', 'width=900,height=650');
WinPrint.document.write(printContent.innerHTML);
WinPrint.document.close();
WinPrint.focus();
WinPrint.print();
WinPrint.close();
}
},
Answer the question
In order to leave comments, you need to log in
The media rule allows you to specify the type of media for which the specified style will be applied.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question