This should be possible by integrating a PDF-generating library with your controller that handles the form submission:
- user submits form
- controller calls a PDF library with the user-submitted data
- library returns the PDF (this would probably involve creating a temporary PDF file on the server, e.g. in the
site/logs
orsite/cache
folders) - controller calls Kirby’s email engine to send the message with attachment
There have been earlier threads discussing the generation of PDFs from within Kirby, maybe these are good starting points to find a suitable library for your purposes?