Hi all,
i have tried your examples to compile a pdf with field,
this is the code that I have compiled in Oracle 10g Database.


import java.io.FileOutputStream;

import com.lowagie.text.pdf.AcroFields;
import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.PdfStamper;

public class StampaUnione {

    public static String Compila()
{
        System.out.println("Filling in a form");
        try {
            // we create a reader for a certain document
            PdfReader reader = new PdfReader("c:\\OraHome_1\\Input.pdf");
            int n = reader.getNumberOfPages();
            // filling in the form
            PdfStamper stamp1 = new PdfStamper(reader, new 
FileOutputStream("c:\\OraHome_1\\Output.pdf"));
            AcroFields form1 = stamp1.getAcroFields();
            form1.setField("name", "me");
            form1.setField("address", "my adress");
            form1.setField("postal_code", "999999");
            form1.setField("email", "mymail");
            stamp1.close();
        }
        catch (Exception de) {
            de.printStackTrace();
        }
        return "Tutto OK";
    }
}

It's all ok, no error in execution of class, but no file has been created!

Why?

Thank's a lot Bye Gianluca



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to