'Error after trying to use pdfkit in google app engine
I'm trying to generate a pdf from html in google app engine, I used the same configuration that I used on Heroku
if platform.system() == "Windows":
config = pdfkit.configuration(wkhtmltopdf=os.environ.get('WKHTMLTOPDF_BINARY', 'C:\\Program Files\\wkhtmltopdf\\bin\\wkhtmltopdf.exe'))
else:
os.environ['PATH'] += os.pathsep + os.path.dirname(sys.executable)
WKHTMLTOPDF_CMD = subprocess.Popen(['which', os.environ.get('WKHTMLTOPDF_BINARY', 'wkhtmltopdf')],
stdout=subprocess.PIPE).communicate()[0].strip()
config = pdfkit.configuration(wkhtmltopdf=WKHTMLTOPDF_CMD)
And also added this in app.yaml file
env_variables:
WKHTMLTOPDF_BINARY: wkhtmltopdf-pack
but I'm getting this error
/env/bin/wkhtmltopdf-pack: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory
I tried to install libXrender.so.1 by using this command
sudo apt-get install -y libxrender1
but it saying that I have already installed libxrender1
libxrender1 is already the newest version (1:0.9.10-1).
Am I missing something, or maybe this config cannot be used with google?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
