Read PDF with OCR' activity: No valid input file/image specified – InvalidInputImage

I’m facing an issue with the ‘Read PDF with OCR’ activity. The error says: ‘No valid input file/image specified – InvalidInputImage.’ I’ve confirmed that the file exists and selected it using the file explorer within the activity. The same file works fine with the ‘Read PDF Text’ activity but fails when using any OCR engine. I’ve tried reinstalling packages, restarting the project and creating the new project, and checking the image format in the properties panel, but the error persists. Could someone help me troubleshoot this?

That means it’s a native PDF (ie the contents are text like when you save a Word document to PDF) and not an image (ie a scan). If the Read PDF Text activity works, then use that. You don’t need OCR unless it’s a scan. Since the PDF isn’t a scanned image, that’s why you’re getting an error that there’s no valid input image.

I’m using the below attached content, which is saved in pdf format, but selected area is a scanned image.
No OCR activity is working to extract the data present in the image.

Hi @veeramuthu_p

Ensure you have pdf activities dependency and ocr dependency installed.

UiPath.PDF.Activities and UiPath.OCR.Activities

Also, Can you try below things

  1. use read pdf with ocr activity to read any other scanned pdf and see if that works. If it does, problem is your pdf.

  2. try using other ocr engines to read this pdf and see if this works.

  3. try specifying the range property to ocr specific page and see if it works.