Michael P. McDonnell wrote: > When I view my PDFs in adobe reader, the fields are pinkish/purple > because they are/were writable. I can already populate the fields pretty > easily using java and iText, but now I'd like to be able to "burn them > in" so no one knew they were actually dynamic fields. Is this at all > possible?
You have two different options, depending on your specific requirement. Both are explained on pages 506-507 of "iText in Action". Have a look at the following example: http://www.1t3xt.info/examples/browse/?page=example&id=248 I'll summarize the options for you. (1) You can make a field read only using setFieldProperty(); Read the example and look for: form.setFieldProperty( "person.name", "setfflags", PdfFormField.FF_READ_ONLY, null); (2) You can partially flatten the form. Read the example and look for: stamper.partialFormFlattening("person.name"); What is the difference? In (1) the field "person.name" is STILL A FIELD. If you post the form, the value of the field will still be submitted; you can still retrieve the value of the field; with the right tools, you could UNDO making the field Read Only. In (2) the field "person.name" is NO LONGER PART OF THE FORM. It's not a field anymore, just some glyphs on a canvas. The value will not be submitted when the form is posted. That's probably what you meant by "burn then in". -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
