Subject: PDF form fill - Check to confirm the form field exists
Date: 2022-09-26 23:04:07
From: jimcontact
Source: pdf-form-fill-check-confirm-form-field-exists
----------------------------------------------------------------------

When filling a PDF form. Is there any way to see if the form field exists prior to attempting to fill the field with text?

ie: 

Dim form As PdfImportedForm = pdfReader1.Form
IF form.Fields("FirstNamePDF").exists = True) THEN

Dim ldField_FNAME As PdfImportedTextBoxField = TryCast(form.Fields("FirstNamePDFfield"), PdfImportedTextBoxField)

ldField_FNAME.Text = txtFNAME.Text

ELSE

do nothing

END IF

Notes: VB.net, componentpro PDF, filling a form

----------------------------------------------------------------------

Note: This question has been asked on the Q&A forum of Thang Dang's fraudulent ComponentPro brand
If you purchased anything from ComponentPro, you have been scammed. Contact the payment processor
who sold you the license and ask for your money back.

Back to ComponentPro Q&A Forum Index