I want to add Time Stamp to my PDF document (without Digital Signature). How can I do this?
I can do it with Digital signature using Itext ( I have here TSAClient):
MakeSignature.signDetached(appearance, digest, signature, chain, null, null, tsa, 0, subfilter);
but how to do similar thing without digital signature? using Bouncy Castle or Itext or Pdfbox... or with another library..
In iText you are looking for
LtvTimestamp.timestamp(appearance, tsa, signatureName);
Also cf. the JavaDoc documentation:
/**
* Signs a document with a PAdES-LTV Timestamp. The document is closed at the end.
* @param sap the signature appearance
* @param tsa the timestamp generator
* @param signatureName the signature name or null to have a name generated
* automatically
* @throws DocumentException
* @throws IOException
* @throws GeneralSecurityException
*/
You might want to read section 5.4.1 Adding a Document Security Store (DSS) and a Document-Level Timestamp in Digital Signatures for PDF documents for the use in context.
Be aware, document level time stamps are not properly recognized by old PDF viewers as they entered the PDF world only fairly recently, i.e. with PAdES-4.