Hi team,
We are trying to check whether the uploaded pdf document is XFA or not. We added the condition like below in order to achieve this. This code is not allowing other editable documents also to upload. Our requirement is to not allow only XFA documents but this is not accepting other editable documents also. Can you please help us on this.
using (PDF.Document document = new PDF.Document(new MemoryStream(insertDocumentDetails.Data)))
{
// Check for XFA format and throw an exception if found
if (document.Form.XFA != null)
{
return new JsonResult("XFA");
}
}