0

I'am using visual studio 2008. I wants to generate pdf file on button click. I have used

using iTextSharp.text;
using iTextSharp.text.pdf;  

but it shows an error

The type or namespace name iTextSharp could not be found (are you missing a using        directive or an assembly reference?

from searching I have found that , need to add a source assembly (iTextSharp.dll) . How will it possible?

4 Answers 4

1

Edit: This is unneccessarily complicated. As CodeCaster points out in his comment, you can just use NuGet to install iTextSharp. I'd recommend you try that.

You need to download the iTextSharp library: http://sourceforge.net/projects/itextsharp/ and reference that .dll in VS. Your download will be a zip file with multiple other archives in it. From those, chose itextsharp-dll-core.zip and extract it.

Then you go into Visual Studio, right click your project and chose "Add reference...". In the following dialog you select the dll. Now you can use using iTextSharp;.

Sign up to request clarification or add additional context in comments.

Comments

1

You can install it through NuGet.

1 Comment

Okay, that's easier than my approach.
0

You need to download this dll. So download and then add a reference in your project and then you can use the same. Like Right click on the Project > Add Reference >

1) A new window will open and you can add the file.

2) Build and it should work.

Comments

0

Reason for failure:

you did not add ItextSharp.DLL as reference to your project. untill unless you add this dll to you project you can not use the classes from ITextSharp Library.

Solution: you need to download ItextSharp.DLL and Add that dll as reference to your Projet.

Step 1: : Download ItextSharp.DLL from below Link. http://sourceforge.net/projects/itextsharp/

Step 2: right click on Project Select -> Add Reference

Step 3: Select ItextSharp.Dll from your downloaded location.

Step 4: Now Rebuild the project.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.