views:

480

answers:

5

Hello,

I want to use iText to write data to pdf.

Assembles that I've added are

  1. iTextdotNET.dll
  2. Gnu.Classpath.Core.dll

But the problem that I am facing is

  • Error 1 The type 'java.io.OutputStream' is defined in an assembly that is not referenced. You must add a reference to assembly '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 must add a reference to assembly 'vjslib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.

What I understood is: It requires j#.

Now what to do?

A: 

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

tvanfosson
I am using asp.net MVC. with fw 3.5 sp1
Vikas
+1  A: 

New versions of the .NET version of iText ahve just a single DLL called itextsharp.dll with no dependencies on J# libraries or anything like that.

BTW If you're doing anything non-trivial, look for the mailing list and order the book now (the book goes deep but remains approachable)

Ruben Bartelink
+1  A: 

There are (at least) two .NET ports of iText. It looks like you've got iText.NET. Grab the latest release of iTextSharp and your dependency worries should be over.

stevemegson
+1  A: 

I'd suggest using iTextSharp rather than iText.Net. iText.Net hasn't been updated in quite a while, while ITextSharp is relatively up-to-date and works seamlessly with newer versions of the .Net framework.

tnyfst
A: 

That gnu.classpath.core.dll is part of IKVM, isn't it? You should not need that unless you want to use the Java version of iText. (and if you do, install a JRE and set the path to it correctly) You are trying to use the .Net version, so remove that reference and see if it works.

R Ubben