public async Task <IActionResult> CreatePDFAsync(int objId) { if (objId <= 0) { throw new ArgumentException("Cannot crated pdf id is not valid"); } var check = checkService.GetWithAllInfo(objId); byte[] arr = await pdfService.DecesionCreatePDFAsync(check); return(File(arr, "application/pdf")); }