Refactored out the resource object and moved methods that were defined in RetrievePDF into this class.