1

I am using laravel 4 and having problem with html to pdf conversion.

I have a method download, when this method is called based upon the parameter passed i call some other methods(e.g download1() method). This method(download1() method) returns the View::make('temp'). Now i want to convert this into pdf and show a download prompt.

I tried using several library but not able to convert it into pdf. Please if anyone have used it before help me.

FYI i am using ubuntu box .

Thanks in advance. Nikhil

Nikhil Agrawal
  • 285
  • 1
  • 3
  • 12

3 Answers3

5

Take a look at this package, you gonna like it. https://github.com/thujohn/pdf-l4

Imran
  • 316
  • 3
  • 6
3

I was stuck hard with this one as well. My HTML views are full of Non Latin characters (Greek) characters, and I had many many problems with dompdf solutions with encoding and CSS rules. So I tried this one wkhtml2pdf and just worked out of the box! Not even one problem. I don't know if its really the best, its sure is in my case though :-)

There is an interesting discussion about this (PDF in laravel) in linkein as well. Take a look here "What is the Best HTML to PDF converter for Laravel 4"

George D.
  • 1,630
  • 4
  • 23
  • 41
2

I'm using this https://github.com/barryvdh/laravel-dompdf successfully ... can recommend ...

David Marko
  • 2,477
  • 3
  • 27
  • 58