I have a pdf and it has multiple checkbox option, one of them would be checked, i need to extract the correct option which is checked in checkbox and extract them as excel

Hi @Ayesha_Ijaz

Read the PDF Document

  1. Use the Read PDF Text Activity:
  • Drag and drop the Read PDF Text activity into your workflow.
  • Set the FileName property to the path of your PDF.
  • The activity will output the text content of the PDF.
  1. Extract Text Data:
  • Store the output in a variable, for example, pdfText.

Process the Extracted Text

  1. Use the Assign Activity:
  • Create an Assign activity to process and filter the pdfText variable.
  • Define a regex pattern to identify checked options. For instance, if the checked options are indicated by a specific string like “✓” or “Checked”, use a regex pattern like “Checked”. Adjust based on how the checkboxes are represented.

checkedOptions = System.Text.RegularExpressions.Regex.Matches(pdfText, “CheckedPattern”).Cast(Of System.Text.RegularExpressions.Match).Select(Function(m) m.Value).ToList()

Replace "CheckedPattern" with your actual pattern.

  • Checkbox is Checked:

  • Text: “Checkbox: Checked”

  • Regex Pattern: Checkbox:\s*Checked

  • Checkbox is Unchecked:

  • Text: “Checkbox: Unchecked”

  • Regex Pattern: Checkbox:\s*Unchecked

Thanks,
:grinning: