Read specific content in a closed PDF


I have a requirement please. Could you please suggest a way to fulfil the requirement using UI Path.

  1. Some set of PDFs has been placed in a folder
  2. Each PDF might contain “Insured” on the left hand side of the PDF and the name of the insured on the right hand side of the PDF
  3. UI Path should read the name of the insured based on relative text “Insured” dynamically when PDF is in closed mode. PDF file should not be opened

Please suggest.


If Native PDF, use Read PDF text. Else if scanned image, use Read PDF with OCR. Use Regular expression to extract the details from the output of Read PDF text/Read PDF with OCR

Follow below steps:

  • assign StrngArrryVar = Directory.GetFiles(“folderpath”, “*.pdf”)
  • Then use For each to iterate through each files
  • Under Foreach use Read PDF Text Activity and pass For each item.
  • Read PDF Text Activity returns the string output.
  • Make use of string manipulation to extract required value(indexing,substring,split…etc)
    Reference for Reading Pdf files
    Reference for data extraction
1 Like