Thank you for contacting Syncfusion Support.
Yes, we do have support for flattening specific fields from
PDF documents. To achieve this, please refer to the example code below.
//Load the PDF document.
PdfLoadedDocument loadedDocument = new
PdfLoadedDocument("input.pdf");
//Get the loaded form.
PdfLoadedForm loadedForm =
loadedDocument.Form;
//Get the field using the index
PdfLoadedField loadedField = loadedForm.Fields[2] as
PdfLoadedField;
if(loadedField!=null)
{
loadedField.Flatten =
true;
}
//Get the field using a field name
loadedForm.Fields.TryGetField("employeesRadioList", out
loadedField);
if (loadedField != null)
{
loadedField.Flatten =
true;
}
MemoryStream memoryStream = new MemoryStream();
//Save the document.
loadedDocument.Save(memoryStream);
//close the document.
loadedDocument.Close(true);
|
Please let us know if you need any further assistance