Hi

I managed to find a way to set the signature handler seed value. To
set the handler to the adobe default, use the following code:

PdfReader pdf = new PdfReader("in.pdf");
PdfStamper stp = new PdfStamper(pdf, new FileOutputStream("out.pdf"));
PdfFormField sig = PdfFormField.createSignature(stp.getWriter());
sig.setWidget(new Rectangle(100, 100, 200, 200), null);
sig.setFlags(PdfAnnotation.FLAGS_PRINT);
sig.put(PdfName.DA, new PdfString("/Helv 0 Tf 0 g"));
PdfDictionary sv = new PdfDictionary();
sv.put(PdfName.FILTER, new PdfName("Adobe.PPKLite"));
sv.put(PdfName.TYPE,  new PdfName("SV"));
sv.put(PdfName.FF, new PdfNumber("1"));
sig.put(PdfName.SV, sv);
sig.setFieldName("Signature1");
sig.setPage(1);
stp.addAnnotation(sig, 1);

-Rynhard

On 6/16/06, Rynhard Roos <[EMAIL PROTECTED]> wrote:
> Hi
>
> Is there a way to specify the signature handler that a signature field
> should use.
>
> Using javascript in a pdf, one can use the signatureSetSeedValue
> method to specify the signature handler that is allowed to sign a
> certain signature field, ie the adobe default pki handler, or perhaps
> a signature pad handler, etc.
>
> I'm wonder if itext allows this to be set.
>
> Thanks
> Rynhard
>


_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to