Extract data from pdf with multiple combination

Hi Everyone,

I have a pdf which contains address. (Attached here)

The pdf is in a way where I have country on top, address below to it. And country on top, address right to it. The pdf contains the combination of both the cases.

In such case, how to search and fetch the address based on key(country here).

Also to add that address might be three liner or two liner.

Kindly let me know your view/solution on this.

The solution would depend on the pdf format, if it can be read as text or not etc…