Search code examples
javascriptphphtmlwkhtmltopdf

wkhtmltopdf not accepting values in url?


So I'm creating a tool which uses wkhtmltopdf to convert my html to PDF. for example this does work:

wkhtmltopdf google.com test1.pdf

However my tool requires to have some values changed whenever this is necessary, and that's why I send my values through my url.

I send these values like this:

.[url]final.php?myTextField1=name&myTextField2=man&myTextField3=Blablablabla&myTextField4=kleur&myTextField5=zekerwel&myTextField6=hoihallo

However if I try to convert this url like this:

wkhtmltopdf [url]/final.php?myTextField1=name&myTextField2=man&myTextField3=Blablablabla&myTextField4=kleur&myTextField5=zekerwel&myTextField6=hoihallo test1.pdf

wkhtmltopdf does not seem to accept it, is there any workaround for this?


Solution

  • It has been a while since I have used the tool, but there were a few issues I recall to using it this way -- one was you had to make sure to wrap the urls in quotes.