Hi

I am trying to extract the field information from the attached file, but I
am not getting any value from AcroFields. I am using below code,

try
            {
                string fileContent = "";    
                PdfReader pr = new PdfReader(iFile);
                FileStream fs = new FileStream("tmp_File.pdf",
FileMode.CreateNew, FileAccess.ReadWrite);
                PdfStamper ps = new PdfStamper(pr, fs, '\0', true);
                AcroFields pf = ps.AcroFields;

                IDictionary<string, AcroFields.Item> dict = pf.Fields;
                foreach (KeyValuePair<string, AcroFields.Item> kvp in dict)
                    fileContent = fileContent + kvp.Key + ",";
                pr.Close();
                fs.Close();
                File.Delete("tmp_File.pdf");
                return fileContent.Substring(0, fileContent.Length - 1);
            }
            catch (Exception ex)
            {
                throw ex;
            }
What could be the issue?
http://itext-general.2136553.n4.nabble.com/file/n2339743/1030-Form1A.pdf
1030-Form1A.pdf 

Regards
Rajeev
-- 
View this message in context: 
http://itext-general.2136553.n4.nabble.com/The-AcroFields-return-zero-fields-tp2339743p2339743.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
iText-questions mailing list
[email protected]
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/

Reply via email to