Add PDF search functionality and refactor page sizes as constants