4 ms·
If I'm reading [1] right, you want to use getBoundingClientRect() instead of clientHeight, which does not account for borders and margins. 1: https://developer
by Ded7xSEoPKYNsDd 9y ago
If I'm reading [1] right, you want to use getBoundingClientRect() instead of clientHeight, which does not account for borders and margins.
1: https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Determining_the_dimensions_of_elements https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_...
- rcarmo 9y agoWell, no, really. Seems like this is due to the way Chrome deals with print CSS and PDF generation rather than any kind of calculations I do prior to invoking PDF generation...