I am working in AngularJS to Print invoice Page. Here i’m facing some issue. Getting a Blank space in top of print Screen
Here My Code
HTML
<div id="invoice" class="compact">
<div class="invoice-container">
<div class="card md-whiteframe-8dp printclass">
<div class="header">
<div class="invoice-date">10 October 2017</div>
<div layout="row" layout-align="space-between stretch">
<div class="client">
<div class="invoice-number mb-8" layout="row" layout-align="start center">
<span class="title">PERFORMA INVOICE</span>
<span class="number">PI50/2017</span>
</div>
<div class="invoice-number mb-8" layout="row" layout-align="start center">
<span class="hsn">HSN CODE:-</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="mybutton">
<button class="print" ng-click="vm.takePrint()">Take Print</button>
</div>
CSS
@media print {
body * { visibility: hidden; }
.printclass * { visibility: visible; }
JS
vm.takePrint = takePrint;
function takePrint(){
window.print();
}
What i need to do to remover the blank spaces in top the of the print page.enter image description here
Source: AngularJS
from Angular Questions https://angularquestions.com/2017/10/17/getting-a-blank-space-in-top-of-print-screen-anjularjs/
via @lzomedia #developer #freelance #web #lzomedia.com
No comments:
Post a Comment