Forums

html to pdf

is there any other library than weasyprint to convert html pages to pdf on pythonanywhere like i use xhtml2pdf on my localhost and it works fine but doesnt works on pythonanywhere server it shows error:-[Errno 101] Network is unreachable i dont understand what to do .. please help? thanx in advance

Your HTML file has links to external resources (like js, css or images), so the convertor is trying to retrieve them to render the page. Free accounts can only access HTTP(S) sites that are on our whitelist, so those retrievals are being blocked. Make sure you're only using local resources in the HTML you want to convert.

Hi can you please recommend an alternative for wkhtmlpdf that works on pythonanywhere without using virtualenv

No, I don't think we have anything else installed for html to pdf conversion.