By Date: <-- -->
By Thread: <-- -->

FormField is not required



 Hi Paulo,

This is how I try to set the field "notes" to "not required:

public static void main(String[] args) throws Exception {
    File f = new File("C:/tmp/test/foo.pdf");
    FileInputStream inStream = new FileInputStream(f);
    PdfReader reader = new PdfReader(inStream);
    PdfStamper stamp = new PdfStamper(reader, new FileOutputStream(
        "c:/tmp/test/test.pdf"));
    AcroFields form = stamp.getAcroFields();    
    form
    .setFieldProperty("notes","setfflags", PdfFormField.FF_REQUIRED, null);
    stamp.close();
    log.debug("ready");
}

Thanks for your help,
Beate

> -----Ursprüngliche Nachricht-----
> Von: itext-questions-bounces (at) lists.sourceforge.net 
> [mailto:itext-questions-bounces (at) lists.sourceforge.net] Im 
> Auftrag von Paulo Soares
> Gesendet: Mittwoch, 30. August 2006 15:02
> An: Post all your questions about iText here
> Betreff: Re: [iText-questions] FormField is not required
> 
> Works for me. Post a small PDF and the exact code you are 
> using so that the problem can be reproduced.
> 
> Paulo
> 
> ----- Original Message -----
> From: "Beate Niendorf" <bn (at) procset.com>
> To: <itext-questions (at) lists.sourceforge.net>
> Sent: Wednesday, August 30, 2006 1:56 PM
> Subject: [iText-questions] FormField is not required
> 
> 
> >
> >
> > Hello,
> >
> > I try to turn off the flag "FF_REQUIRED" of some PdfFormFields but
> > form.setFieldProperty(fieldname, "ctrlfflags", 
> PdfFormField.FF_REQUIRED,
> > null); is not working :(
> >
> > Also turning on the flag with  form.setFieldProperty(fieldname,
> > "setfflags", PdfFormField.FF_REQUIRED, null); ist not working.
> >
> > Can anyone help me please?
> >
> > Ihr ProcSet-Team
> > -- 
> >  Beate Niendorf
> > --
> >

Attachment: foo.pdf
Description: Adobe PDF document

-------------------------------------------------------------------------
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
iText-questions (at) lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions