• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Saving Edited PDF Forms using iText

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!

I generated a registration form in java using iText. The form was editable so my users can input their name, age and other details. I have to save the form afterwards so that i can get the data that the user wrote in my pdf form.

I can write the details in my pdf file but when im saving the file i am prompted that the data i provided will not be saved and if i want to have a copy of the completed form i should print it.

Is there any way that i can save my form after user input so that i can get their data?

Thank you.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An extensive example of how to create a submittable PDF form using iText can be found at http://www.geek-tutorials.com/java/itext/itext_acroform_javascript.php
 
prinz reyes
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your quick response. I tried the link you gave me but i still have problem.

what if i want to save the data directly to the database after clicking POST?

Or should i say i want to save a copy of the completed form to another pdf form?
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

what if i want to save the data directly to the database after clicking POST?


I'm not sure what you're asking. You can't submit a PDF to a DB - it needs to go through an active server component -like a servlet- in one of the available modes (PdfAction.SUBMIT_...). The server then can do with the data whatever it pleases (save it, ignore it, etc.).
 
prinz reyes
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks again for your reply..

here's what i really want to do.

1. i created a from using iText that is editable.
2. then user can download it and save it example in their desktop.
3. user provide data in the required fields and then save the file.
4. Upload the completed file to a site or email it.

but the problem is after i edit or fill up the form i cannot save it.

Do you have any idea?

Im really sorry for the disturbance.


 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It's not a disturbance at all. Answering questions and clearing up confusion is what this site is all about.

but the problem is after i edit or fill up the form i cannot save it.


Right. Adobe Reader can't save filled-in forms, only the Professional version (which costs money) can do that. But Reader can submit a filled-in form, and the example I linked to shows how to create a PDF that allows you to do that.
 
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic