Calling method to finish PDF