5

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?

Stefan Kendall
  • 66,414
  • 68
  • 253
  • 406

2 Answers2

6

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.

Klem231188
  • 106
  • 1
  • 3
4

Strange, never heard of this happening. My speculation would be that you have some HTML construct in place like a container div with overflow: auto that makes the table actually span inside an element that is as tall as the viewport, instead of the whole page.

Pekka
  • 442,112
  • 142
  • 972
  • 1,088