Hi guys,
I am using MyEclipse....I have even import the itext.jar file to my project folder....still I am getting error in my java code....

Error in resolving
import com.lowagie.text.html.*;
import com.lowagie.text.pdf.*;

Can anyone help me.............

Recommended Answers

All 6 Replies

"project properties"
"build path"

"project properties"
"build path"

tried doing that also.....

Only import com.lowagie.text.*;
and import com.lowagie.text.rtf.*;
are getting RESOLVED

Errors still remains for html and pdf formats
import com.lowagie.text.html.*;
import com.lowagie.text.pdf.*;

Then check that those packages are actually there. Check that the classes you're attempting to call are actually in those packages, and check that everything is spelled right.

If all those classes are suppossed to be in that jar, and they are in that jar, and you are using the right classes (with full package), and they are not mispelled, then they will be found. The compiler does not pick and choose which packages from a jar to include, and which not. So, if the jar exists, and contains the things you are trying to use, then the problem is yours. Either mispelling, wrong package for the class, or the jar not properly included on the class path (i.e. build path in this case).

Then check that those packages are actually there. Check that the classes you're attempting to call are actually in those packages, and check that everything is spelled right.

If all those classes are suppossed to be in that jar, and they are in that jar, and you are using the right classes (with full package), and they are not mispelled, then they will be found. The compiler does not pick and choose which packages from a jar to include, and which not. So, if the jar exists, and contains the things you are trying to use, then the problem is yours. Either mispelling, wrong package for the class, or the jar not properly included on the class path (i.e. build path in this case).

Thanks for that quick reply................

I tried searching the for the PdfWriter and HtmlWriter classes but was shocked to see that they are not present in the jar which I imported. There is no class in the jar as com.lowagie.text.pdf.*;...I found the com.lowagie.text.rtf.*;

Then maybe you should download a newer version of iText.

Thanks a lot!I have been confused by this problem for a long time!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.