aspose file tools*
The moose likes Other Open Source Projects and the fly likes Problem in iText AcroForm Programming 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 "Problem in iText AcroForm Programming" Watch "Problem in iText AcroForm Programming" New topic
Author

Problem in iText AcroForm Programming

rama kolla
Greenhorn

Joined: Jun 16, 2008
Posts: 1
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 ]

Lucky to get in touch with java!!
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41525
    
  53
Welcome to JavaRanch.

I'll move the post to the "Other Open Source Projects" forum, where iText is discussed.


Ping & DNS - my free Android networking tools app
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in iText AcroForm Programming