Op 27/08/2012 17:07, Elias_iText schreef:
> I receive the signed PDF file and I have no control over the type of
> signature.

If a PDF is signed, it could have restrictions.
You should assume that you can add annotations:
1.) without breaking the signature
2.) without causing a warning.

> Yes, the program does what I want,

I don't think so, because what I've said above is inherent to the PDF 
specification.

>   but I need this functionality to a bigger
> system and in this case, the Web program does not work integrated.  One
> license is required and I would not buy a license just to figure out how it
> makes, no sense.

Er... Two things:
1.) If the people at signfiles.com use iText(Sharp), they also need to 
buy an iText license. (A mail has been sent to sales to check if they've 
bought one.)
2.) If you plan on using iText, you'll probably need a license too, 
won't you?

> Below part of my code:
> ...
> PdfStamper stamper = PdfStamper.createSignature(reader, new
> FileOutputStream(dest), '\0', null, true);
> int qtypages =  reader.getNumberOfPages();
> PdfSignatureAppearance appearance = stamper.getSignatureAppearance();
> appearance.setReason("Test.");
> appearance.setLocation("anywhere");
> appearance.setVisibleSignature(new Rectangle(0,750, 30, 200), qtypages,
> "mysignature");
> appearance.setSignatureGraphic(image);
> appearance.setRenderingMode(PdfSignatureAppearance.RenderingMode.GRAPHIC);
> ...

But... but... you've just told us that you receive the signed PDF. Now 
you're signing it once more. Is that your intention?

> Here, I put the annotations on the pages :
> ...
> for (int i = 1; i < qtypages; i++) {
>       PdfAnnotation stp =  PdfAnnotation.createStamp(stamper.getWriter(), new
> Rectangle(0,700,30, 200), "MY STAMP", "STP"+i);
>       PdfAppearance tp = PdfAppearance.createAppearance(stamper.getWriter(),
> image.getPlainHeight(),image.getPlainWidth());
>       image.setAbsolutePosition(0, 0);
>       tp.addImage(image);
>       stp.setAppearance(PdfAnnotation.APPEARANCE_NORMAL, tp);
>       stamper.addAnnotation(stp,i);
> }
> ..
>
> and I need to know how to put the signature field reference into the
> annotation in order to that annotation show the signature content as does
> the signature field.

Strange... The annotation used for a signature is a Widget annotation, 
yet you want it to be a Stamp annotation? The question is so confusing 
that you probably won't get an answer.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
iText-questions mailing list
[email protected]
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