Meaningless Drivel is fun!*
The moose likes Other Open Source Projects and the fly likes iText issue- how to read filled PDF from from a hashmap. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "iText issue- how to read filled PDF from from a hashmap." Watch "iText issue- how to read filled PDF from from a hashmap." New topic
Author

iText issue- how to read filled PDF from from a hashmap.

Lucky J Verma
Ranch Hand

Joined: Apr 11, 2007
Posts: 278
Hi all,
I am beginner to iText api. I have created an API to read PDF template ,prepopulate with some fields and display it back to user.
Users enters somedata and submits it back to db.

This part works fine but i have to implement another feature with iText.
When user fills PDF form and submits it back , there is one option on my UI to modify PDF form.
Which should open same PDF form filled with User data and user can change it.

I dont know how can i accomplish this with i Text.

I wont be read data back from DB As i have have one HashMap populated with user filled data but dont know how to make PDFRader reader from that form .
Fields have textboxes,checkboxes and some blocks which are 'crossed out' when selected.So i would want same behaviour from
'modify' option

Another option i can think .
Read blank template again using PDFReader and read Hashmap using Iterator and setValues based on that which is long lengthy code.




Any suggestions?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41108
    
  45
Is the problem in keeping track of the data to be used, or in using that data to (re-)populate the PDF?


Ping & DNS - my free Android networking tools app
Lucky J Verma
Ranch Hand

Joined: Apr 11, 2007
Posts: 278
the problem is with radio buttons on my PDF form and some hidden fields tied to it with javascript in PDF(acro javascript) eg .

radio buttons - name "bo" choices are -> BO_TRUST, BO_CORP,BO_PART
if use selects any radio button, javascript sets the value of some hidden field to 1(one hidden field for each choice ) and it
gets value either 0 or 1
This hiddenfields (all of them) are columns are Db and persist.

To modify form, and prepopulate with user-entered values, how do i reverse code this.
Reading hidden fields (any has value 1) ,then radiobutton to that is selected.?How to find radiobutton in Text with choice.
 
 
subject: iText issue- how to read filled PDF from from a hashmap.
 
Similar Threads
looking for an api/library like mail merge
Output Data to Formated Report
iText: Reduce size of PDFs generated from PDF forms
Appending to PDF form fields using iText APIs
itext PDF problem with radio button