Forums

Wkhtmltopdf error

path_wkhtmltopdf = '/home/TromotiXC/wkhtml-install/usr/local/bin/wkhtmltopdf' config = pdfkit.configuration(wkhtmltopdf=path_wkhtmltopdf) pdfkit.from_string(html,'/home/TromotiXC/tromotixcapp/static/real_estate_analyze.pdf', configuration=config)

I run that with wkhtmltopdf and wkhtmltopdf.exe also but I get this:

raise IOError("wkhtmltopdf exited with non-zero code {0}. error:\n{1}".format(exit_code, error_msg))       OSError: wkhtmltopdf exited with non-zero code 127. error:    /home/TromotiXC/wkhtml-install/usr/local/bin/wkhtmltopdf: error while loading shared libraries: libpng12.so.0:     cannot open shared object file: No such file or directory    **NO MATCH**

How to fix it?

Thank you in advane!

I would like to create a pdf, save it and attach to an email.

That looks like you're trying to use an install of wkhtmtopdf that is not compatible with our environment. Just use the version that is already installed.