Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » iText »

[iText-questions] Hidden field not received on submit.

Andrea Fantechi

2005-06-30


Hello.
I would like to have any suggestion on why I don't receive a hidden
parameter set into.
What I'm doing is getting a document and fill in its fields, flatten the
form, then copy the document it into another empty document.
Finally I add a submitButton and a hidden field into the new document.
The pdf document is correctly presented, and viewing the pdf file with a
text editor I see the two form fields.
When I click the submit button in my servlet I only receive the
parameter with the button name without value (?) and I don't absolutely
receive the hidden field.
The PdfWriter created and used is the following:

PdfWriter outputWriter = PdfWriter.getInstance(outputDocument,
outputStream);
outputWriter.getAcroForm().addHtmlPostButton("backButton", "CLICK HERE",
"Click here", "http://localhost:8080/MyWebApp/MyServlet", font, 12F,
250F, 725F, 350F, 750F);
outputWriter.getAcroForm().addHiddenField("code", String.valueOf(code));

Thanks in advance.
Andrea

Attachment: a.fantechi.vcf
©2008 junlu.com - Jax Systems, LLC, U.S.A.