refactor pdf pull service