I am trying to develop a small app to convert html to pdf using wkhtmltopdf and GoLang. But when I try to pass arguments to it, getting an exit status of 1.
args := []string{"--page-height 420mm","--page-width 297mm","/path/src/edit.html","/path/src/edit.pdf"} fmt.Println(args) cmd := exec.Command("/home/local/ZOHOCORP/santhosh-4759/Downloads/wkhtmltox/bin/wkhtmltopdf",args...) fmt.Println(cmd)
Ouptut of cmd and args
cmd: &{/path/wkhtmltopdf [/path/wkhtmltopdf --page-height 420mm --page-width 297mm /path/src/edit.html /path/src/edit.pdf] [] [] false [] [] [] [] }
args[--page-height 420mm --page-width 297mm /path/src/edit.html /path/src/edit.pdf]