Пример #1
0
        public IActionResult ExportPDF(string url)
        {
            try
            {
                ValidateSecretKey();

                var pdfPath = _pdfGenerator.ConvertHtmlToPdfFromUrl(url);

                if (!string.IsNullOrEmpty(pdfPath))
                {
                    return(Success(GetHostUrl() + pdfPath));
                }

                return(Failure());
            }
            catch (Exception ex)
            {
                return(Failure(ex));
            }
        }