On 22/09/2010 18:55, Pura Mihai wrote: > Hello! > > I want to get some fields' values from a PDF. > The PDF has two forms, each with some text fields and a signature field. > If the PDF is not signed, I am able to get the values of the fields. > If the PDF is signed (signature field from the first form) no other > fields are visible. > > The code I use is: > > PdfReader reader = new PdfReader(PDF_File_Name); > foreach (KeyValuePair<string,AcroFields.Item> kvp in > reader.AcroFields.Fields) > { > MessageBox.Show(kvp.Key.ToString()); > } > > What can the problem be?
You are fetching the AcroForm fields, and these only contain the signatures. If you want to get the other fields, you need to fetch the XFA fields: <xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"> <xfa:data><form1><body> <Antet xfa:dataNode="dataGroup"/> <Utilizator> <uti1> <CNP>1830610125791</CNP> <PRENUME>Pura</PRENUME> <NUME>Mihai</NUME> </uti1> <EMAIL>mp...@mta.ro</EMAIL> <uti2> <DataNasterii/> <StatulMembru/> </uti2> </Utilizator> <Confirmare> <NUME2>Mihai</NUME2> <PRENUME2>Pura</PRENUME2> <CNP2>1830610125791</CNP2> <NR_CERTIF/> <DEN_FIRMA/> <DATA_CONFIRMARE/> </Confirmare> </body></form1></xfa:data> </xfa:datasets> -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.itextpdf.com/book/ Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/