Search Posts

Getting a Blank space in top of print Screen AnjularJS

I am working in AngularJS to Print invoice Page. Here i’m facing some issue. Getting a Blank space in top of print Screen

enter image description here

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

Leave a Reply

Your email address will not be published. Required fields are marked *