Look in the community board. Link is in the bottom oft the page. There is a thread with an example. Ah I see. The better thread is in the german part here https://community.rei3.de/d/220-pdf-aus-formulardatensatz-erstellen
I hope with translation it is usable.
This one is even better and in english: https://community.rei3.de/d/120-generate-dynamic-htmlpdf