Creating dictionary from PDF

I have a PDF form with large number of question and their answer. i need to extract these answer and fill an online form. The format of the questionnaire will always be more or less same with exception of few questions.

As the number of questions are too many, is there a way I can create a dictionary(like in case of excel file).
Any help appreciated.

you can create a variable of that type like this:
and for the value, you will need like this: New Dictionary(Of String, String)


But to create the key and value of that, I will have to regex for each answer. But the number of questions are way too many to create that.

Dictonary will be only one… to add each questions and answer, you can use AddToDictionary activity that is present after you install the package: Microsoft.Activities.Extensions.

Sorry, I didn’t explain very well perhaps. So if the the number of questions are above 100, I will have to do a redundant task of adding that number of AddToDictionary. Also as there no set numbers and the questions changes as well, i can not figure out how I will extract the answer(If am using regex am doing it 100s of times.
I am just wondering if there is an easier ways.
Thanks for the help.

well your regex should return all questions and you would have just one AddToDictionary Activity inside a loop out of the Matches activity…

That sounds very promising. Will it be possible for you share an example if you have come across similar that will be very very helpful. Thanks a million.

i thought you already had the part that extract the questions and answers finished, but without having a pdf like yours, will be hard to tell…

No no am sorry, i don’t have that. I know how can i get answer to one specific question but a regex which will grab me all the answer to the questions is what I need. i wasn’t even aware that that can be done.