Example of submitting a form and creating a PDF of the form itself?

Does anybody have an example of creating a New-UDForm, filling in some data and outputting the form to a pdf when you submit the form? Any guidance would be much appreciated!

Thank you!

Product: PowerShell Universal
Version: 1.4.6

I haven’t tested this but I’ve used the WritePDF module to create PDFs with PS before.

You could use it in a form like this.

New-UDForm -Content {
   New-UDTextbox -Id 'txtField' -Label 'Enter Some Text'
} -OnSubmit {
New-PDF {
    New-PDFText -Text $EventData.txtField -Font HELVETICA, TIMES_ITALIC -FontColor GRAY, BLUE -FontBold $true, $false, $true
} -FilePath "Example01_Simple.pdf" 
}

Thanks! I’ll test and let you know.

I am stumbling across this now 3 years later looking to solve the same problem.

@ryan.d did this ever work for you?