Hi, thanks a lot, calling
reader.getAcroForm().remove(PdfName.SIGFLAGS) in addition to removing the signature field indeed solves my problem! Kind regards, Rico -----Ursprüngliche Nachricht----- Von: Paulo Soares [mailto:psoa...@glintt.com] Gesendet: Freitag, 23. Januar 2009 21:51 An: Post all your questions about iText here Betreff: Re: [iText-questions] Removing a signaturethoroughly(acroFields.removeField not sufficient?) Also remove the sigflags in acroform. You can remove all in the reader and just use the stamper to output the result. Paulo ----- Original Message ----- From: "Starke, Rico" <rico.sta...@gl-group.com> To: "Post all your questions about iText here" <itext-questions@lists.sourceforge.net> Sent: Friday, January 23, 2009 5:50 PM Subject: Re: [iText-questions] Removing a signature thoroughly(acroFields.removeField not sufficient?) Hi, using stamper.getAcroFields() still isn't enough to completely remove the signature. I still cannot apply password encryption to the resulting pdf file in acrobat pro v8 ("the security policy cannot be changed because the document is signed or certified"). Any other ideas? Kind regards, Rico _________________________________________________________ Rico Starke / Capgemini sd&m / Hamburg Tel: +49 40 254491-451 / www.de.capgemini-sdm.com Fax: +49 40 254491-11 / mailto:rico.sta...@capgemini-sdm.com Capgemini sd&m AG, Lübecker Straße 128, 22087 Hamburg Zusammen. Für nachhaltigen Erfolg. _________________________________________________________ Vorstand: Edmund Küpper (Vorsitzender), Burkhard Kehrbusch, Rüdiger Azone, Dr. Uwe Dumslaff, Kai Grambow, Dr. Michael Rading, Josef Ranner Aufsichtsrat: Pierre Hessler (Vorsitzender) Sitz und Amtsgericht: München HRB 126057 -----Ursprüngliche Nachricht----- Von: 1T3XT info [mailto:i...@1t3xt.info] Gesendet: Donnerstag, 22. Januar 2009 22:22 An: Post all your questions about iText here Betreff: Re: [iText-questions] Removing a signature thoroughly (acroFields.removeField not sufficient?) Starke, Rico wrote: > Hi, > > thanks for your quick reply! Can you provide more information on how > to do a full save with iText after removing the signature field? What > I do right now is: > > InputStream signedFileStream = // FileInputStream for a temporary > java.io.File OutputStream resultFileStream = // FileOutputStream for a > different temporary File PdfReader reader = new > PdfReader(signedFileStream); AcroFields acroFields = > reader.getAcroFields(); > acroFields.removeField("my_signature_name"); > PdfStamper stamper = new PdfStamper(reader, resultFileStream); > stamper.close(); > reader.close(); For starters, your getting your AcroFields object from the reader. You should get it from the stamper: AcroFields acroFields = stamper.getAcroFields(); But I don't know if this will be sufficient to remove the signature. -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ 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 This e-mail and any attachment thereto may contain confidential information and/or information protected by intellectual property rights for the exclusive attention of the intended addressees named above. Any access of third parties to this e-mail is unauthorised. Any use of this e-mail by unintended recipients such as total or partial copying, distribution, disclosure etc. is prohibited and may be unlawful. When addressed to our clients the content of this e-mail is subject to the General Terms and Conditions of GL's Group of Companies applicable at the date of this e-mail. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer. GL's Group of Companies does not warrant and/or guarantee that this message at the moment of receipt is authentic, correct and its communication free of errors, interruption etc. ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ 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