Failed to generate pdf. The request failed with HTTP status 401: Unauthorized.