The /ByteRange values correctly describe the ranges right before and after the signature /Contents value as sensibly enforced by Acrobat and Reader.

One thing surprises me, though, there are no trailing 00 entries in that value. Also you have reserved space for less than 3 KB for the signature container which is not much for a PKCS#7 container. Could it be that the signature container did not completely fit into the reserved space?

Re: Signature is invalid for pdf

BTW, I just noticed that Acrobat wants to save both the original and the signed document when closing. This seems to indicate that there is some error in it. Unfortunately Preflight does not find any PDF syntax error.

Maybe this is the reason why Acrobat and Reader have trouble with the signed version.

Still I would recommend that you review your certificates and PKI in general as the problems mentioned in the message before are real.

Re: Signature is invalid for pdf

Alexander,

Raitskin Alexander wrote

But how then you explain that I can sign other documents with the same signature without any errors?

As mentioned in another reply to your initial message in this thread, the behaviour of Acrobat seems to indicate that there already is some PDF error in the original document http://www.darina.us/code/peles.pdf which might cause Acrobat and Reader to always reject the signature of the signed document. Unfortunately Preflight does not find any PDF syntax error.

Still I would recommend that you review your certificates and PKI in general as the problems mentioned in the message before are real.

Alexander,
Raitskin Alexander wrote:
> But how then you explain that I can sign other documents with the same
> signature without any errors?
As mentioned in another reply to your initial message in this thread, the
behaviour of Acrobat seems to indicate that there already is some PDF error
in the original document http://www.darina.us/code/peles.pdf which might
cause Acrobat and Reader to always reject the signature of the signed
document. Unfortunately Preflight does not find any PDF syntax error.
Still I would recommend that you review your certificates and PKI in general
as the problems mentioned in the message before are real.
Regards, Michael.
--
View this message in context: http://itext-general.2136553.n4.nabble.com/Signature-is-invalid-for-pdf-tp3017509p3019205.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
iText-questions mailing list
[hidden email]https://lists.sourceforge.net/lists/listinfo/itext-questions
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

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev_______________________________________________
iText-questions mailing list
[hidden email]https://lists.sourceforge.net/lists/listinfo/itext-questions

Alexander,
Raitskin Alexander wrote:
> But how then you explain that I can sign other documents with the same
> signature without any errors?
As mentioned in another reply to your initial message in this thread, the
behaviour of Acrobat seems to indicate that there already is some PDF error
in the original document http://www.darina.us/code/peles.pdf which might
cause Acrobat and Reader to always reject the signature of the signed
document. Unfortunately Preflight does not find any PDF syntax error.
Still I would recommend that you review your certificates and PKI in general
as the problems mentioned in the message before are real.
Regards, Michael.
--
View this message in context: http://itext-general.2136553.n4.nabble.com/Signature-is-invalid-for-pdf-tp3017509p3019205.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
iText-questions mailing list
[hidden email]https://lists.sourceforge.net/lists/listinfo/itext-questions
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

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev_______________________________________________
iText-questions mailing list
[hidden email]https://lists.sourceforge.net/lists/listinfo/itext-questions

Re: Signature is invalid for pdf

I've managed to sign it at last, but without setting the "appendable" flag..
When this argument is true in: PdfStamper.CreateSignature(reader, outstream, '\0', null, false);
it fails.

Any ideas?

Acrobat has problems with your original file. If you sign in append mode, the original remains verbatim part of the signed pdf and Acrobat remains unhappy. If on the other hand you don't use append mode while signing, iText rearranges the internal pdf objects which seems to result in the pdf error being fixed and therefore Acrobat being happy.

I don't have all my tools available at home, therefore I just can guess now. I'll look at your new samples next week after the holiday.

This other signature was applied without using the append mode. Just as in the case of your sample http://www.darina.us/code/peles_orig1.pdf from your other mail today, this seems to have fixed the PDF problem Acrobat is upset about.

FYI: The certificate used in that file looks healthier than the certificate you used in all your other samples.

Otherwise, without substantial effort, I unfortunately can not spot the reason why Acrobat is unhappy with your original document (http://www.darina.us/code/peles.pdf). It is not merely a broken xref table (which iText would have spotted, BTW).

But this unhappyness is the cause why Acrobat and Reader will fail to verify any signature applied to that document in append mode.

Regards, Michael.

PS: Leonard, this Acrobat 9 behavior IMO is quite unfortunate --- Acrobat and Reader should show a message to the effect that the signature itself is correct but that Acrobat/Reader found PDF errors which might make it display the file differently from how the signer intended it to be displayed.

Re: Signature is invalid for pdf

My digital signature is invalid while validate the signature after signing the pdf document by using digital signature.But I have used this same DSC for all the PF and ESI registrations and its invalid while signing the document by using DSC.

Herewith I have attached the link, Please check and give me a solution. Its very urgent for tender participation purpose.