cancel
Showing results for 
Search instead for 
Did you mean: 

Extract Data from PDF using itextSharp library

Naga_MounikaGel
Level 3
I am trying to extract data from PDF file using code stage c#. I referred the link: https://www.codeproject.com/Articles/14170/Extract-Text-from-PDF-in-C-NET I designed my code and initialize using this link. But I get following error when tried to run the code. Error: Internal : Could not execute code stage because exception thrown by code stage: Could not load file or assembly 'itextsharp, Version=3.0.10.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. Can you please tell me the reason for this error or any other procedure(or code) to extract data from PDF file using code stage. Thanks in advance.
6 REPLIES 6

FredrikAdland
Level 4
Hi, I think I had the same error when I used iTextSharp earlier. I think you need an older version of a dll file. Not sure which, and I have deleted the objects that used it. However, I strongly recommend using XPDF. It has better formatting (in many cases) and is free for commercial use (iTextSharp isn't). More information at my post on: https://portal.blueprism.com/forums/general-discussion/ideas-enhancemen…

Denis__Dennehy
Level 15
Interesting finding Fredrik - where you needed to use an earlier version of a dll - I wonder if that is related to the version of .NET that Blue Prism uses?  v.4.2 used .NET2, v5 used .NET4, v6 uses the latest .NET4.5.?  - it could be that to be compatible/usable in an earlier version of .NET you needed to use an earlier version of the dll??

Denis__Dennehy
Level 15
Interesting finding Fredrik - where you needed to use an earlier version of a dll - I wonder if that is related to the version of .NET that Blue Prism uses?  v.4.2 used .NET2, v5 used .NET4, v6 uses the latest .NET4.5.?  - it could be that to be compatible/usable in an earlier version of .NET you needed to use an earlier version of the dll??

Naga_MounikaGel
Level 3
Thank you @Fredrik This works cool.. 🙂

@Denis,   I've encountered a similar issue using the latest version of iTextSharp upon checking online I've found sources suggesting it does work with 3.5 however I've not managed to get it working with in 6.2; I'll give XPDF a look though.

I was also facing similar issue, i am using BP6.4 and ItextSharp version 5.5. i just restarted BluePrism and issue got resolved, sounds very weird but if this saves 4-5 hours of your time, it is worth trying.

------------------------------
Ishan Mahajan
India
------------------------------