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

Free Support Forum - aspose.com

Form.Flatten raises out of range exception

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);
}
}

Hi Kim,


Thanks
for using our API’s.
<o:p></o:p>

I
have tested the scenario and I am able to notice the same problem. For the sake
of correction, I have logged this problem as PDFNEWNET-40493 in
our issue tracking system. We will further look into the details of this
problem and will keep you updated on the status of correction. Please be
patient and spare us little time. We are sorry for this inconvenience.