Run time execution error - read pdf, bitmiracle, pdf malformed or docotic

Main.xaml (51.8 KB) project.json (859 Bytes) Run time execution error, Source: Read pdf text, Message: unexpected PDF structure. This exception usually indicates that PDF document is malformed but may also indicate a bug in the docotic.pdf library. Please send us file for review., Exception Type: Bitmiracle.docotic.pdf.unexpectedstrucureexception?

What is this error? Is there any workaround for this? Please help it ran fine once and then this horror pops up every time thereafter.


RemoteException wrapping BitMiracle.Docotic.Pdf.UnexpectedStructureException: Unexpected PDF structure. This exception usually indicates that PDF document is malformed but also may indicate a bug in Docotic.Pdf library. Please send us a file for review.

{ at .()
at .()
at .Parse(IPdfStreamProvider streamProvider, String password, Boolean forAppendOnly)
at .(Stream , String )
at .(String , String )
at .(String )
at BitMiracle.Docotic.Pdf.PdfDocument.Open(String fileName)
at BitMiracle.Docotic.Pdf.PdfDocument…ctor(String fileName)
at UiPath.PDF.PdfReader…ctor(String filePath, String password)
at UiPath.PDF.Activities.ReadPDFText.GetFileReader(String fileName, String password)
at UiPath.PDF.Activities.ReadTextFileActivity.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)}

Would someone please tell me what to do here? I’m really stumped and at a loss, all I wanted to do was extract the OrderID from the PDF file? why is this so difficult?


here is the pdf : Status_Request.pdf (109.1 KB)

I don’t think it’s an issue with PDF file. I can read the PDF file without issues. Try reinstalling / updating the PDF activities using “Manage Packages”.

I am running UiPath.PDF.Activities version 2.0.1

@karavinds hi I may have ticked an irrelevant pdf package by accident and this is why it started throwing out this exception. But I am trying on different workflow now and it seems to be working. I tried reinstalling and/or updating but I get this error:

Hello, i have the same error:
RemoteException wrapping System.Exception: An unexpected error has occurred: This build of Docotic.Pdf library requires maintenance through 22 December 2018.Your license includes maintenance through 14 June 2017. Please update your license at http://bitmiracle.com/purchase.aspx

Anybody knows how to solve this?

1 Like

Hi @Luis_Martirena, ensure that you are only running UiPath.PDF.Activities version 2.1.0 as mentioned by @karavinds.

Hello Taariq,

yes, I have version 2.1.0 installed, but I still receive the error.


Am I the only one receiving this error? :confounded:

Hi Luis no you’re not the only one :slightly_frowning_face: A few of my colleagues installed some custom pdf packages for the purposes of a case study and the workflow executed fine for a day, then the next day it returned the same error and would not run. Unfortunately the only way to get your workflow to run again would be to migrate it to a new file and ensure you only have the “UIPath.PDF.Activities” package installed this time round. Also do not copy and paste the activities of the workflow as it seems the error pops up again.

Hello Taariq, you were right! It is working now! I started a new project, with no pdf tools installed. I installed only the “UIPath.PDF.Activities” package, didn’t paste the activities and it works!
Now I have another error, an Unsupported file type in the Machine Learning Extractor, but that’s another story. THANK YOU VERY MUCH!!!

You’re welcome @Luis_Martirena: :grinning: Bummer on the error.

Hey @karavinds @Luis_Martirena @loginerror @Cosin @arivu96
@Dominic

i am also facing the same error .
can u please tell me how did u resolve that error.
please have a look at screenshot

Thanks

Hello @niteshbutola5,
Have you tried the workaround @Taariq suggested? Looks like creating a new project with UiPath PDF activity resolved this issue.

1 Like

Hello @niteshbutola5, I solved with the solution of Taariq:

1 Like

@Luis_Martirena @karavinds

Thnks for concern
yes i got the solution by reinstalling the pdf package .
now its working fine.

Thanks again

Hi, i resolve this issue changing file AllDependencies.json and delete all reference to “BitMiracle Docotic Pdf”.

1 Like

@Luis_Martirena
Hi Luis_Martirena,
Did you fixed the Machine Learning Extractor Error, Because i too have the same issue. I want to add machine learning extractor activity with “Api key” and “End point” properties. the old one does not have “Api key” Property. It works only on the updated Machine learning extractor. If i try to update it , the bot throws error at the digitize document property. Can you help me to solve this error?
Thanks in advance!!!

Hello @BALA_SHANKAR , please see Taariqs’ response above for the solution.

@Taariq please upgrade to the latest PDF version, this issue should go away. Please ensure you do the same for the IntelligentOCR package (if you use it) and the beta MachineLearningPackage (if you use it).
THanks!

@Luis_Martirena please upgrade to latest PDF, IntelligentOCR (if used) and MachineLearningExtractor (if used) versions, error should disappear. Thanks!

Hi @Taariq

This is because the Pdf file you are selecting creates a thumbnail form and the read pdf activity automatically taking the thumbnail file and so it is throwing the error. Please enusre that file location should not be at the thumbnail form of file.

Thanks