打印预览和打印仅打印我的网页的一部分
我有一个相当大的表格数据需要打印,但是当我转到打印预览
或打印
时,我只能看到页面上当前可见的内容,而不是整个网页内容。
所有浏览器中都会发生这种情况。可能是什么原因造成的?
I have a rather large table data I need to print, but when I go to Print Preview
or Print
, I only see what's currently visible on the page, and not the entire content of the web page.
This happens in all browser. What could be causing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
天哪,我花了这么多时间......
我想使用puppeteer生成pdf,但我不明白为什么它只打印输出pdf中的第一页。
原因如下:我在标签上设置了属性“overflow: auto”和“height: 100%”。一旦我删除它,它就工作得很好。
我希望它可以帮助别人。
Oh my god, I spent so much time on it...
I wanted to use puppeteer to generate a pdf and I didn't understand why it only printed the first page in the output pdf.
Here was the reason: I had set properties overflow: auto and height: 100% on tag <body>. Once I've removed it, it worked fine.
I hope it can help someone.
奇怪,从来没听说过有这种事。我的猜测是,您有一些 HTML 构造,例如带有
overflow: auto
的容器div
,使得表格实际上跨越与视口一样高的元素内部,而不是整个页面。Strange, never heard of this happening. My speculation would be that you have some HTML construct in place like a container
div
withoverflow: auto
that makes the table actually span inside an element that is as tall as the viewport, instead of the whole page.