-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I've got the same problem with the timestamping code but in fact, while
trying to get a small example together, I've found that the same error
occurs also with just the signing part.

The signing code is based on the doc to sign doc at:

        http://itextpdf.sourceforge.net/howtosign.html#howtosign


The two pdf files are attached.

The Java code consists of:

=========
com.lowagie.text.Document.compress = false;
KeyStore ks = KeyStore.getInstance("pkcs12");
ks.load(new FileInputStream(KEYSTORE), PASSWORD.toCharArray());
String alias = (String)ks.aliases().nextElement();
PrivateKey key = (PrivateKey)ks.getKey(alias, PASSWORD.toCharArray());
Certificate[] chain = ks.getCertificateChain(alias);
PdfReader reader = new PdfReader(IN);
FileOutputStream fout = new FileOutputStream(OUT);
PdfStamper stp = PdfStamper.createSignature(reader, fout, '\0');
PdfSignatureAppearance sap = stp.getSignatureAppearance();
sap.setCrypto(key, chain, null, PdfSignatureAppearance.WINCER_SIGNED);
sap.setReason(REASON);
sap.setLocation(LOCATION);
// comment next line to have an invisible signature
sap.setVisibleSignature(new Rectangle(100, 100, 200, 200), 1, null);
stp.close();
=========



Xavier


Leonard Rosenthol wrote:
> Without seeing the actual PDF in question - there is NO WAY to determine
> why you are getting that message.
> 
> Leonard
> 
> On Sep 28, 2007, at 1:03 PM, Gurpreet Singh wrote:
> 
>> Hi,
>>
>> Thanks to Aiken Sam and Paulo for providing the Timestamp example for
>> signing the pdf. I am using the itext 1.4.4 version, java 1.4.2,
>> bouncy castle API for java 1.4.2 and  TSA server as
>> adobe-timestamp.geotrust.com/tsa
>> <http://adobe-timestamp.geotrust.com/tsa>. I have tried with iText
>> version 2.0.4 also, but same error is coming. I am using FOP to
>> generate the pdf contents using itext to create a signed pdf. 
>>
>> I am using the same example as posted at the following location and
>> able to generate the pdf:
>>
>> http://www.nabble.com/PDF-Digital-signature-with-timestamp---using-Time-Stamp-Authority---example-t4147508.html
>> <http://www.nabble.com/PDF-Digital-signature-with-timestamp---using-Time-Stamp-Authority---example-t4147508.html>
>>
>>
>> On opening the pdf, it shows the blue ribbon and says that The
>> document was certified by <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>, 
>> company with
>> the valid certificate issued by GeoTrust CA for adobe. I am able to
>> see the following message as well on clicking the Signature properties
>> button:
>>
>> 1. The document has not been modified since it was modified.
>> 2. The signer identity is valid.
>> 3. Signature is timestamped.
>>
>> But when i am going to Legal Tab and clicking the View Document
>> Integrity properties button, then in the PDF/SigQ conformance report
>> dialog box. I am getting the error message as:
>>
>> " *4000 Unrecognized PDF content. *"
>> *Unrecognized PDF content: The document contains PDF content or custom
>> content not supported by the current version of Adobe Reader.*
>>
>> *The document contain rich content that cannot be reliably suppressed.
>> contact the document author regarding whether you should sign or trust
>> the signature in this document. *
>>
>> Please see the above error in the attached image file.
>>
>> What i can think of that i have an image in gif format as a logo in
>> the PDF. So, is that creating the problem?  OR something else. I tried
>> to search on google but didin't find anything useful.
>>
>> Any help or pointer towards resolution will be helpful. Thanks in
>> advance for help.
>>
>> Thanks
>> Gurpreet Singh
>> <abc.JPG>


- --
Xavier Le Vourch
Brittany Software, Inc.
<[EMAIL PROTECTED]>

PGP Key: http://brittanysoftware.com/gpg_key.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFG/900A3JYBYlsWUcRAikGAKCD3ZqeXdAZW3p4ja6nQD2XizKtgACdF0xR
KqyC94KplUaBUED+VIkX+lI=
=xwUR
-----END PGP SIGNATURE-----

Attachment: unsigned.pdf
Description: Adobe PDF document

Attachment: demo_only_signed.pdf
Description: Adobe PDF document

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to