How to validate the account numbers in pdf file?

@naveen.s

  1. Create a flag and set value to true
  2. read pdf with only 1 page and then use regex to get cif CIF\d{12,14}
  3. Get pdf page count and loop on it and skip the first page…Enumerable.Range(2,Pagecount-1)
  4. Inside that use read pdf
  5. use if condition with pdfvalue.contains(extractedvalueinstep2) on true side do nothing and on false side set a flag to false and end loop
  6. output side use check if flag is true or false…if false then cif is not matching

this helps avoid extra looping if CIF is not present on second sheet itself

cheers

1 Like