• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

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

 
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is the problem in keeping track of the data to be used, or in using that data to (re-)populate the PDF?
 
Lucky J Verma
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
If you believe you can tell me what to think, I believe I can tell you where to go. Go read this tiny ad!
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic