fixed pdf loading for upload and url