Look at AcroFields source code. You'll need the pdf reference to understand what's going on.
Paulo > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Develop > Sent: Tuesday, March 06, 2007 4:40 PM > To: itext-questions@lists.sourceforge.net > Subject: [iText-questions] Get information from AcroForms > > Hi, > > I need to get information from acroforms. I need to read an > PDF and identify textfield and buttonfiled. This I can do > following the examples and I can get informations from positions. > But I need get some extra information like rotation, text > color, font name, font size, etc for textfield, and rotation, > etc for buttonfield. > At iTextSharp we have a class named TextField that I think > can be filled with information from a textfiled form, but I > don't know how to do this. > I'm using PdfReader to open the document. > > Here is a peace of the code: > > PdfReader reader = new PdfReader("c:\\temp\\form.pdf"); > AcroFields form = reader.AcroFields; > Hashtable fields = form.Fields; > String key; > foreach (DictionaryEntry de in fields) > { > key = de.Key.ToString(); > switch (form.GetFieldType(key)) > { > case AcroFields.FIELD_TYPE_PUSHBUTTON: > Console.WriteLine("Pushbutton"); > float[] positions2 = form.GetFieldPositions(key); > for (int i = 0; i < positions2.Length; i++) > { > Console.WriteLine(positions2[i].ToString()); > } > //I need more information here > break; > case AcroFields.FIELD_TYPE_TEXT: > Console.WriteLine("Text"); > float[] positions = form.GetFieldPositions(key); > for (int i = 0; i < positions.Length; i++) > { > Console.WriteLine(positions[i].ToString()); > } > //I need more information here > } > } > > > Thanks > > Rodrigo > > __________________________________________________ > Fale com seus amigos de graça com o novo Yahoo! Messenger > http://br.messenger.yahoo.com/ > Aviso Legal: Esta mensagem é destinada exclusivamente ao destinatário. Pode conter informação confidencial ou legalmente protegida. A incorrecta transmissão desta mensagem não significa a perca de confidencialidade. Se esta mensagem for recebida por engano, por favor envie-a de volta para o remetente e apague-a do seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de usar, revelar ou distribuir qualquer parte desta mensagem. Disclaimer: This message is destined exclusively to the intended receiver. It may contain confidential or legally protected information. The incorrect transmission of this message does not mean the loss of its confidentiality. If this message is received by mistake, please send it back to the sender and delete it from your system immediately. It is forbidden to any person who is not the intended receiver to use, distribute or copy any part of this message. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/