Example usage for org.apache.pdfbox.pdmodel.interactive.digitalsignature PDSignature getFilter

List of usage examples for org.apache.pdfbox.pdmodel.interactive.digitalsignature PDSignature getFilter

Introduction

In this page you can find the example usage for org.apache.pdfbox.pdmodel.interactive.digitalsignature PDSignature getFilter.

Prototype

public String getFilter() 

Source Link

Document

Returns the filter.

Usage

From source file:eu.europa.esig.dss.pades.signature.PAdESLevelBWithContentTimestampTest.java

License:Open Source License

@Override
protected void onDocumentSigned(byte[] byteArray) {
    super.onDocumentSigned(byteArray);

    try (PDDocument doc = PDDocument.load(byteArray)) {
        List<PDSignature> signatureDictionaries = doc.getSignatureDictionaries();
        assertEquals(1, signatureDictionaries.size());
        PDSignature pdSignature = signatureDictionaries.get(0);
        assertNotNull(pdSignature.getName());
        assertNotNull(pdSignature.getReason());
        assertNotNull(pdSignature.getLocation());
        assertNotNull(pdSignature.getContactInfo());
        assertNotNull(pdSignature.getSignDate()); // M
        assertEquals("Adobe.PPKLite", pdSignature.getFilter());
        assertEquals("ETSI.CAdES.detached", pdSignature.getSubFilter());
    } catch (IOException e) {
        throw new DSSException(e);
    }//from  w  ww.j av  a 2 s. c om
}