Unable to read checkbox values from PDF in UiPath

Hello,

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.

Thank you in advance.

@Mykhailo_Nedielkov

Welcome to the community

for pdf forms you dont have an activity..but without reading from ui we can get data using itext7..here is a example to get all fields and values

cheers

1 Like

Can you help me connect this package to UiPath?

@Mykhailo_Nedielkov

go to manage packages and search for it you should be able to find it..make sure no filters are there

cheers

I am getting an error with this method “GetFormFields”

Hi @Mykhailo_Nedielkov

Which version of itext you have installed?

As Anil mentioned, it should be v7

I don’t see version 7 in manage packages.
I installed iText Community.

Can you please show right panel of this screen when you click itextcommunity?

And in the drop downs there, do you not see v 7 or something?

@Mykhailo_Nedielkov

When you click on the version dropdown, is there no else version than 9.2.0?

8.0.1 is the lowest version available. And none of them solve the problem

@Mykhailo_Nedielkov

try this modified code

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()

cheers

You should be using Document Understanding with the UiPath Document OCR activity.

Thank you very much:)

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.