6.4.  Authorized Signature of the new CEO

Initial Situation

The board of executives has changed.


PDF documents which are used for contracts need to have a valid (visible) signature. So, the signature of the new CEO must be used.

The new and the old signature exist as files, but you have to give them the same file name. Otherwise, all programs have to be recompiled the next time the CEO changes.

Solution Approach

The image file is compared byte-wise with the signature image from the PDF documents.


public void verifyNewSignatureOnLastPage() throws Exception {
  String filename = "documentUnderTest.pdf";
  String newSignatureImage = "images/CEO-signature.png";