This solution will create a PDF file from a Google Form submission using a Google Doc as a template. You can also use a Google Spreadsheet or a Slide as a template with just a few simple modifications.
Get the script here: https://howtogapps.com/google-form-to-pdf-save-to-drive-and-or-send-it-in-email/
Similar to this, I have also created a Google Form script to create a new Google Slide presentation from a slide template and save it to PDF or send it in an email. You can find the post here: Google Form to Slides + Save to Drive and/or send it in email as a PDF