I use this code to create pdf files as soon as a client fills the form:
function After_Submit(e){ const info = e.namedValues; Create_PDF(info);