@feed expedition :
The error message indicates that the wkhtmltopdf executable file cannot be found. This file is required by the pdfkit library to generate PDF files.
You can try the following steps to resolve the issue:
- Install wkhtmltopdf on your system:
- For Linux systems, you can try running the following command in your terminal:
- If you have already installed wkhtmltopdf make sure that it is added to the PATH environment variable. You can check this by running echo $PATH on Linux or echo %PATH% on Windows.
- If wkhtmltopdf is installed but still cannot be found, you can try passing the path to the pdfkit function manually. For example:
import pdfkit
# Set the path to wkhtmltopdf executable file
path_wkhtmltopdf = '/usr/local/bin/wkhtmltopdf' # This may vary depending on your system
config = pdfkit.configuration(wkhtmltopdf=path_wkhtmltopdf)
# Use the configuration when generating PDF
pdfkit.from_url('http://google.com', 'out.pdf', configuration=config)
I hope this helps you to resolve the issue.