How to replicate uipath explorer in c# code at bot run time?

HI,
I need to scrape the select text attribute values from pdf file when the bot selects any text at run time, I cant use uipath explorer at run time, so I thought of running any vb or c# script to get the attribute values for selected text from pdf file(replicating the uiexplorer function). Is anyone knows please help me to find solution for this