When I do a mail merge and than save the resulting document to pdf and set PreserveFormFields to true. The form fields that weren’t mail merged did not appearing in the pdf as editable fields.
MemoryStream resultStream = new MemoryStream();
try
{
//The data is merged with the fields
doc.MailMerge.CleanupOptions = MailMergeCleanupOptions.RemoveContainingFields;
doc.MailMerge.Execute(keysArray, valuesArray);
PdfSaveOptions options = new PdfSaveOptions();
options.SaveFormat = SaveFormat.Pdf;
options.PreserveFormFields = true;
doc.Save(resultStream, options);
Thank you
Attached is the generated pdf and the word template
Hi,