Knezevich Marco,

Knezevich Marco wrote
> I am new in itext. After applying digital signature, I need to display a
> text with signature information on EVERY page and not only in one.
> 
> I found the post in:
> 
> http://itext-general.2136553.n4.nabble.com/display-Signature-in-Footer-of-every-page-td4237064.html
> 
> where was written "It is possible to have widgets on multiple pages
> referring to the same signature field ......."
> 
> Can someone tell me how can I do this?

Being the one who created that sample back then, I feel tempted to also
throw in my 2 cents...

First of all: Are you really sure you want to do it like it is done in the
sample provided in the thread you refered to
(http://itext-general.2136553.n4.nabble.com/file/n4237594/2274_2007_H_PROVISIONAL_-_multifield_-_Adobe.pdf)?

I ask because while it certainly looks good, at least if all those
visualizations were in some header or footer of the document with some
dedicated signature area, the legal value of such signatures may be
*diminished* by these multiple visualizations! (Depending on the legal
system of course) a paper signature may only sign everything "above" it,
which requires a single position, and such rules may be applied in parallel
for these digital signature visualizations.

Adobe expressed comparable concern in their *Adobe Acrobat SDK* document
*Digital Signature Appearances*:

> The location of a signature within a document can have a bearing on its
> legal meaning. For this reason, signature fields [created by Adobe
> software] never refer to more than one annotation. If more than one
> location is associated with a signature, the meaning may become ambiguous.

This might even be taken as a hint that Adobe reserve for themselves the
option to start showing a warning when displaying a PDF with such a
multi-widget signature or even a validation error due to the possible
ambiguities; after all, they have a history of becoming stricter in their
signature validation criteria.

On the other hand that document now is some five years old and nothing like
that had happened, and furthermore Leonard surely would have hinted at that
himself if such a change was imminent...

Now PDF-2 is approaching and most likely will explicitly restrict signature
fields to have a single visualization only.

This obviously can make Adobe use the option mentioned above and reject all
multi-widget signatures, even in PDF-1 documents.

...

If in spite of all these possible issues, you still are interested in
creating such signatures:

At the time I created that sample I merely did it on a prove-of-concept
scale, and I did not do it using iText alone. Actually I used iText only to
add an empty multi-widget signature field to some regular PDF stamper (I
believe based on a version 4.2 iText compilation):

    PdfFormField addMultiAnnotationSignatureField(PdfStamper pdfStamper,
String name, float llx, float lly, float urx, float ury)
    {
        PdfWriter pdfStamperImp = pdfStamper.getWriter();
        PdfAcroForm acroForm = pdfStamperImp.getAcroForm();

        PdfFormField signature =
PdfFormField.createSignature(pdfStamperImp);
        signature.setFieldName(name);
        
        for (int page = pdfStamper.getReader().getNumberOfPages(); page > 0
; page--)
        {
            PdfFormField annotation = createAnnotation(pdfStamperImp);
            acroForm.setSignatureParams(annotation, null, llx, lly, urx,
ury);
            acroForm.drawSignatureAppearences(annotation, llx, lly, urx,
ury);
            annotation.setPlaceInPage(page);
            annotation.setPage(page);
            annotation.remove(PdfName.FT);
            signature.addKid(annotation);
            llx += page * 5;
            lly += page * 5;
            urx += page * 10;
            ury += page * 10;
        }
        pdfStamper.addAnnotation(signature, 1);
        return signature;
    }

and then signed using Adobe Acrobat (that's why Adobe appears in the file
name). This sufficed for a POC.

The iText signature API is not immediately able to sign such
multi-annotation signature fields, it assumes a single annotation which is
merged into the signature form field. This is where the actual work would
start.

Due to the possible legal problems mentioned above, we didn't continue
developing this feature for our software here.

Regards,   Michael



--
View this message in context: 
http://itext-general.2136553.n4.nabble.com/display-Signature-info-on-EVERY-page-tp4658892p4658901.html
Sent from the iText - General mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to