Updated API service for downloading PDF