We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

PreserveFormFields not working

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();
//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


Thanks for your inquiry. Could you please attach your input Word document here for testing? I will investigate the issue on my side and provide you more information.

Best Regards,

Attached is the generated pdf and the word template


Thanks for your inquiry. The fields in your Word document are MERGEFIELDS but not the FORM FIELDS. I would suggest you please first read the following articles on Form Fields in Aspose.Words:


Best Regards,