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

Reply via email to