static byte[] drawCandidatePage(final PhdProgramPublicCandidacyHashCode hashCode) throws IOException { final String email = hashCode.getEmail().substring(0, hashCode.getEmail().indexOf("@")); final Page page = new Page(); page.h2(APPLICATION_NAME); drawPersonalInformation(page, hashCode, email); drawPhdIndividualProgramInformation(page, hashCode); drawGuidings(page, hashCode); drawQualifications(page, hashCode); drawCandidacyReferees(page, hashCode, email); drawDocuments(page, hashCode, email); drawThesisRanking(page, hashCode, email); page.close(); return page.toByteArray(); }