python-pdfkit
python-pdfkit copied to clipboard
Using PdfKit with pages like angular
I have written below code
import pdfkit
url='https://myangularsite.com/student-registration-webform'
pdfkit.from_url(url, 'out.pdf', options = {'javascript-delay':'1000'})
without this javascript-delay':'1000
above code printing EMPTY Page.
But that's unreliable. Because angular is asynchronous.
Putting a static value like 1000 is not good.
We don't know when the page finishes loading.
Is there any way to signal pdfkit that the page is ready ?
can we check this asynchronously in python ?