Runtime Execution Error: Unexpected PDF structure - Exception Type: BitMiracle.Docotic.pdf.UnexpectedStructureException

Hi there,
I hope that there are some helpers here. I automated a process that will read several pdf files from a folder and extract several data. As I developed the process locally it worked just fine. Via Orchestrator I published the process to our users and changed the path of the pdf files to a file share network where our users will work with in the future. This also worked just fine.
On the next day, there was this Error Message “Unexpected PDF Structure - Exception Type: BitMiracle.Docotic.pdf.UnexpectedStructureException” See the picture below. UnexpectedStructureException

As I tried to fix this problem I realized that the robot runs perfectly locally and can read the PDF files. And I ensured that the pdf files are not damaged or anything, they were also fine. The robot just have this problem to read the pdf file from the file share network.
I wondered why this problem didn’t occurre on the release day where I talked and show the users how to use the UiPath Assistant but on the next day. The file share network wasn’t undergoing any changes so that’s not the problem…
Is there any setting I could check or has anyone an idea what the problem could be on this matter? I hope that someone can help me.
Thanks in advance.
Regards,
Melanie

Hi @melanie.p

From your description, the file share network could have caused the issue. Please consider adding Copy File activity before Read PDF activity. Copy file from file share network and Read PDF locally.

Example:

  1. Copy File from file share network to static folder\filename with overwrite enabled
  2. Read PDF on the static folder\filename

The static folder\filename purpose is to read the same file from same folder that Copy File activity have replaced/overwritten. This ensures that Read Pdf does not failed if Copy File is successful.

Hi @GreenTea
thanks a lot for answering. I looked into it a bit more because Copy File Activity was not an option, because many users in the department will use it and its kinda “unsexy” to copy it to everyones local path to use the process.
I found out that there was a hidden file named Thumbs.db in the folder which was the first file that would be read. I now did configure the Directory.GetFiles() to get just PDF or Word Files, so the Thumb.db will be ignored. The process is now working again :slight_smile:

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.