Never used this package, but changing permissions on the blade file wouldn't do much. I would change permissions on the temp folder it uses, but you would need to look at the source to see where that is...
https://github.com/NitMedia/wkhtml2pdf/blob/master/src/Nitmedia/Wkhtml2pdf/Wkhtml2pdf.php
Line 86
See if that folder exists on your project, if not, create it and set it to 777
I don't see the directory anywhere, should it be in vendor/nitmedia/wkhtml2pdf ? or..?
By the way, when i set debug true i get this:
array(3) {
["input"]=>
string(20) "/tmp/2005083011.html"
["command"]=>
string(177) "/examplendomain.com/vendor/nitmedia/wkhtml2pdf/src/Nitmedia/Wkhtml2pdf/lib/wkhtmltopdf-amd64 --orientation 'Portrait' --page-size 'A4' "/tmp/2005083011.html" -"
["content"]=>
array(3) {
["stdout"]=>
string(0) ""
["stderr"]=>
string(0) ""
["return"]=>
int(11)
}
}
Seems normal to me?
Does the file /tmp/2005083011.html exist? is it generated?
The content array shows stdout as empty, that is your output, that is why you get the error.
My mistake, i thought i found the tmp directory but it was from something else. Where should the directory be ? in my public directory ?? or in the vendor/nitmedia/../ directory?
Well, try in public 1st. if not, then try everywhere :)
No luck, tried both and all the directories underneath
If it doesn't work, maybe try my package, which also uses wkhtml2pdf (through snappy)
Ok, i'll try yours :) thanks
By the way, i don't know if it's usefull information, but the package has worked on a development environment, moved it to production and then it didn't work anymore. (2 different servers, though same os configuration)
barryvdh said:
If it doesn't work, maybe try my package, which also uses wkhtml2pdf (through snappy)
Used your package, worked great on my develop environment, but on the production environment it keeps throwing an exception " Class 'Barryvdh\DomPDF\ServiceProvider' not found "
Did a composer update after adding the package in composer.json and have added the service provider in the app.php file. (same goes for the alianse)
What did i miss .. ? :/
Ehh, not sure. There shouldn't be a reference for DomPDF in Snappy, or are you using https://github.com/barryvdh/laravel-dompdf ?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community