Nikhil Agrawal
Nikhil Agrawal

Reputation: 285

html to pdf conversion in laravel 4

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

Upvotes: 1

Views: 10394

Answers (3)

George D.
George D.

Reputation: 1650

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"

Upvotes: 3

David Marko
David Marko

Reputation: 2519

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

Upvotes: 2

Imran
Imran

Reputation: 386

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

Upvotes: 5

Related Questions