Removing the last blank page in print preview

225 Views Asked by At

When I print reports the print preview displays the second page as blank.I need only the first page which has the content.I identified that the sizer tag has width and height set and it was causing the issue.I have used media print but the styles are not getting applied.This is the link to html print preview https://i.stack.imgur.com/h3GFx.png

@media print {
  #sizer {
    width: unset !important;
    height: unset !important
  }
}

Also In typescript I tried adding this but it doesn't work

 $(win.document.body).find('#sizer')               
                .css('height', 'unset!important');

Print preview Html https://i.stack.imgur.com/h3GFx.png

0

There are 0 best solutions below