alexrait,

alexrait wrote:
> Here is the full function that signs.
> 
> public static void SignPDF(Stream instream, Stream outstream,
> X509Certificate2 xcer, bool IsVisible, 
>             string imageLocation, int[] rectangle, int page)
>         {
>                 [...]
>                 Rectangle pageRect = reader.GetPageSize(1);
>                 Rectangle rect = new Rectangle(rectangle[0], pageRect.Top
> -  rectangle[1], rectangle[2], pageRect.Top - rectangle[3]);

Looks ok at first glance (I'm more acquainted with the Java version, though,
maybe someone using the C# version may want to jump in and test).

Which parameters do you call that function with? The annotation generated in
the PDF is positioned at [0 692 100 792] which looks like you used [0, 100,
100, 0]. And that's where I see your image.

Ah, one moment, using Foxit I see it there. Using Adobe Reader I don't. And
as mentioned in my former answer, Adobe preflight is unhappy about elements
0, 1, and 3 of the /Contents array of the last page of your document.

Looking into your document one can see that that /Contents array has been
replaced by iText. Initially it was:

[14 0 R 4 0 R 90 0 R 16 0 R]

but at the end it's

[135 0 R 136 0 R 90 0 R 137 0 R]

To me this very much looks like a bug I, too, saw recently, cf.
http://old.nabble.com/Problem-with-PdfReader.eliminateSharedStreams%28%29-in-concert-with-appending-PdfStamper-to26734822.html,
the pages in your file, too, share streams in their /Contents arrays.

Regards,   Michael.

PS: No, this is not a weird attempt to increase the urgency of that bug,
even though it might just look like that.
-- 
View this message in context: 
http://old.nabble.com/Multiple-signatures-do-not-work-with-signatures-on-pages-other-than-the-first-one-tp27238083p27239612.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
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
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/

Reply via email to