删除打印预览中的最后一个空白页
当我打印报告时,打印预览将第二页显示为空白。我只需要包含内容的第一页。我发现 sizer 标签设置了宽度和高度,这导致了问题。我使用了媒体打印,但样式未应用。这是 html 打印预览的链接 https://i.sstatic.net/ h3GFx.png
@media print {
#sizer {
width: unset !important;
height: unset !important
}
}
另外在打字稿中,我尝试添加此内容,但它不起作用
$(win.document.body).find('#sizer')
.css('height', 'unset!important');
打印预览 Html https://i.sstatic.net/h3GFx.png
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.sstatic.net/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.sstatic.net/h3GFx.png
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论