Hi ! Indeed, if I remove usage rights, editing works fine. I could compromise on not being able to save a filled copy. But without usage rights, the submit button no longer works. Obviously, it needs to work.
As a wild guess, I tried "new PdfStamper(reader, new FileOutputStream(RESULT), '\0', true)" to preserve the usage rights, but in that case, the modification does not appear in the resulting file. (in my original code, I used the two-argument constructor for PdfStamper). By the way, I forgot to mention that without removing usage rights, the JavaScript I implemented to validate certain fields no longer works. Since I want to be able programmatically modify my pdf document, I do not think that option 1) is viable. I do not mind doing some more or less heavy programming, as seems to be the case with option 2; I would then just need some good pointers/documentation/examples. Thanks for all the help ! Martin. -----Message d'origine----- De : Bruno Lowagie [mailto:br...@lowagie.com] Envoyé : Thursday, April 16, 2009 10:10 AM À : Post all your questions about iText here Objet : Re: [iText-questions] URL of submit button Martin Leboeuf wrote: > Then, using Acrobat, I open the file and "enable usage rights", > so that end users can save filled versions of the pdf form. > Finally, I modify the file using the code above. After that, you CAN'T change objects in the document without breaking Reader Enabling, unless you: (1) either use Adobe software, (2) or work in append mode. I think you should consider option (1). You won't find non-Adobe software that is capable of (2); even when using iText, you'll have to do plenty of specialist programming: adding a new catalog dictionary, have the XFA entry pointing to a new XFA stream. It's not something you can do without understanding the internals of PDF and XFA. br, Bruno ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php ------------------------------------------------------------------------------ Stay on top of everything new and different, both inside and around Java (TM) technology - register by April 22, and save $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. 300 plus technical and hands-on sessions. Register today. Use priority code J9JMT32. http://p.sf.net/sfu/p _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php