pdf task related code