New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path must be absolute ("/tmp/") - Windows machine #33
Comments
I fixed enter the full path to a tmp folder I created in my root project folder in windows .. |
http://wkhtmltopdf.org/downloads.html youll need to download the windows binary and point your config to the right path |
I created a config file for my local environment (windows) in this path:
And the contents look like this: return [
'debug' => true,
'binpath' => '/Program Files/wkhtmltopdf/bin/',
'binfile' => 'wkhtmltopdf.exe',
'tmppath' => '/tmp/',
]; I created an empty directory too (so it matches needed /tmp/ path):
|
Did it work ? I didnt have any luck and I used this fork . https://github.com/vodun/wkhtml2pdf It seems to work fine. Seems/claims that it works fine for large files |
Don't see much changes other than the config file pointing to a windows executable |
On my windows machine to get it working I had to make these changes but at pipeexec() it hangs for ever. A quick fix was to disable error pipe.I guess the problem is that windows and with php work in blocking mode with pipes no matter your setting. |
@parhs YES! I had the same problem! Windows7, downloaded win executable. It hangs on fgets() call, loads forever... Sometimes it even generates the pdf, but mostly freezes. |
@briedis Does setting this false works for you ? https://github.com/NitMedia/wkhtml2pdf/blob/master/src/Nitmedia/Wkhtml2pdf/Wkhtml2pdf.php#L939 I mean for me seems to work as a quick temp fix. |
@parhs Yes, setting |
Ok, let me make that into a config option then, so you don't have to edit the core files Nithin Meppurathu
|
Hi, |
@cristinadd I said read_output for false check the link. However clonthu might have added it |
@parhs Thanks for your replay, I set and $read_output = false but nothing happens, just the html is outputted. |
@cristinadd Can you install the files in c: instead of in Program files folder as the shell commands don't like spaces. You normally have to use the special naming for Program~% or something like that. It was easier to uninstall the files, then reinstall in a base folder. C:/wkhtml2pdf/ |
In my case, I'm on windows 64 bits, and the problem was because the wkhtmltopdf-i386 is 32bits, so I needed to include the 64 bits binary. Plus, I've renamed the file with ".exe" to make it work. |
Hi folks,
On windows run a xampp server, when I try generate a pdf with wkhtmltopdf, I get this error:
Path must be absolute ("/tmp/")
How to fixed this specifically on windows?
I need set my windows path tmp? I did try it, buth nothing yet..
Thanks advance..
The text was updated successfully, but these errors were encountered: