Support the ongoing development of Laravel.io →
posted 9 years ago
Packages
Last updated 1 year ago.
0

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...

Last updated 1 year ago.
0

I have no idea where to look ?

Last updated 1 year ago.
0

https://github.com/NitMedia/wkhtml2pdf/blob/master/src/Nitmedi...

Line 86

See if that folder exists on your project, if not, create it and set it to 777

Last updated 1 year ago.
0

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?

Last updated 1 year ago.
0

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.

Last updated 1 year ago.
0

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?

Last updated 1 year ago.
0

Well, try in public 1st. if not, then try everywhere :)

Last updated 1 year ago.
0

No luck, tried both and all the directories underneath

Last updated 1 year ago.
0

If it doesn't work, maybe try my package, which also uses wkhtml2pdf (through snappy)

Last updated 1 year ago.
0

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)

Last updated 1 year ago.
0

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 .. ? :/

Last updated 1 year ago.
0

Still open for suggestions/idea's ^^

Last updated 1 year ago.
0

Ehh, not sure. There shouldn't be a reference for DomPDF in Snappy, or are you using https://github.com/barryvdh/laravel-dompdf ?

Last updated 1 year ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

lorienhd lorienhd Joined 20 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.