First of all, you have to:
1. extract text of pdf to
List<string>
2. use Regex to find emails and ids.
Here is an idea how to extract emails from list of string. See:
C# code to extract Email from text · GitHub[
^]
We have no idea how your pdf looks like. So, we can't help you more.