我可以签署pdf文件,但时间格式太长。 我想改变日期格式,但我不能......
这是我的代码。
PdfReader reader = new PdfReader(input);
PdfStamper stp = PdfStamper.CreateSignature(reader, output, '\0');
PdfSignatureAppearance sap = stp.SignatureAppearance;
**sap.SignDate = DateTime.Now;**
sap.SetCrypto(null, chain, null, PdfSignatureAppearance.WINCER_SIGNED);
sap.Reason = "Testování";
sap.Location = "Praha";
sap.Acro6Layers = true;
sap.Render = PdfSignatureAppearance.SignatureRender.GraphicAndDescription;
PdfSignature dic = new PdfSignature(PdfName.ADOBE_PPKMS, PdfName.ADBE_PKCS7_SHA1);
**dic.Date = new PdfDate(sap.SignDate);**
而且,在我的pdf文件中,签名图章是这样的: “2012.11.01 05:21:00 +02:00”
但我想这样:“01.11.2012 19:21:00”