Hi,
I've a requirement where user are going to fill lots of fields ( text field, check box, radio button ) on pdf form and they will mail us. I need to read each fields on pdf form and insert into oracle table.
Edit1: I'm trying following code, It generates pdf but when I double click it says "invalid format". What's wrong ?
import java.io.FileOutputStream;
import java.io.IOException;
import com.itextpdf.text.*;
import com.itextpdf.text.pdf.PdfWriter;
public class pdfGentest{
public static void main(String[] args) {
Document document = new Document();
try {
PdfWriter.getInstance(document, new FileOutputStream("c:\\HelloWorld.pdf"));
document.open();
document.add(new Paragraph("Hello World"));
}
catch (DocumentException de) {
System.err.println(de.getMessage());
} catch (IOException ioe) {
System.err.println(ioe.getMessage());
}
}
}
Fixed: Due to I've not closed the document..Adding document.close(); fixed the problem