public async Task <IActionResult> GetPublicationAsPDF([FromRoute] string publicationId) { var publication = await _publicationService.GetByIdWithValidationAsync(publicationId); var publicationPDF = await _publicationService.DownloadPublicationAsPdfAsync(publicationId); return(File(publicationPDF, Constants.PdfContentType, publication.title)); }