Read PDF Text: Unexpected PDF structure. This exception usually indicates that PDF document is malformed but also may indicate a bug in Docotic.Pdf library

Hi, I’ve automated a process that will read some PDF files and later on, extract some of these information. However, I ran into this error. I’ve tried reinstalling and updating the UiPath.PDF.Activities package but the same error is still shown. How do I solve this?

@aly

May I know what version of PDF package are you using here ? If you are using older version of package then update it to latest version.

If still it didn’t work then create fresh project and install UiPath.PDF.Activities package only and then check it once.

@aly

  1. There is a different file format in the directory where you are getting in a variable “FilePath” .
  2. Please check if any file other than PDF.
  3. “Read PDF Text” activity is only to read PDF files.

Please run this xaml at your end and you will get to know
ReadPDF.zip (1.4 MB)

This is a known issue. The file is not fetched properly from source

The PDF file you are accessing is fetched from any SFTP connection? If yes, make sure you use the transfer encoding as binary.