public async Task <IActionResult> ExportPdf() { try { ValidateSecretKey(); var html = await ReadContentBodyAsync(); var pdfPath = _pdfGenerator.ConvertHtmlToPdfFromHtml(html); if (!string.IsNullOrEmpty(pdfPath)) { return(Success(GetHostUrl() + pdfPath)); } return(Failure()); } catch (Exception ex) { return(Failure(ex)); } }