mikehaertl / phpwkhtmltopdf

A slim PHP wrapper around wkhtmltopdf with an easy to use and clean OOP interface
MIT License
1.6k stars 238 forks source link

string(184) "Failed without error message: wkhtmltoimage "test123.html" "\AppData\Local\Temp\tmpB072.tmp.png" (Exit code: 1)" #380

Closed Usama4745 closed 2 years ago

Usama4745 commented 2 years ago

getting this issue while creating image. I am on windows string(184) "Failed without error message: wkhtmltoimage "test123.html" "\AppData\Local\Temp\tmpB072.tmp.png" (Exit code: 1)"

mikehaertl commented 2 years ago

I can not help you without any (short) code example. Your problem sounds like you forgot to configure the path to wkhtmltopdf.exe. See the second paragraph in the README:

For Windows systems make sure to set the path to wkhtmltopdf.exe in the binary option. Alternatively you can add the wkhtmltopdf "bin" directory to the system PATH variable to allow wkhtmltopdf command available to Windows CMD.

Usama4745 commented 2 years ago

It worked for me in windows. Do we also need to add this .exe file in linux server?

mikehaertl commented 2 years ago

You need to install wkhtmltopdf. But all this is mentioned in the README. Please understand that this is not a support forum but for reporting bugs.