Hi All, I have a Dynamic Xfa form created using Adbove Livecycle 8 and has reader enabled it using Acrobat Pro and recently purchased the reader extension. The forms is distributed to my customers and has saved multiple copies with datas onto their PC. Now I have a newer version with bug fixes that needs to be redistributed. I need to write a migration tool to migrate all the datas from the previous version to a new one.
I've read the following post http://www.nabble.com/enabled_form_prefilled.pdf-(from-FAQ)-breaks-after-one-save-td18219122.html#a20358214 Further checking on the Post by Bruno on the July 05 2008 that the problem will be fixed on the next release. IText version 2.1.3 was released on July 12, 2008. So I suppose the reader enabled issue was fixed. ItextInfo also mention that the next release is scheduled on Nov 11 2008. Here is my code that does the migration PdfReader srcReader = new PdfReader(SOURCE, new String("password").getBytes() ); PdfReader destReader = new PdfReader(DESTINATION, new String("password").getBytes() ); PdfStamper destStamp= new PdfStamper( destReader, new FileOutputStream(DEST2) , '\0',true); XfaForm xfaSrcForm = new XfaForm(srcReader); Node n = xfaSrcForm.getDatasetsNode(); Xml2SomDatasets som = new Xml2SomDatasets(n); //get the data node Node n1 = (Node)som.getName2Node().get("data[0].Request[0].Address1[0]"); xfaSrcForm.setNodeText(n1,"test Replace"); xfaSrcForm.setChanged(true); XfaForm.setXfa(xfaSrcForm,destStamp.getReader(),destStamp.getWriter()); destStamp.close(); srcReader.close(); There are 2 outcomes depending on the Stamper initailization If I use PdfStamper destStamp= new PdfStamper( destReader, new FileOutputStream(DEST2) , '\0'); the data successfully migrated by reader enabled that was on the DESTINATION is gone with the dreaded message "the document has changed since it was created and these rights are no longer valid". Output filesize 153Kb If I use PdfStamper destStamp= new PdfStamper( destReader, new FileOutputStream(DEST2) , '\0', true); The reader enablement is retained, but I do not see my fields migrated. Output filesize 481 KB. How do I retain the reader enable feature and with the datas migrated? Could the append function of the Stamper appended the XFA, and the old XFA is still there, thus I could not see the newly appended XFA? Will the new IText 2.1.4 solve this issue? I already have a backup plan that will work by combining java and folder level scripting, but I would like to do everything with IText. brgds, Darren -- View this message in context: http://www.nabble.com/Reader-Enable-issue-with-dynamic-XfaForms.-tp20413803p20413803.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ 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