How do I use DOMPDF in Laravel 4 in conjunction with a BLADE view?

Asked

Viewed 1,006 times

2

I need to generate PDF report in Laravel 4. I have found several alternatives and I am in doubt about which best option:

  • DOMPDF (alternate link)
    It seems very easy to use, since it’s our good old HTML plus CSS, but I don’t understand how I’m going to do the header/footer and break page.

  • FPDF
    I know for some time, but you have to write enough to be able to generate PDF.

  • TCPDF
    I know nothing of this version.

Question: how to use DOMPDF/Laravel to render a view via BLADE? Or would it be simpler to use one of the two other libraries above?

  • 2

    Welcome helderam. Is there a way for you to edit your question to make it more suitable for a Q&A site? We need questions that generate objective answers. We are not a discussion forum on a subject. The subject is no problem, but the information provided will end up being opinions. I think you can save the issue if you get objectivity in what you need.

  • As it was not a doubt but a discussion: My suggestion is: https://github.com/barryvdh/laravel-snappy

  • Thanks for the recommendations. I tried to adjust to stay according to the rules. Please if it is not yet good, let me know that I will try to improve more ok ?.

  • Guys, I studied a lot and chose to stay with the FPDF even though I already knew it. Give a little more work but it is perfect the result and Voce has TOTAL AND FINE control over the generated PDF. Thank you for everyone’s attention...

1 answer

1


Helderam, the FPDF Package is actually the Facade that provides the FPDF within the Laravel 4 application.

Headers and footers can be configured using the same methods as the FPDF alone.

I recommend playing a little with the documentation of each Library (not the documentation of the Package) and see in which you are most comfortable

Browser other questions tagged

You are not signed in. Login or sign up in order to post.