1
PDF 파일의 지정된 서명에 대한 타임 스탬프가 있는지 확인하려고합니다. 내가 분명히 서명에 대한 액세스 권한을 가지고iText로 타임 스탬프 확인 2.1.7
RandomAccessFileOrArray random =
new RandomAccessFileOrArray(new File("temp.pdf").getAbsolutePath());
PdfReader reader = new PdfReader(random, null);
AcroFields af = reader.getAcroFields();
ArrayList<?> names = af.getSignatureNames();
//this are the signatures?
for (Object o : names){
AcroFields.Item item = (Item) af.getFields().get((String)o);
//this is the class for verifying the signature,
//how do I get it from the item?
PdfPKCS7 pdfPKCS7 = null; //XYZ ???
Calendar signingDate = pdfPKCS7.getTimeStampDate();
}
,하지만 난 서명을 검증 PdfPKCS7 클래스에 도착해야합니다 지금까지이 코드에왔다. 아무도 내가 어떻게 거기에 갈 수 있을지 전혀 모른다.
이전에이 솔루션을 사용했지만 컴파일되지 않았습니다. itext 버전을 다운로드하고 af.verifySignature (name)가 작동한다는 것을 알았습니다. 내가 사용했던 제 3 자 버전이 수정되었습니다. 감사. – mrcaramori