How to add custom argument which can be passed to wkhtmltopdf executable?
abhisekp-impeller opened this issue · 3 comments
abhisekp-impeller commented
I would like to add a few custom options which might not be supported by go-wkhtmltopdf such as ssl cert i.e. signing the pdf which is support by the internal executable.
SebastiaanKlippert commented
How would you do this in wkhtmltopdf then?
abhisekp-impeller commented
Please refer https://wkhtmltopdf.org/usage/wkhtmltopdf.txt
There are many options.
--ssl-crt-path <path> Path to the ssl client cert public key in
OpenSSL PEM format, optionally followed by
intermediate ca and trusted certs
--ssl-key-password <password> Password to ssl client cert private key
--ssl-key-path <path> Path to ssl client cert private key in
OpenSSL PEM format
SebastiaanKlippert commented
These are supported.
pdf := NewPDFGenerator()
pdf.SslCrtPath.Set("")
pdf.SslKeyPath.Set("")
etc.
https://github.com/SebastiaanKlippert/go-wkhtmltopdf/blob/master/options.go#L98