adding support to split the pdf pages only on "white" rows
hello,
i've added support to your library for splitting pages only on "white" canvas "rows", added comments on the code itself.
i believe it will solve the issues: https://github.com/eKoopmans/html2pdf/issues/26 https://github.com/eKoopmans/html2pdf/issues/13
It'll will take some time until i'll be able to work on this changes, will update when will be done.
Sure no worries, thanks again for the contribution!
Hey @ilanp13, sorry I left you hanging. The changes look good! I just did a big restructuring to the code with v0.8.0, I'll take a look at working this in soon. I'm thinking I'll pull the page-break behaviour out into a separate module. Thanks again for the contribution!
Hey folks. Is there any update on this PR? Would really love to use this feature. IMO it makes the difference between a professional looking output and not.
Hi @ilanp13 , Thank you for the code. It's working in some scenarios for me. But I am trying to understand what the variable whiteColorLevel does here. I have a Uint8ClampedArray and in the pixel row, the first pixel RGBA values are 208,208,208,255, which is close to grey. But the method still returns true. What exactly is whiteColorLevel. Can you please explain me?
Hello! There are now 4 PRs for pagebreaks, and I know it's an important feature to many. I am looking into combining the PRs now and working them in.