PDF data reading and extraction

Hi all,

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

@shreyaank

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)

Hope this May give you output.

Regards,
Pathrudu

Hi Pathrudu,
I tried this:

Text.ToString.SubString(Text.ToString.IndexOf(“Employment Verification”)+23,Text.ToString.IndexOf(“Criminal Verification”)-Text.ToString.IndexOf(“Employment Verification”)-23)

below is the error

with the same code i could able to extract the information required for me…

here is the workflow i have

test.xaml (6.0 KB)

regards,
Pathrudu

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

Any other way to get the required text??

Do you have any more fields with same name? if not it should work though it has longer data.

reference.xaml (29.3 KB)

No there is just one field of both employment verification and criminal verification

can you please review my code?

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.

reference.xaml (19.3 KB)

1 Like

Oh Yes! Thanks man it works perfectly. I have used a similar logic for other fields so thought would use the same to generate this one as well.

1 Like