This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in iText AcroForm Programming

 
rama kolla
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am using iText's Java PDF library to create AcroForms.

My context is:
I create an acroform which will be placed in my local disk. I again use java code to send it as an attachment in a mail to the client. Client opens the attachment(PDF file) and fills in the form details and when he/she clicks on the Submit button in the PDF(AcroForm), the form data has to be sent to some JSP file on the server. But it is not rather it says:
"HTTP Error 407
407 Proxy Authentication Required

You must authenticate with a proxy server before this request can be
serviced. Please log on to your proxy server, and then try again."

Please find the code I have written for Submit button

// Add Submit button
PushbuttonField submitBtn = new PushbuttonField(writer,
new Rectangle(0, 0, 35, 15),"submitPOST");
submitBtn.setBackgroundColor(Color.GRAY);
submitBtn.setBorderStyle(PdfBorderDictionary.STYLE_BEVELED);
submitBtn.setText("POST");
submitBtn.setOptions(PushbuttonField.VISIBLE_BUT_DOES_NOT_PRINT);
PdfFormField submitField = submitBtn.getField();
submitField.setAction(PdfAction.createSubmitForm(
"http://localhost:9090/MyWebApp/pdfServlet",null,
PdfAction.SUBMIT_HTML_FORMAT));

cell = new PdfPCell();
cell.setMinimumHeight(15);
cell.setCellEvent(new FieldCell(submitField, 35, writer));
table.addCell(cell);


Atleast if the captured data in the acroform is converted to XML format and sent to the server as an XML attachment automatically is also sufficient.

I have tried and still in the process of trying.....
Any help is appreciated!

Ram

[ UD: provided a more descriptive title ]
[ July 23, 2008: Message edited by: Ulf Dittmer ]
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

I'll move the post to the "Other Open Source Projects" forum, where iText is discussed.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic