I'm using pdfkit like this:
options = { 'run-script': script }
script
function isOverflown(element) {
return element.scrollHeight > element.clientHeight
}
var els = document.getElementsByClassName('headings');
for (var i = 0; i < els.length; i++) {
var el = els[i]
el.style.height = isOverflown(el) ? '0px' : '300px'
}
pdfkit.from_file('test.html', options=options)
Has anyone had any success using the run-script argument within pdfkit? I couldn't even get the debug-javascript argument to work either, I tried values of '', True, and 'true'.