Solution 1 :

Google used client-side rendering for this page.
This is an old link, but maybe it will be useful to you
https://github.com/devongovett/node-wkhtmltopdf/issues/70

Problem :

I’m trying to create a pdf for easy reference of jobs on google careers however when I try to create a PDF using wkhtmltopdf I’m getting a blank page.

I believe this has something to do with the html of the page itself? When I try to inspect the page source the html code is very short. There’s also a few javascript links.

The URL I’m trying is this one

And here’s the code I’m using:

pdfkit.from_url("https://careers.google.com/jobs/results/125555613246595782-partner-engineer-google-cloud/", 'test.pdf',
           options={'--javascript-delay': 5000})

Using wkhtmltopdf like this also returns a blank pdf:

wkhtmltopdf https://careers.google.com/jobs/results/125555613246595782-partner-engineer-google-cloud/ test.pdf

Comments

Comment posted by IVRafa

This is exactly what I was looking for. Thank you!

Comment posted by pratiklodha

@IVRafa can you elaborate. I am also unable to render chards when converting html to pdf

By

Leave a Reply

Your email address will not be published. Required fields are marked *