I'm using the following code:
String selectedFile ="some_source_pdf_file.pdf"; String file ="some_target_pdf_file.pdf"; PdfReader reader = new PdfReader(selectedFile); PdfStamper stamp = new PdfStamper(reader, new FileOutputStream(file)); AcroFields form = stamp.getAcroFields(); String name = "some_field_name"; AcroFields.Item field_item = form.getFieldItem(name); /*[Based on code in AcroFields, line 1205+*/ PdfDictionary valDict = field_item.getValue( 0 ); PdfNumber pdfNumFF = valDict.getAsNumber( PdfName.FF ); boolean is_ro=false; if (pdfNumFF != null) { int intFF=pdfNumFF.intValue(); is_ro = (intFF & BaseField.READ_ONLY) != 0; } /*]Based on code in AcroFields, line 1205+*/ System.out.print(":is_ro=");System.out.print(is_ro); Is there a better way? TIA. -regards, Larry ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php