|
Hello,
I need to read fields from pdf form (I have attached the form).
Here is the code, that I use:
string pdfTemplate = @"c:\example\ezoppex.pdf";
this.Text += " - " + pdfTemplate;
PdfReader pdfReader = new PdfReader(pdfTemplate);
StringBuilder sb = new StringBuilder();
foreach (DictionaryEntry de in pdfReader.AcroFields.Fields)
{ sb.Append(de.Key.ToString() + Environment.NewLine);} textBox1.Text = sb.ToString(); textBox1.SelectionStart = 0;
After this code I should get all the fields in the textbox, but I see only empty textbox.
Thanks, Vadim. ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ iText-questions mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php 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/ |
|
Maybe the problem is that the language is Czech? If yes, then please let me know whether it is possible to read these fields out and how?
Thanks,
Vadim.
On Wed, Jan 13, 2010 at 4:51 PM, Vadim Genkin <[hidden email]> wrote:
------------------------------------------------------------------------------ Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev _______________________________________________ iText-questions mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php 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/ |
|
In reply to this post by Vadim Genkin
This is an XFA-based form, NOT an AcroForm (AcroFields). You
need to use an alternate method. Leonard From: Vadim Genkin
[mailto:[hidden email]] Hello, I need to read fields from pdf form (I have attached the
form). Here is the code, that I use: string pdfTemplate = @"c:\example\ezoppex.pdf";
this.Text += " - "
+ pdfTemplate; PdfReader pdfReader = new PdfReader(pdfTemplate); StringBuilder sb = new StringBuilder(); foreach (DictionaryEntry
de in pdfReader.AcroFields.Fields) { sb.Append(de.Key.ToString() + Environment.NewLine); } textBox1.Text = sb.ToString(); textBox1.SelectionStart = 0; After this code I should get all the fields
in the textbox, but I see only empty textbox. Thanks, Vadim. ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ iText-questions mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php 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/ |
|
In reply to this post by Vadim Genkin
Use new XfaForm(PdfReader). You will then have access to the form/data.
From: Leonard Rosenthol To: [hidden email] Sent: Wed Jan 13 11:19:26 2010 Subject: Re: [iText-questions] Hello, I have some problems with itext This is an XFA-based form, NOT an AcroForm (AcroFields). You
need to use an alternate method. Leonard From: Vadim Genkin
[mailto:[hidden email]] Hello, I need to read fields from pdf form (I have attached the
form). Here is the code, that I use: string pdfTemplate = @"c:\example\ezoppex.pdf";
this.Text += " - "
+ pdfTemplate; PdfReader pdfReader = new PdfReader(pdfTemplate); StringBuilder sb = new StringBuilder(); foreach (DictionaryEntry
de in pdfReader.AcroFields.Fields) { sb.Append(de.Key.ToString() + Environment.NewLine); } textBox1.Text = sb.ToString(); textBox1.SelectionStart = 0; After this code I should get all the fields
in the textbox, but I see only empty textbox. Thanks, Vadim. ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ iText-questions mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php 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/ |
| Powered by Nabble | Edit this page |
