I have PDF that contains multiple checkboxes.
When I use the standard UiPath PDF activities (Read PDF Text, OCR, etc.), the “checked” state of these boxes is not detected.
Could you please advise:
Is there an official activity to read PDF form fields (checkboxes, text fields, etc.)?
Any example workflow or best practices would be appreciated.
Dim pdfDocument As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader("PDFFilePath"))
Dim form As iText.Forms.PdfAcroForm = iText.Forms.PdfAcroForm.GetAcroForm(pdfDocument, True)
Dim fields As IDictionary(Of String, iText.Forms.Fields.PdfFormField) = form.GetAllFormFields()
For Each fieldName As String In fields.Keys
Dim field As iText.Forms.Fields.PdfFormField = fields(fieldName)
Dim value As String = field.GetValueAsString()
Console.WriteLine("Field name: " & fieldName & ", value: " & value)
Next
pdfDocument.Close()