Quantcast

Hello, I have some problems with itext

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Hello, I have some problems with itext

Vadim Genkin
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/

ezoppex.pdf (340K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hello, I have some problems with itext

Vadim Genkin
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:
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.



------------------------------------------------------------------------------
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/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hello, I have some problems with itext

Leonard Rosenthol-3
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]]
Sent: Wednesday, January 13, 2010 9:52 AM
To: [hidden email]
Subject: [iText-questions] Hello, I have some problems with itext

 

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/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Hello, I have some problems with itext

Mathieu Fortin
In reply to this post by Vadim Genkin

Use new XfaForm(PdfReader). You will then have access to the form/data.


Notarius Inc.
700-1080 Côte du Beaver Hall
Montréal, Québec, H2Z 1S8

Avis de confidentialité / Confidentiality Notice

Notarius Inc. - Certifié ISO 9001 : 2000
Centre de certification du Québec - Certifié ISO 27001 : 2005



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]]
Sent: Wednesday, January 13, 2010 9:52 AM
To: [hidden email]
Subject: [iText-questions] Hello, I have some problems with itext

 

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/
Loading...