add pdf controls for startpage, endpage, startoffset, endoffset and fix add challenge and edit challenge