I'm not getting any errors, the problem I'm having is because the submission button is part of the custom HTML then the code behind that creates the PDF only runs for the first instance of the web part that is on the page.
I can't find a way to set up a button submit handler out of the custom HTML, so I'm fishing for ideas to do this in a completely different way.
I'll try and show what the page looks like below, I have code already that can load up the PDF form and insert field values from the request object:
==== Web part instance 1====
Textfield1
Textfield2
Download PDF button 1
==== Web part instance 2====
Textfield3
Textfield4
Textfield5
Download PDF button 2