Page 1 of 1

JavaScript Warning on Fillable Form

Posted: Mon Aug 09, 2021 5:56 pm
by tplambeck
I recently implemented logic to use interactive forms in one of my applications. It works great but on some forms I open I get a pop up message entitled JavaScript Warning and this message: "The PDF file requires a newer version of Adobe Reader. Press OK to download the latest version or see your system administrator."

Running the most current version of Acrobat so not sure why this happens. Anyway to suppress the pop up? Using version 9.0.0.21 of Imaging and 6.0.0.21 of PDF libraries.

Thanks!

Re: JavaScript Warning on Fillable Form

Posted: Tue Aug 10, 2021 8:47 am
by Alex
Hello,

In most cases this message means that you have PDF XFA document. XFA was deprecated in PDF 2.0 and VintaSoft Imaging .NET SDK does not support PDF XFA documents.

Here is code that allows to determine whether PDF document has XFA form:

Code: Select all

public static bool IsPdfDocumentWithXfaForm(Vintasoft.Imaging.Pdf.PdfDocument pdfDocument)
{
    if (pdfDocument.InteractiveForm != null)
    {
        if (pdfDocument.InteractiveForm.XFAResource != null || pdfDocument.InteractiveForm.XFAResources != null)
            return true;
    }
    return false;
}
Best regards, Alexander