Generating PDF in Nette. Which library?

před 4 dny

olivedev
Člen | 2
+
0
-

I want to create the output of the transaction receipt on my app in PDF format. For that I intend to use a library instead of creating a script or using a premade script. Which PHP PDF library works best with Nette? TcPDF or MPDF

před 4 dny

BuMoRi
Člen | 93
+
0
-

mPF works very well with Nette

před 4 dny

Mabar
Člen | 98
+
+3
-

These libraries are very slow and extremely limited. Generated HTML is usually different from what you see in browser and modern things like flexbox or even floats are buggy or not working at all. So you are stuck with table layouts.
What I would suggest is headless chrome. Pretty good is nodejs pupeteer or if you cannot run your own instance then service like browserless https://www.browserless.io