N
N
Northern Lights2020-02-28 13:25:05
Laravel
Northern Lights, 2020-02-28 13:25:05

Best solution for PDF/Word generation under Laravel?

Tell me good PHP vendors or Laravel-specific solutions that you yourself use to generate PDF and Word.

Thanks!!!

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Maxim, 2020-02-28
@Tomio

knp-snappy is an excellent vendor for generating PDF both from html and from a specified URL, with all styles, links, pictures, etc. preserved. The only thing I noticed is that it does not understand the css style display: flex =) Everything else is great . You can output to a file, instantly download, and render to the screen.

A
Alexey Tutubalin, 2020-02-28
@Kennius

PHPWORD generation based on template

A
Artem, 2020-02-28
@arteezy

https://mpdf.github.io/
I used this. It was necessary to generate a calendar for booking rooms. Perfect for PDF

D
Dmitry, 2020-03-06
@dlnsk

If you need Word, then just save the html with the styles embedded in the document (there is an opportunity to start a paragraph from a new page) with the .doc extension
. Word opens it perfectly.
PDF is more difficult. I am using laravel-dompdf. Generally ok, but expected problem - rotated 90 degrees. text (you need to specify the height of the object).
In fact, it all depends on the task. Ask yourself (the customer): do you really need export? The fact is that on Win10 (well, in Linux for a very long time) a standard printer appeared in PDF. You can print from any application. Therefore, if it fits within the scope of the task, then you can simply generate the page and automatically open the print dialog.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question