I need to convert html text to pdf.
Most answers here recommend to use pdfkit and wkhtmltopdf (https://wkhtmltopdf.org/). However, me company doesn't allow me to install wkhtmltopdf (it is also blocked by admin). There was an option to build from source but it seems like google blocks it due to security reason (https://github.com/wkhtmltopdf/wkhtmltopdf).
Is there an alternative or workaround?
I'm very new to python and don't have programming background, appreciate every detailed explanation.
Yes you can just download it and run it directly. I used that for a shared host (WebFaction) where I have SSH but not root access nor installation option.
cd /tmp
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
cd wkhtmltox/
./bin/wkhtmltopdf
You should be good.
Note that version 0.12.5 is out but has no linux-generic version. Therefore you may want to stick to 0.12.4 for now.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With