0

I am using javascript window.print() for opening browser print. However when print view is opened, chart(which is in iframe) is getting cut of.. I tried some solutions but nothing work for me.

Button click

<a href="javascript:window.print();" class="tooltips mr15" title="Print Report">
    <div class="icon-print-lrg"></div>
</a>

Iframe html

<iframe id="kibana_url" src="{{reportsvm.kibanaUrl}}" style="min-height:600px; width:100%;" frameBorder="0"></iframe>

CSS class

@media print
{  
    .noPrint, .noPrint *
    {
        display: none !important;
    }   
}

I added in css zoom:200% because when browser is at 200% everything is good, but that is not working for me.

@media print
{ 
   iframe 
   {
    zoom: 200%;
   }
  .noPrint, .noPrint *
  {
  display: none !important;
  }        
}

Actual look:

https://snag.gy/iShT4D.jpg

Print look:

https://snag.gy/P0NhK2.jpg

Micko
  • 431
  • 8
  • 27

1 Answers1

0

Have you tried JQuery print function? Also i think in @media print if you reduce the zoom around 75% you will get the whole area. Also i found this link here.

PMArtz
  • 148
  • 9