Hi.

I have a strange problem. I'm filling the fields of a PDF with an XFDF file. One of the fields is a combo box. I use the code below. When I open the PDF filled with the XFDF data in reader, the combo box appears with the first element selected, and not the one I choose, wich is one of  the others; when I open it in acrobat professional, this combo box appears with the correct element selected!
Another thing. In reader, when i print the PDF, the combo box appears with the correct element selected! Can you help me with this?

Thanks,

Luis

    PdfReader reader = new PdfReader(nomePDF);
            PdfStamper stamp = null;
            try {
                stamp = new PdfStamper(reader, new FileOutputStream(
                        tmpfile));
            } catch (Exception e) {
                System.out.println("Excepção setValorCampo "+e.getMessage());
            }

            XfdfReader fdfreader = new XfdfReader(file);
            AcroFields form = stamp.getAcroFields();
            try {
                form.setFields(fdfreader);
               
            } catch (Exception e) {
                System.out.println("Excepção setValorCampo "+e.getMessage());
            }
           
            try {
                stamp.close();
            } catch (Exception e) {
                System.out.println("Excepção setValorCampo "+e.getMessage());
            }

Reply via email to