Below is the code-snippet that might give u an idea about retrieving the field names and their filled-in values of the given PDF file/form using the great "iText". I would, personally, prefer iText rather than PDFBOX, another good PDF-library.

--------------------------------

            PdfReader reader = new PdfReader(pdfFileNameAsStringVariable);
            AcroFields form = reader.getAcroFields();
            HashMap fields = form.getFields();

            for (Iterator i = fields.keySet().iterator(); i.hasNext(); ) {
                System.out.println(  (String) i.next()   );                         
                System.out.println(  form.getField(fieldName)  );
    }

 ------------------------

BR,
Ramesh

[EMAIL PROTECTED] wrote:
<[EMAIL PROTECTED]><[EMAIL PROTECTED]><[EMAIL PROTECTED]><[EMAIL PROTECTED]><[EMAIL PROTECTED]><[EMAIL PROTECTED]>Message: 5
Date: Wed, 15 Nov 2006 19:31:07 +0000 (GMT)
From: swapna reddy <[EMAIL PROTECTED]>
Subject: [iText-questions] Retrieving data from PDF Form created using
iText
To: itext-questions@lists.sourceforge.net
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"

Hi

I have created an interactive PDF Form using iText Class library. Is it possible to retrieve the form data entered into the form fields using iText.

Please advice me if there is any other SDK or tool that I can use to retrieve the data from PDF Form created using iText.

Thanks


swapna



Sponsored Link

Mortgage rates as low as 4.625% - $150,000 loan for $579 a month. Intro-*Terms
-------------------------------------------------------------------------
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/

Reply via email to