IText in Asp.net MVC

I want to use iText to write data to pdf.

Collected, which I added,

  • iTextdotNET.dll
  • Gnu.Classpath.Core.dll

But the problem I am facing is

  • Error 1 The type "java.io.OutputStream" is defined in an assembly that is not referenced. You should add assembly reference 'vjslib, Version = 1.0.5000.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a'.
  • Error 2 The type "java.io.Serializable" is defined in an assembly that is not referenced. You should add assembly reference 'vjslib, Version = 1.0.5000.0, Culture = neutral, PublicKeyToken = b03f5f7f11d50a3a'.

I got it: this requires j #.

Now what to do?

+1


a source to share


5 answers


The new .NET versions of iText ahve are just one DLL called itextsharp.dll, no J # library dependencies or anything like that.



BTW If you're doing something non-trivial, find the mailing list and order the book now (the book goes deep but remains available)

+1


a source


There are (at least) two .NET ports for iText. It looks like you have iText.NET . Grab the latest version of iTextSharp and your dependency worries should be done.



+2


a source


I would suggest using iTextSharp rather than iText.Net. iText.Net hasn't been updated for quite a while, while ITextSharp is relatively modern and works seamlessly with newer versions of the .NET Framework.

+1


a source


Which version of the framework is your targeting for the project? It looks like it is trying to use the .NET 1.1 versions of the libraries.

0


a source


That gnu.classpath.core.dll is part of IKVM, right? You don't need this unless you want to use the Java version of iText. (and if you do, install the JRE and set the path to it correctly). You are trying to use the .Net version, so remove that link and see if it doesn't work.

0


a source







All Articles