Microsoft OCR and PDF Merge - The process cannot access the file pdf

Hey All,

I’m facing an issue with a process at the moment where I am merging together several PDFs to create a final PDF. During the process some PDFs are created via word, some are generated by a system, and some are downloaded by a web application.

It is a requirement that the PDF generated by a system is read for specific information and used later on in the process. For this we are utilizing Microsoft OCR. After this read is done we are merging all three document together. This is where the process fails and we receive the following “System exception.The process cannot access the file ‘…pdf’ because it is being used by another process.”

I’ve attempted to use a Kill Process activity after all PDF creations, reads, and moves in the workflow via killing “AcroRd32” with no prevail. I now think the issue is related to the file getting hungup in with the Microsoft OCR activity.

Does anyone know what Windows Process the Microsoft OCR activity uses? If not, does anyone know a way to wait/kill this?

Hi,

Why are you using Microsoft OCR to read a PDF document ? If it is a basic PDF, simply use UiPath.PDF.Activities. Moreover, with this package, you have the “Read PDF with OCR” activity, which will maybe solve your issue. Otherwise, my suggestion would be to create a copy of this file that you delete after reading, or put a delay.

Good luck,

1 Like

This process was built so long ago I didn’t even think of that.

Thanks for the tip!

You’re welcome! With the simple “Read PDF” activity, if won’t open your PDF file and you won’t have this issue anymore.

Happy automation!

1 Like