css table print page 버그...
16시간 고생 끝에 발견한 깨달음: CSS로 테이블 인쇄 시 'flex' 사용은 페이지 넘김 버그의 원인. 해결책이 궁금하다면 클릭하세요!
GGAMI
와.. 이거 때문에 진짜로, 16시간 넘게 날려먹었다.
css table print 할때.
프린트 할때에. table 을 사용하는 사람들이 있다.
pdf 를 만들든 뭐든.
근데. 여기서 2페이지 이상 넘어가면, tr의 높이 크기값이 이상하리만큼 커지는 경우가 있다.
그 이유는. display: flex; 를 사용해서이다. table 안에서 div든 어디든 flex를 사용하면. 2page 넘어가는 인쇄영역에서. page가 넘어가는 끝 부분에서의 문제로 꼭 문제가 발생된다.
https://github.com/wkhtmltopdf/wkhtmltopdf/issues/1524#issuecomment-708958565
At the root of my page, I had display: flex; container. It was exactly the reason why none of the previous answers worked for me.
@media print { display: block; } for that container worked like a charm in my case.
I'm fully aware, you might need display: flex for print version of your page. Just wanted to let you know that was the root cause of the problem.