laravel-snappy: The exit status code '1' says something went wrong: stderr: "" stdout: "" command: ...
Hey,
I’m now trying for hours to get wkhtmltopdf to run properly. Locally everything’s fine, but on the test server with Windows 2008 R2, IIS 7 it just won’t work. This is the error I get:
The exit status code '1' says something went wrong: stderr: "" stdout: ""
command: "C:\path\to\wkhtmltopdf.exe" --lowquality "http://www.google.com" "c:\test.pdf".
There is no error besides this general error code “1”. The command works fine from command line and even if I just put the command directly in an exec-function. But it does not work with proc_open, which Symfony seems to use. Does anyone have an idea what the problem is or why there is no error?
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 20
Commits related to this issue
- Apply changes to fix PDF generation on IIS7 and WS2012 According to: https://github.com/barryvdh/laravel-snappy/issues/31#issuecomment-85481774 — committed to ServirIO/snappy by hectorh30 8 years ago
Dealing with the exact same problem
Never mind … I fixed it with the following config:
I also get this issue in windows 10. then I found this QA and fixed it by changing in executeCommand function vendor\knplabs\knp-snappy\src\Knp\Snappy\AbstractGenerator.php
to
I narrowed it down to being a problem with the Symfonys Process Class, used in the executeCommand method of the AbstractGenerator class.
I solved the problem with a hack, replacing the executeCommand method in generate with directly executing the command:
I wasn’t really satisfied with that solution, but it worked the last two months without any problems.
Same problem, but i just want to show another way instead of removing @include blades. On config folder (snappy.php) instead use the first solution you can use this
and it doesn’t require to install wkhtml on windows, just using vendor folder. It worked for me