sap.setLayer2Text("Elektroniskt undertecknad av..");
Paulo
> -----Original Message-----
> From: Suladna [mailto:[email protected]]
> Sent: Thursday, June 25, 2009 1:41 PM
> To: [email protected]
> Subject: [iText-questions] Removing date & changing language
> in digital signature
>
> Hi,
>
> I am using the below code to digitally sign a pdf file -
> giving a pdf file with my scanned signature, a text saying
> "Digitally signed by Sul Adna" and a timestamp (e.g. Date:
> 2009.06.25 14:29:50 CEST).
>
> I have two questions:
>
> 1. How do I remove the timestamp?
> 2. How do I change the language of "Digitally signed by.. "
> to Swedish? (when i sign in Acrobat I get the Swedish text
> "Elektroniskt undertecknad av..")
>
> Best regards,
> Sul
>
>
> KeyStore ks = KeyStore.getInstance("pkcs12");
>
> ks.load(new FileInputStream(fileKey), fileKeyPassword.toCharArray());
>
> String alias = (String)ks.aliases().nextElement();
>
> PrivateKey key = (PrivateKey)ks.getKey(alias,
> fileKeyPassword.toCharArray());
>
> Certificate[] chain = ks.getCertificateChain(alias);
>
> PdfReader reader = new PdfReader(fName);
>
> PdfStamper stp = PdfStamper.createSignature(reader, new
> FileOutputStream(fNameS), '\0');
>
> PdfSignatureAppearance sap = stp.getSignatureAppearance();
>
> sap.setCrypto(key, chain, null, PdfSignatureAppearance.WINCER_SIGNED);
>
> sap.setCertificationLevel(PdfSignatureAppearance.CERTIFIED_NO_
> CHANGES_ALLOWED);
>
> Image img = Image.getInstance("C:\\scanned_signature.jpg");
>
> sap.setRender(PdfSignatureAppearance.SignatureRenderGraphicAnd
> Description);
>
> sap.setSignatureGraphic(img);
>
> sap.setAcro6Layers(true);
>
> sap.setVisibleSignature(new Rectangle(10, 720, 400, 760), 1, null);
> stp.close();
>
>
>
>
Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão desta
mensagem não significa a perca de confidencialidade. Se esta mensagem for
recebida por engano, por favor envie-a de volta para o remetente e apague-a do
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de
usar, revelar ou distribuir qualquer parte desta mensagem.
Disclaimer:
This message is destined exclusively to the intended receiver. It may contain
confidential or legally protected information. The incorrect transmission of
this message does not mean the loss of its confidentiality. If this message is
received by mistake, please send it back to the sender and delete it from your
system immediately. It is forbidden to any person who is not the intended
receiver to use, distribute or copy any part of this message.
------------------------------------------------------------------------------
_______________________________________________
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
Check the site with examples before you ask questions:
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/