Hi all,

           

            I am a novice to itext. Not much work done. Please correct me where ever necessary.

 

I want to create a form (like HTML form ) to enter the information and submit it to the server.  

 

First, is it possible?

 

I have seen PdfAcroForm with methods like addHtmlPostButton(),addFormField(), etc.

 

Is this the right approach, using PdfAcroForm, for my problem.

 

In addition, i am facing a problem with getting an instance of PdfAcroForm. Following is the sample code.

////////////////////////////////////////////////////////////////////////////////////////////////

                        Document document = new Document();

                        try {

                                    PdfWriter pdfWriter = PdfWriter.getInstance(document,

                                                                                                new FileOutputStream("HelloWorld.pdf"));

                                    document.open();

                                    PdfAcroForm pdfAcroForm = pdfWriter.getAcroForm();

                                    System.out.println(" pdfAcroForm = "+pdfAcroForm);

                                    document.add(new Paragraph("Hello World"));

 

                        } catch (DocumentException de) {

                                    System.err.println(de.getMessage());

                        } catch (IOException ioe) {

                                    System.err.println(ioe.getMessage());

                        }

                        document.close();

/////////////////////////////////////////////////////////////////////////////////////////////////////

 

Please let me know where I am missing. Thanks in advance.

 

Regards,

Ramdas Sawant


NOTICE: If received in error, please destroy and notify sender.  Sender does not waive confidentiality or privilege, and use is prohibited.

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to