demo
Class APIDemo

java.lang.Object
  extended bydemo.APIDemo

public final class APIDemo
extends Object

Performs signatures and verifications with the pdfas api.

Author:
tknall

Method Summary
static void main(String[] args)
          Starts a demo that signs a document and performs a verification afterwards.
static void signWithAllProfilesDemo()
          Signs a test document with each available profile.
static void signWithSingleProfileDemo()
          Signs a test document with a single profile.
static void verify(PdfAs pdfasAPI, File source, String verifyDevice)
          Verifies a pdf document.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

verify

public static void verify(PdfAs pdfasAPI,
                          File source,
                          String verifyDevice)
                   throws PdfAsException,
                          IOException
Verifies a pdf document.

Parameters:
pdfasAPI - The instantiated api.
source - The signed pdf document.
verifyDevice - The device used for verification (see Constants.SIGNATURE_DEVICE_MOA and Constants.SIGNATURE_DEVICE_BKU).
Throws:
PdfAsException - Thrown in case of an error.
IOException - Thrown in case of an i/o error.

signWithAllProfilesDemo

public static void signWithAllProfilesDemo()
Signs a test document with each available profile. Note that minimal layout profiles lead to an error textual signing the document.


signWithSingleProfileDemo

public static void signWithSingleProfileDemo()
Signs a test document with a single profile.


main

public static void main(String[] args)
Starts a demo that signs a document and performs a verification afterwards.

Parameters:
args - The parameter(s).


Copyright © 2006-2010. All Rights Reserved.