When merging, only the widgets are copied but not their fields. This can lead to ArgumentNullException when exporting the document. Implement copying the fields and consider cases which include collision of names of the fields.
Repair the generated document using the following code:
In case of Name collision, you can use the attached project or the attached project to the following feedback item to rename the duplicate fields: Provide a way to rename FormFields.
.pdfDocument.Annotations.Where(annot => annot.Type == AnnotationType.Widget))