Plotly PDF doc example not working

Hi plotly experts,

I’m trying to use the example from here: Python pdf reports in Python/v3
but I get an error while trying to create the PDF at this line:

pisa_status = pisa.CreatePDF(
source_html, # the HTML to convert
dest=result_file) # file handle to recieve result

gaierror: [Errno 11004] getaddrinfo failed

Could someone help to get around this error?
Or is there any other way to generate PDFs of dash html layouts programatically?

Thanks in advance!

Package Versions:
dash 1.0.2
xhtml2pdf 0.2.3

I’m running dash on Windows.