It's Item.widget not Item.merged.
Best Regards,
Paulo Soares
> -----Original Message-----
> From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]
> Sent: Wednesday, November 12, 2003 10:24
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] formfield readonly
>
> Hi
>
> I want to use Itext to merge fdf with a pdf. That is working fine.
> Then I want to use iText to put all formfields(text) on READONLY.
> I have searched the mailinglist and found thsi answer from paulo:
> "It can be done. Get the fields with AcroFields.getFields(). Set
> Item.widgets
> with the key PdfName.FF and value PdfNumber(PdfFormField.FF_READ_ONLY)."
>
> Well I dont know hwo to exactly do that.
>
> I have tried:
> AcroFields form = stamp.getAcroFields();
> form.setFields(fdf);
>
> HashMap hash = form.getFields();
> ArrayList liste =
> ((com.lowagie.text.pdf.AcroFields.Item)hash.get("text01")).merged;
> for (int i = 0; i < liste.size(); i++) {
>
> ((com.lowagie.text.pdf.PdfDictionary)liste.get(i)).put(PdfName.FF,new
> PdfNumber(PdfFormField.FF_READ_ONLY));
> }
>
> But that is not working, and therefore I also need the name of teh
> formfield.
>
> Can someone help me how to set the formfields on readonly, also when I
> dont know the name of the field.
>
> Please!
>
> Thank you.
>
> Philipp Schneider
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: ApacheCon 2003,
> 16-19 November in Las Vegas. Learn firsthand the latest
> developments in Apache, PHP, Perl, XML, Java, MySQL,
> WebDAV, and more! http://www.apachecon.com/
> _______________________________________________
> iText-questions mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions