added footer, bug fix in communication protocol handshake part and fixed pdf generation