BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
private bool IsXFADocument(string filePath)
{
bool isXfa = false;
PdfLoadedXfaDocument loadedDocument = new PdfLoadedXfaDocument(filePath);
//Get the loaded XFA form.
PdfLoadedXfaForm loadedForm = loadedDocument.XfaForm;
int count = loadedForm.Fields.Count;
loadedDocument.Close();
//If the loaded field count is greater than zero then its a XFA document.
if (count > 0)
isXfa = true;
return isXfa;
} |