---- Introduction ----
I was getting issues such as 'Warning : SSL Errors' while running the following command : wkhtmltopdf -B 0 -L 0 -R 0 -T 0 --javascript-delay 1000 --no-stop-slow-scripts --debug-javascript test.html output.pdf
Note that the above test.html runs some javascript over ssl / reverse proxy. Hence the SSL Errors..
---- Command CURL, Testing Phase ----
CURL command to test my certificate (without certificate) :
curl https://prod
Output :
curl: (60) SSL certificate problem: self signed certificate
CURL command to test my certificate (with certificate) :
curl https://prod --cacert cert.crt
Output :
<MY INDEX PAGE>
Takeway : Now I know the issue I have is to do with my remote machine certificate being selfsigned, I should be able to run my wkhtmlpdf command (assuming I can pass my certificate as an argument).
---- Tool WKHTML, Implementation Phase ----
The current build version I use is 0.12.4 (official release). It does not include ssl certificates support, so from there I have 2 options :
option 1 : I wait until an official version gets released (0.12.5), and have tweeted this : https://twitter.com/DeepCashkette/status/889491206673223681+
option 2 : I use a version that is more recent and potentialy unstable (wkhtmltopdf 0.13.0-alpha-7b36694).
I've opted for option 2, and downloaded wkhtmltox-0.13.0-alpha-7b36694_linux-precise-i386.deb and installed xvfb (required for alpha versions of wkhtmlX). Procedure here : wkhtmltopdf: cannot connect to X server
I end up with this script "wkhtmltopdf.sh:
xvfb-run -a -s "-screen 0 640x480x16" wkhtmltopdf --ssl-crt-path cert.crt "$@"
However it still outputs : Unknown long argument --ssl-crt-path, and I cannot proceed to the (pdf) conversion.
Let me know should you need more technical details, Thanks!