Op 8/11/2012 11:52, Danilo Nicolò schreef: > Hi all, > > I have a question. Is it possible to set read-only fields of pdf created > with adobe livecycle? I tried > > acroff.setFieldProperty(id, "setfflags", PdfFormField.FF_READ_ONLY, null); > > but it doens't work when I open pdf I can write to field. > You're using a fork to eat soup, I mean: you're using AcroForm syntax on an XFA form. Please don't be surprised that this doesn't work.
If you want to set fields to read only, you need to manipulate the XML that is embedded in the PDF. You can do this using iText by extracting the XML, changing it with the XML library of your choice, and then put the XML back into the PDF using iText. If you want to flatten the fields (removing all interactivity by rendering the XFA to PDF), you need XFA Worker: http://demo.itextsupport.com/xfademo ------------------------------------------------------------------------------ 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_nov _______________________________________________ iText-questions mailing list [email protected] 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
