Im trying to read pdf using Read Pdf text functionality,
So I need to extract the line just below the word “Employee Verification”. … that is Not applicable or whatever that is present below the word Employee Verification …below is the sample pdf format from which the data has to be extracted. Can anyone help on this?
Level of Check Client Level Colour Code GREEN
FINAL BACKGROUND REPORT
Executive Summary
Education Verification
Bachelor of Science Verified Employment Verification Not Applicable
Criminal Verification
Bangalore (Police) No record
Anantapur (Police) No record
Database Checks
India-specific Database Checks Not Applicable
Global Database Checks Not Applicable
Major Discrepancy Clear Report
assign the output from read pdf to a string variable (str_extractedData)
str_extractedData.SubString(str_extractedData.Indexof(“Employment Verification”)+23,str_extractedData.Indexof(“Criminal Verification”)-str_extractedData.Indexof(“Employment Verification”)-23)
When I tried the same it says Index out of range, May be cos my text extracted from pdf contains more lines than the one which I have supplied above, the above one was just a sample, but the actual pdf is much more longer…but the data I want lies between employment verification and criminal verification
Please go through this code, this may give you better understanding. It’s not necessary to generate Data table and you have taken line by line and applying substring where in each row you will be getting
based on condition you are applying sub string function on 6. Employment Verification and Criminal Verification that was the reason you are getting error.
here is the modified code and it should work for you.