Data output help

Dear friends,

I am in the final stages of an application that I am doing in kodular, I am a beginner, and everything has been going so far so far where I came across the following problem:

The purpose of the application where at the end an email is sent with the data filled in by the users.

I studied the possibility of sending using a php script to generate a PDF file and be sent via email with data. I already have the template of the form that will serve as a template for the PDF at the exit, but it is in DOC format. In the study I saw that this document has to be in HTML and that’s my problem. The conversion tools do not maintain the layout and when I put it in the PHP script, the code does not render the PDF format, always giving errors.

I would like to know if there is another way that I can implement this data output.

Detailed, but what error is occurring? I know you wrote a lot but can do for topics what you want and what is happening? thank you