praveena kandavelu wrote:
> hi,
>  
> I am new to itext.

I don't see why that is relevant.

> I am using jdk1.6, i downloaded the latest itext.jar 2.0.8 , added it to 
> my project, tried an example code. but i am having trouble with the 
> Textfield class.

OK.

> This is the line that is generating the error:
>  
>        com.lowagie.text.pdf.TextField tf = new 
> com.lowagie.text.pdf.TextField(writer, new Rectangle(67, 785, 340, 800), 
> "Who");

You fully qualified TextField. Why?
Did you also import java.awt.*?
If so, that could be the reason because there's also
a java.awt.TextField. But then why don't you fully
qualify Rectangle, because there's a java.awt.Rectangle
and a com.lowagie.text.Rectangle. You need the latter
because there's no constructor with the java.awt.Rectangle
in com.lowagie.text.pdf.TextField.

> I get this error:
>  
> "test.java": cannot find symbol; symbol : constructor 
> TextField(com.lowagie.text.pdf.PdfWriter,java.awt.Rectangle,java.lang.String),
>  
> location: class com.lowagie.text.pdf.TextField at line 362, column 69

Aha, your error message is right. There is no such constructor.
The constructor you need is 
TextField(com.lowagie.text.pdf.PdfWriter,com.lowagie.text.Rectangle,java.lang.String)
not
TextField(com.lowagie.text.pdf.PdfWriter,java.awt.Rectangle,java.lang.String)
Do you see the difference?

> Any help would be appreciated.

Was it really necessary to shout "URGENT"? You would
easily have found the answer yourself if you had done
some effort. This question was completely off-topic on
this iText forum: it was a simple Java issue.

Please understand that many people just discard mails
with "URGENT" as subject, whereas others get angry.
It is considered to be very impolite to claim something
is urgent (after all you are using free software, you
don't have the right to DEMAND assistance).

Moreover I don't believe you. It's not very credible
to let people who are new to iText give an assignment
that involves PDF forms. Especially since your problem
was that trivial (with a very obvious answer) I think
you were just lazy and I hope you'll think twice before
posting another question.

best regards,
Bruno

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to