0

I created a custom activity to rotate pdf file using iTextSharp in C#.

But when I add it to UiPath, pass the arguments and run the project it throws an error:

Rotate PDF : Could not load file or assembly 'itextsharp, Version=5.5.13.0, Culture=neutral, PublicKeyToken=8354ae6d2174ddca' or one of its dependencies.

It says it can't find the given file.

Before creating a code for my custom activity I created a project in VS with exactly the same code. It worked fine, with no errors appearing.

What am I doing wrong?

I pass the path in the format of "C:\folder1\folder2\…"

Here's the .nupkg file

MGMKLML
  • 39
  • 6
  • 1
    The name iTextSharp was changed to iText for .NET two years ago. You are using a *maintenance* version of the old iText 5 creating for use by paying customers. iText 5 is no longer supported unless you have a support contract with iText Group. You should use iText 7 instead. Please stop using iText 5; upgrade to iText 7: https://www.nuget.org/packages/itext7/ – Bruno Lowagie Jul 10 '18 at 11:26
  • @BrunoLowagie I uploaded it via Visual Studio, so it automatically uploaded the final version of it. I'm using C#. The problem is solved. I had to add dependency when creating the .nupkg file – MGMKLML Jul 10 '18 at 12:53
  • Well, Visual Studio is wrong. iText Group stopped all further development on iText 5 in favor of iText 7. iText 5.5.13 is a *recent* release of the *old* iText, containing bug fixes that were asked for by paying customers who have a support contract with an iText Software company. The new version is iText 7, with iText 7.1.2 as the most recent release. Please be aware that open source software isn't free of charge. If you distribute iText in a closed source context, buying a commercial license is necessary. – Bruno Lowagie Jul 10 '18 at 14:52
  • @BrunoLowagie, thank you for the information. But what if I stick to iTextSharp and what if I would develop an app and use some classes from iTextSharp? Do I have to pay for the license? – MGMKLML Jul 10 '18 at 14:59
  • Yes, the open source license of iText 5 (what you call iTextSharp) is the AGPL. iText 7 has the exact same license. You can use iText 5 and iText 7 for free as long as you distribute your own applications for free using the AGPL license. The moment you close your source code (e.g. you sell a closed source license of your app to a customer), you have to pay for a license (no matter how many classes you are using). See http://lowagie.com/osi2016 for the full explanation. – Bruno Lowagie Jul 10 '18 at 16:07

0 Answers0