Attempting to flatten the attached PDF with several radio buttons raises an out of range exception. This occurs after upgrading to Aspose.PDF 11.4.
If the form has a single radio button, no error is raised.
Sample code:
public void FlattenFields(string filePath)
{
using (var doc = new Document(filePath))
{
doc.Form.Flatten();
var newName = Path.Combine(Path.GetDirectoryName(filePath),
Path.GetFileNameWithoutExtension(filePath) + “-NEW.pdf”);
doc.Save(newName);
}
}